Alright so right now I am creating a survival game and, I have made a few assets and I’ve coded some basic movement for the character and an inventory open and close thing, but I know its going to get out of hand very fast…
Is there like anyway I can organize my game/code so that I dont have a bunch of different scripts and like having to switch back and forth then losing my train of thought then just wasting hours of time trying to get back to where I was at???
Is there just anyway that I can have all the code in one script, but Im thinking that could be better but Im honestly not really sure
Alright so as of now I am creating my “dream game”, so everything is mostly just gonna be client side since the game is just for me
But I was thinking of having a single local script and then having a object oriented module script that I require that has all the stuff I want to do in the game, does that sound good or no?
It would also make errors way harder to detect if theres one line of code that errors something like “attempt to index nil with xd” without giving u which line it was, making you go through pain and suffering to find it, so making multiple is way better
to add on what he is saying, add comments to your code as much as possible so you can come back later and not be confused. You can also use comments to organize sections of different code in the same scripts
DUDE thank you a million man, my code is much shorter, easier to read and I know exactly what file im working on and having the modules organized is so USEFUL, DUDE THANK YOU SO MUCH