Installed Love (how does one get those umlauts over the 'o' on a UK keyboard?) a little earlier on my Linux Mint 'tinkering machine'. Decided to try it with an IDE (I don't normally use such things) so I installed Zerobrane as well.
Four hours later and I've managed to learn enough Love/Lua to port the basics of my map generator (that I previously concocted in Processing and then ported to D/Allegro). I've even figured out modules, saving the map to a file, zooming via the mouse-wheel and debugging. Screeny attached. I didn't get any further with the game in its previous incarnations, but think I could press ahead with it in Love2D.
I have to say I'm quite impressed with how easy Love is to get into, how light it feels, even using Zerobrane, and how speedy it seems to be - I was expecting it to be much more sluggish. So, well done developers and wiki writers.
A couple of questions about general coding style though: what is considered best practice with regard to naming - I rather like camelCase for variables (but can live with underscores), MixedCase for classes (don't know if I would use them in Lua, looks a bit obtuse to what I'm used to!) and UPPERCASE for constants (which don't seem to exist!). What does everyone else do?
Four hours of Love
Re: Four hours of Love
That's what I do. I feel like a lot of Lua is written with underscores, but underscores are ugly as sin. I don't know how anyone can stand them.mr_happy wrote: A couple of questions about general coding style though: what is considered best practice with regard to naming - I rather like camelCase for variables (but can live with underscores), MixedCase for classes (don't know if I would use them in Lua, looks a bit obtuse to what I'm used to!) and UPPERCASE for constants (which don't seem to exist!). What does everyone else do?
Re: Four hours of Love
Cheers Tesselode, I'll stick with what I'm used to then.
mrUnderscoreHappy ( )
mrUnderscoreHappy ( )
- Ranguna259
- Party member
- Posts: 911
- Joined: Tue Jun 18, 2013 10:58 pm
- Location: I'm right next to you
Re: Four hours of Love
camelCase with the first letter as underscore FTW
Re: Four hours of Love
That always gives me the impression of some sort of system thing I shouldn't mess with, dunno why. Makes them easier to spot I suppose...Ranguna259 wrote:camelCase with the first letter as underscore FTW
Re: Four hours of Love
I do things weird, but it helps me to remember...
Code: Select all
CAMEL_CASE -- Globals/debug
_camelCase -- Constants
camelCase -- Variables/functions/etc
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot] and 8 guests