Im currently trying to develop my own framework to and ive been having a lot of fun making my intellisense replicate closely to how roblox does it ive also been working a lot with type checking and stuff like that
Also ive been using a loader sort of model where you have two main scripts (one for the client, and one for the server) that loads and initalises a bunch of core modules.
the framework the you decide to develop is basically all up to you and how you work in studio. I think that It should be built around your workflow so that it is easy to add onto it and understand after coming back from breaks
I’m used to writing ModuleScripts for every little project i make, but the general requirement I frequently ask is whenever a feature is gonna be reused in other parts of the project.
Recently i’ve been making a Procedural Texture Generation plugin and I started using a modular structure in order to make the Node system work as I wanted.
As an example, if you plan in making a combat system where stats modifiers or (de)buffs is a core feature, you’re guaranteed going to make a module which handles said feature, otherwise Humanoid:TakeDamage() is all you’re gonna need.
Modular Approach its the best, as for netwroking, its just realtime remote creation and utilization, nothing special, I kinda got inspired by Knit, but more intellisense friendly, instead of .GetService() its just require()
As for intellisense, beware custom module requirers (i.e. something like local DumbService = loader.require("DumbService")) to circumvent typing out the actual path — autocomplete won’t work for that. So, while a lot of custom frameworks include a module loader, I wouldn’t recommend it, especially if you value your intellisense.
As for networking, you can either create your own networking module or use one of the several already out there (BridgeNet, ByteNet, Red, NetRay, Replica, etc.). There are different benefits and drawbacks to each of these; you just gotta choose the one you like best. Alternatively you can make your own. That’s the option I went with — it took several iterations to make something I REALLY liked, but as someone who’s gone that route, I can confirm that once you reach the sweet spot it’s really nice to have a tool that complements how your brain works. Your decision though — you gotta balance between performance, ease of use, and feature support (i.e. is it a glorified remote event wrapper or a replicated state manager with custom serialization and middleware support and all the bells and whistles).
As for structure, gather around children and pay attention:
Don’t lock yourself into any one structure/paradigm with your framework.
Different games, and different systems within a game for that matter, are solved better with different paradigms. Use OOP when OOP makes sense. Use ECS when ECS makes sense. Use event-driven when event-driven makes sense (which is most of the time but yk). If you want to create utilities for any given structure or paradigm, go for it, but I’d caution against making anything that makes it too hard to deviate from any given paradigm.
Also i’m not gonna lie to you my “framework” is just a collection of utility modules and loose conventions for game structure. That’s why I can do anything I want with it — it provides tools to support the patterns I like to use, but doesn’t lock me in to anything.
Personally, a modular structure is a little too “loose” for me. I will admit that sometimes I have very modular systems that can be easily forked and reused by vastly different components. However I like things to be “hard coded” so I don’t have to always figure this and that out and can just code it while only thinking about the functionality.
Instead of :GetController or :GetService I just created a table that constructs itself after every service and controller has Initialized its functions and gone through the proper life cycle.
This makes requiring stuff a lot easier by just accessing the main framework module and calling .Controllers or .Services
I thought so. I just don’t really know a lot about networking (atleast advanced networking) and I’m an avid knit.createsignal abuser. Any advice on how to make your own?
My vision is to have a framework that does sorta “lock you” but only for convenient purposes. Obviously I’d make it so it could be easily modified for different games but I’m not really into the whole no definitive thing as I really like just coding functionality not questions.