Hi guys!
I’ve been creating a roleplay-oriented game that I often write code for but eventually end up disliking. I’ve been writing a lot of frameworks recently independently to see what conventions I do and don’t like and incorporate the good parts into my roleplay game’s framework; however, I still am never content with specifically the organization of my code.
Therefore, I’m curious about what your guys’ scripting preferences/idiosyncrasies are.
- What casing convention do you use? camelCase, LOUD_SNAKE_CASE, PascalCase, or something else – and when?
- Do you have code you write one day and end up disliking? How do you deal with it? Do you continue writing off of it?
- How do you set up your scripts? Do you use a lot of modules? How do you assemble them all together (if a LocalScript, what do you put in your central script? User input?)
- How lengthy are your server and client scripts?
- Do you use an organizational technique with your functions? Do you put all of your functions into a table and use the “self” argument? Do you create a table and then write your functions outside of it?
I’m on a quest to improve my code-writing by getting outside feedback. Help me out if you can!