How do you plan when making a system?

Hello, I always struggle to make a system because I always run into problems like changing the whole code because I forgot that this is supposed to be that or that is actually supposed to do this etc… and sometimes it makes me unmotivated. I’ve tried different methods such as making pseudo codes or writing down what I need to do but I still struggle.

How do you guys (if you do at all) plan when making a system? What are your tips for me and others that have the same problem? How do I practice these kind of stuff?

1 Like

If the game is suppose to achieve players, i recommend hiring a group of devs to help you during these moments. Before you make a big script that can change a lot of assets, maybe go through it with you’re team or tell yourself what you’re doing.

After a big chunk that can effect you’re work, go threw it. Don’t rush as much as you usually would.

Hope i help!

When I script a system I make sure to use local functions that class as desicions to make it easier instead of repeating code.

An example of this would be.

local owner = "propinity"
local player = game.Players.LocalPlayer
local checked = false

if player.Name == owner then
  checked = true
else
  checked = false
end)

This really helps as It classes as debounce and you can use them to easily use them for other functions that require to check stuff. It really helped me with systems and without this simple technique I think I would have failed every system I have made.

2 Likes

Know everything you want to do before you start coding, if there is a any data communication plan what will be sent across remove Events/Functions, I personally use Roact, Roblox-TS and Rojo which means I develop scripts in Visual Studio Code so I can use GitHub which makes editing large scripts so much easier, TypeScript also helps with modularity.

Try splitting you code into separate files, for example one file for all Datastore Functions in one file so if you want to change how a function works you find it quickly, its a pain to have to add things you forget. If you use Roblox-TS it gives you instant debugging without loading a single player game, and it has type safety so you don’t pass a string to a number only function.

4 Likes

It’s a good suggestion but I disagree about exactly knowing what to do as when you run into an issue and you search online for answers you will learn more than just what you need, half of the stuff I’ve learnt was from doing that.

But if you’re in a rush or something like that then it’s best to follow what @GeraldIn2016 said.

1 Like

From experience I personally find it easier to know what I am doing before I start, searching google can help but if one of your major functions has to change it could impact a lot of other code, personally modularity really helps as you can find functions quickly. I know I already mentioned this but if you hover over Imports on Roblox-TS (in VS code) it can show you quickly where its from and what other parts of the code use that function.

1 Like

The only way your not going to run into this is by clearly defining the every single requirement of the system from the start, otherwise you will just end up wasting a lot of time. It will be difficult at first but the more you do it, the better you will get at designing systems.

3 Likes

I don’t quite get what that system would help with, but if it helps you then more to it. Also, Happy B-Day!

So for starters, when I’m creating a new system I first make sure I run it through my head thoroughly. What this means is that I work out the logic of how the code should be running to cover performance issues, repetitive code, etc.

This means that if I run into some logical errors while thinking, I then have the ability to do some research BEFORE I start writing any code. This decreases the chances of having to go back and edit my code.

Once I believe I’m ready to start, I create all the scripts and functions I need that I don’t already have and make sure to comment their purpose next to them. After I have that ready, I start writing the code in the functions. While this by no means will 100% prevent you from having to re-write your code, as you should REALLY get used to that or you’re going to struggle a lot with development, it will decrease the amount of time you spend fixing your issues.

Like a solid 75% of your time coding will be fixing bugs, patching glitches, etc. If you don’t believe me, read the first article after searching “on average, what percentage of coding time is spent on fixing bugs for game development” on google.

Anyways, hopefully this helped you a little bit, and I wish you the best with your development!

Edit: @GeraldIn2016 Brings up using GitHub and great ideas for organizing your functions. I recommend learning how to use GitHub if you don’t know how, as even if you don’t use it for Roblox, it has plenty of great resources and properties for outside projects.

Another important thing to understand is a point @propinity brought up in response to Gerald’s message. Basically, running into bugs can be a good thing. This is because while doing research to solve the bug, you may learn more information than you needed to just fix that bug.

3 Likes

Thank you! And it would help with checking if an action isn’t performed or doesn’t exist in order for a function to run, for example if there aren’t any lettuce for a burger it wouldn’t do an action that it would normally do.

1 Like