What does an advanced framework need?

I am currently developing a framework called Crystal Framework, though my development and growth has come to a complete halt, because I have no idea what my framework needs to be a so called “framework”.

If you could help that would be great.

1 Like

Afaik, A Framework is a collection of scripts and modules that is a stepping stone to build a full out game.

Typically a framework can range on its structure and execution behavior. Starting with framework architectures which stem from their execution, Multi-Script Architectures and Single-Script Architectures are the two forms it can attain.

Multi-Script : A architecture where there is more than one script, or to clarify many scripts running at once. Example: You have a Sprint script and also a Interact script they are different scripts that run at different times. Though this method is discouraged because of the poor portability and the non-reusable code it makes.

Single-Script (Reccomended) : A architecture where there is one serverscript and one localscript and the rest of the code is in modulescripts that are required by these two scripts. This is also a example of a “Modular” framework the code we write in modulescripts can be reused on the client and server with ease. Example: A text formatting library would be stored in a module script, because maybe we want to format text on both server and client. This architecture would follow closely what software engineers do, they write clean, modular and portable code in a event driven (single script) architecture. Really this design pattern is alot more simple and powerful, for a example phantom forces uses the single script architecture.

Learn more about architectures.

What you really need is what is vital to making a game, do not over think it. Do not add useless code that will not provide a stepping stone to you later on. For example saving data is vital to making some multiplayer games. So you would create a interface that can save player data using datastoreservice or if your game deals with multiple places you would write a interface or (module) that handles teleporting the players to another session/game.

Try to think in simple terms and break down your giant problem into chunks of small problems. As mark twain once said: “Eat a live frog first thing in the morning and nothing worse will happen to you the rest of the day.”"

Where do you go now?:
Learn about how other people design their frameworks, like the nevermore engine, or the aero-game-framework
Learn about writing modular code in modulescripts.
Learn about the client/server boundary in ROBLOX.
Learn about how games operate behind the scenes, what services they use etc.
Learn more about writing event driven code.

I hope this helped.

2 Likes

This helped a lot. But what would I need for an open source framework. You mostly discussed things that I need for my game.

Thanks.

For an Open-Sourced game framework you would need meaningful and helpful documentation on how to use your software, generally everything else applies to what I said. And you would need to maintain your Framework enough so people continue to use it, For example AeroGameFramework was not the work of just one person, there had to be other people who committed changes and improved the code. Another good resource to look at is the Knit Framework that uses promises (asynchronous calls).

Knit is unique because of this ability to seamlessly create those promises with a simple function call, ideally your framework should be easily used and used with purpose over others, find what can make your framework top of other ones.

A tip from me: I don’t think anyone has done a multi-threading open source framework yet, so that could be a area you could start to consider.

I hoped this helped.

1 Like

What do you mean by this? I know what multi threading is, but not in this context exactly.

Recently, Roblox added the ability to execute code on real multiple threads, no framework yet has this functionality in it’s design, so it would be a interest.

I hope this helped

1 Like