So, I’ve been looking into improving my habit when it comes to game development, and I feel like the next best thing to level up my skills is to use a framework to work efficiently, and get more done quickly without much hassle. I don’t work in a team, and I am a solo developer, but I prefer organization which Knit offers, as well as reducing complexity by making everything relatively consistent with each other.
I’ve always had problems with noticing usage patterns I no longer liked later down the road, and wanted to figure out how to use Knit, as it’s pretty popular and isn’t as invasive with your experience.
I’ve been reading the documentation and have been a little confused on how I’m supposed to utilize services I’ve setup with Knit.
To put this into perspective, Knit says that there is 1 local script, and one server script that manage Knit. Does this mean that the entire game must be programmed using just those two scripts?
Or am I overthinking it, and Knit is just for assistance in a sense where I will just have multiple different scripts in different places that all route back through Knit (basically they all use Services and Controllers setup through Knit, instead of requiring a regular ModuleScript and using the functions through that, causing unnecessary inconsistencies.)
Any assistance on how I would setup my scripts to work with Knit would be great. I get how to initialize Knit, and create services and controllers. I’m just confused how I actually use the services, and if creating more than just the two scripts in the documentation is even okay.
Sorry if this is sort of a brain dead answer, I’m just completely new to this.
I didn’t actually notice that Sleitnick posted a video on him setting up an entire game with Knit. I’ll take a look at this, but I’m definitely more open to text based replies, as I’d like to hear different perspectives from other developers who use Knit.
I appreciate the videos attached.
(p.s, I know how to setup Knit, but am confusing myself over how to make a functional game entirely with Knit)
Okay, just writing a quick summary of things I noticed during the game tutorial video, and hopefully I got most of this correct:
Services - Modules on the server side that provide the server with various functions for different tasks required for one particular purpose. Services can expose some of their functionality to the client to provide specific information to them.
Controllers - The equivalent to Services, except they run exclusively on the client for client related tasks. The client can interact with the server via Signals that were created on the server side.
Components - I don’t remember seeing this one in the tutorial for Knit. The only reason I can think of why that is, is because Components are not necessarily specific to Knit and are a general term more advanced programmers use. I know they involve metatables, and they exist to provide specific functionality for objects in the game, while the service uses these components to fully interact with aspects of the game.
So in short, I need to maximize my usage of Services + Components to make stuff work in the game, instead of dropping random scripts across my experience, as everything can be programmed and executed with Knit through the use of Services / Components.
I’m going to assume that Controllers use Components as well, unless I’m mistaken.
Any further clarification would be awesome. I haven’t watched that much into the video, but it seems that Sleitnick repeats majority of the stuff found near the beginning of the video. He just makes use of more Packages to ensure his scripts are performant, and run as desired (the use of Maid, Promise, and Options).
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.