Allow me to introduce myself!

General discussion about LÖVE, Lua, game development, puns, and unicorns.
User avatar
CoffeeCoder
Prole
Posts: 19
Joined: Sun Aug 23, 2015 4:10 am

Re: Allow me to introduce myself!

Post by CoffeeCoder »

Thank you all for that information you guys! I definitely feel the LOVE here! :P

I have done a bunch of research on Lua and it seems to be a great language, I really can't wait to make something out of what I've learned!
- CoffeeCoder
Visit my site to learn more about me! :megagrin:
paulclinger
Party member
Posts: 227
Joined: Thu Jun 28, 2012 8:46 pm

Re: Allow me to introduce myself!

Post by paulclinger »

CoffeeCoder wrote:I am brand-new to LOVE, and Lua as well. However, I have found it to be ridiculously easy to learn, and I can't wait to really start getting my hands dirty with it.
@CoffeeCoder, welcome to the community! As you are coming to Lua from other languages, my blog post on Lua good and bad parts may be of some use: http://notebook.kulchenko.com/programmi ... ugly-parts
User avatar
CoffeeCoder
Prole
Posts: 19
Joined: Sun Aug 23, 2015 4:10 am

Re: Allow me to introduce myself!

Post by CoffeeCoder »

Thank you, that blog is indeed coming in handy!

Thanks again for all the links to resources guys, this is awesome. I am quickly getting up-to-par with Lua! I actually really love how you use tables, it really reminds me of user-defined types in something like DarkBASIC, but I find the syntax much easier to use. For example:

Code: Select all

-- Set a character data table
charData = {Name, Class, Age}

charData.Name = "Bob"
charData.Class = "Utility Worker"
charData.Age = 56
I don't know why but I just LOVE that syntax, so readable, and super easy to write!
- CoffeeCoder
Visit my site to learn more about me! :megagrin:
User avatar
Roland_Yonaba
Inner party member
Posts: 1563
Joined: Tue Jun 21, 2011 6:08 pm
Location: Ouagadougou (Burkina Faso)
Contact:

Re: Allow me to introduce myself!

Post by Roland_Yonaba »

CoffeeCoder wrote:

Code: Select all

-- Set a character data table
charData = {Name, Class, Age}

charData.Name = "Bob"
charData.Class = "Utility Worker"
charData.Age = 56
I don't know why but I just LOVE that syntax, so readable, and super easy to write!
Well, that code, actually. Do you know that the first line :

Code: Select all

charData = {Name, Class, Age}
boils down to this ?

Code: Select all

charData = {}
Thing is, you do not need to declare table fields in Lua. Unless you give them a value. Otherwise, they will be nil.
But actually, if you are fine with that, no problem. I've seen some people use this style, since they consider it is a good way to show what is likely to be the contents of a table.
User avatar
CoffeeCoder
Prole
Posts: 19
Joined: Sun Aug 23, 2015 4:10 am

Re: Allow me to introduce myself!

Post by CoffeeCoder »

Roland_Yonaba wrote:Do you know that the first line :

Code: Select all

charData = {Name, Class, Age}
boils down to this ?

Code: Select all

charData = {}
Thing is, you do not need to declare table fields in Lua. Unless you give them a value. Otherwise, they will be nil.
But actually, if you are fine with that, no problem. I've seen some people use this style, since they consider it is a good way to show what is likely to be the contents of a table.
No I did not know that, a good handy tip! Although in other languages I am very used to declaring the "fields" of a data structure so I just naturally assumed it had to be done this way in Lua as well. Once in a while* I am wrong! :P

Hey, another question, I am currently running LOVE on my iMac and was wondering what other IDEs besides Sublime might work? Sublime is GREAT but I don't want to pay $70 for it. :P

EDIT: Ok I seriously am considering paying for it. Just discovered distraction free mode. This...this may truly be the best code editor I have come across in a long long time. Although I do like Notepad++ better in some regards. :P


*More like 99.997% of the time I am wrong, actually.
- CoffeeCoder
Visit my site to learn more about me! :megagrin:
User avatar
Roland_Yonaba
Inner party member
Posts: 1563
Joined: Tue Jun 21, 2011 6:08 pm
Location: Ouagadougou (Burkina Faso)
Contact:

Re: Allow me to introduce myself!

Post by Roland_Yonaba »

Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests