So... What's the deal with frameworks?

Hey, so recently I’ve been looking for a game framework that actually works for me. (Impossible task).

And yes, I’ve tried making my own. I hate it. Maybe I’m lazy, but I don’t feel right using my own.

I would normally go with Knit, however the entire ROBLOX scripting community has now put Knit in the bucket of “Bad practices and dangerous to use”. It’s also going to be archived.

So, here we are with the next “What framework should I use” and WHY.

AND YES, I have looked for alternatives, and I haven’t found any that are worthwhile in my opinion, or just depend on VSCode which I don’t like using.

Thanks.

You don’t necessarily need a framework for a game. Frameworks are only useful if they provide crucial functionality that you need and can’t re-create efficiently yourself.

With that being said, no one can really give you a framework to use because that entirely depends on what your game is and how it’s constructed

Maybe then I need advice on how I’m supposed to construct my game.

I need a framework because a lot of my game ideas revolve around complex systems, and without one, it gets difficult to manage. (Or again, maybe I’m approaching it incorrectly.)

If you mean using a module loader / bootstrapper instead of a framework, I don’t really like doing that. Solely for the purpose that only using a loader just feels like an extra step with no real benefits, unless you can enlighten me on those.

Module loaders are useful if your systems are more “centralized” since they load scripts and game content in a sequential order that you can guarantee. For example:

  • Main Script ← Core script that starts everything. This will execute the loader script to startup the game
    • Loader Script ← This will load the following modules in the order they’re defined in:
      • Load Players ← First
      • Load Map ← Second
      • Load Items ← Third

The main benefit, as aforementioned, is the fact that you can gaurantee that your modules will load your game’s content in the order you define. This removes an uncertainty that may arrise if something doesn’t load in quick enough for whatever reason.

It’s also good for organization since all your modules and scripts are stored relatively in the same area, so you won’t need to navigate various different places in your game in order to find something.


For your complex systems, what are they specifically? Is it something that involves the client and server communicating?

Thanks for the in-depth answer, it’s appreciated.

I remember everyone saying frameworks were useful for client-server communication, but I often found it useful that they had a way of organizing the location of the modules. I never found any of those other features very useful, at all.

Along with this, I’ve never found the load order of modules useful. Now many others, do.

I would’ve given an example but I guess I’ve made an oversight. In terms of design, how exactly is the load order beneficial for something like, let’s say, an ingame menu? Along with this, how do you think this should be structured?

Sorry for all the questions, thanks.

This is technically true; it largely depends on which framework you’re talking about. Some offer great client and server communication (like you mentioned: Knit), while others don’t really feature it.

Good question. I guess my answer would revolve around what’s in the menu; If your game menu uses data strictly on the client, then the load order may not necessarily matter, however, if your menu interacts with other modules or utilizes data that needs to be initialized, then you would probably want the menu to be loaded in last (just so everything it needs is certified to be available when requested)

If you’re referring to the menu, I would re-enforce what I said before: have it initialized last after everything else.

If you’re referring to the modules and folders in the explorer:

  • ServerStorage
    • Data ← Holds content that the server may need to read from within the ModuleScripts
      • (Content) ← Composed of Folders and ModuleScripts (or just ModuleScripts)
  • ReplicatedStorage
    • Utility ← Things like a Signal Module, Janitor Module, etc. Basic shared game functionality
      • (Modules) ← ^
    • Shared ← (Like the Data folder), content and information both the client and server will read from
      • (Content) ← ^
  • StarterPlayerScripts
    • Client ← Client script that starts everything on the client
      • Modules ← ModuleScripts that control that content
  • ServerScriptService
    • Server ← Server script that starts everything on the server side
      • Modules ← ModuleScripts that control that content

Within the “Server” and “Client” directories, you can store additional folders for modules that need to be loaded in immediately, and another folder that those aforementioned modules can execute and read from

No problem

3 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.