Re: Started My Very First Love2d Game
Posted: Wed Dec 27, 2023 10:37 pm
I changed the name of the folder to VerySimpleSpaceGame that is probably the reason for the run problem. I make a variable global if it is used in more than one function. What I guess I'm forgetting to do because I'm new to Lua is to use the local keyword everywhere I should. I'll need to spiff it up a bit. It does have a nice feel to it and I think I'm doing a decent job organizing the code and keeping it clean and simple. ThanksBobble68 wrote: ↑Wed Dec 27, 2023 9:01 pm Something seems to be up with the way you've packaged your game - normally if you have Love2D installed, you should be able to run the .love file directly. I could only do that once I unzipped it and repackaged it myself.
What method are you using for this?
Other than that, seems to be coming along nicely! My other piece of feedback is that you seem to be using a good deal of global variables, rather than local ones. I'm not one of those people who thinks globals should be illegal, but I will say they should be used sparingly - locals are a little faster, and are less likely to cause you issues down the line. If you have an issue that affects one of your globals, it will be much more difficult to track it down, especially if it's the result of a typo.