- Indent. I've attached a .love which has marginally improved indentation. It'll help you keep track of where you are and what you're doing in your code.
- Use PO2 images so that computers that can't render them will still be able to play.
- Don't require anything more than once. One, its not doing anything code-wise, and two, it encourages bad coding habits. Only require class once.
- Comment everything that isn't self evident. I will often put the why in my comments, like this:
Thank you all so much. This language is interesting. I self taught in PHP, I did my capstone on php and sessions. A professor encouraged me to learn this as my 2nd scripting language. This language is def interesting. It is so short and effective it is scary. I see some posititve attributes about using this language, especially as a scripting language. I am going to play with some functions and try to do more with this.
This is a great quote. I spend time in many languages and the thing that always strikes me about lua is how much you can get done with a small amount of code. You are doing yourself a great service by learning it. It will make you a better programmer.
And yet, I must point out that there are more short and effective languages out there...
I know what you're thinking. Ruby . I was going to say the same thing, but I thought not. I can talk equally long on what I do and don't like with Lua. (And I could talk for ages about what I like with Ruby... but that's another matter)
slime wrote:Perhaps for things unrelated to game programming/scripting.
Yes, that is the one thing I don't like about Ruby and like about Lua. Speed for intense applications like games.