Brushfire-257 / Horizon-Driving

A highway racing game. The biggest game I have ever made :)
4 stars 0 forks source link

Minor refactoring and maintainability tip #2

Open ReallyNotPikachu opened 4 days ago

ReallyNotPikachu commented 4 days ago

On line 17 of Scenes/game.lua you declare a variable called exitGame and set it to zero. Wouldn't it be better to make it a boolean value? It may require a little refactoring, (I'm too lazy to do it), but you could. Also you should probably include a comment near some of the variables saying what type of variable it's supposed to be in order to make sure your code is maintainable. {7DC5BF35-71E6-49B6-833D-F394AF75D508}

ReallyNotPikachu commented 4 days ago

Lua is a dynamically typed language, which can be nice and all, but image the sillyness that could occur if u accidentally put the wrong datatype in. This mainly applies to the various tables, like colliders, but still, just trying to save you some time ig.