Hello all,
First, I apologise if this has been asked before, but I'm struggling to find decent tutorials on Lua out there, and I'm not fond of the way the 'official' one is written...even Google has failed me anyone know of any particularly good ones...or should I just go buy myself a decent book instead?
Thanks
Lua Tutorials
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Lua Tutorials
Welcome!
The PIL is a good place to start, and it is much more than a tutorial. After reading the PIL, you can* understand how Lua works.
* Of course, this depends... I needed a second read to understand the more complex parts, but you can ignore them if you wish.
The PIL is a good place to start, and it is much more than a tutorial. After reading the PIL, you can* understand how Lua works.
* Of course, this depends... I needed a second read to understand the more complex parts, but you can ignore them if you wish.
Help us help you: attach a .love.
Re: Lua Tutorials
I have had a brief read of that...I guess I'll just go back to it and take the time go to through it properly, since it seems to be what most people learn from.
Thanks
Thanks
Re: Lua Tutorials
There were quite a few examples written for 0.5.0, but they got lost in the upgrade.. hopefully those'll be up soon, should help quite a bit.
-
- Party member
- Posts: 215
- Joined: Sun Jan 18, 2009 8:03 pm
Re: Lua Tutorials
The wiki tutorials have now been updated to 0.6.0. These are however on LÖVE and not Lua.
I am not sure you need a tutorial on Lua though. I would recommend first looking at a working LÖVE example (like the simplest text writing tutorial) and then proceeding by going through the official Lua tutorial. You can test the things you read then by changing the text written in LÖVE (alternatively, get a Lua interpreter). After that, you could look through the list of methods of Lua and then proceed with the rest of the LÖVE tutorials and then the documentation. After you have done and understood all that, you should be a real expert.
I am not sure you need a tutorial on Lua though. I would recommend first looking at a working LÖVE example (like the simplest text writing tutorial) and then proceeding by going through the official Lua tutorial. You can test the things you read then by changing the text written in LÖVE (alternatively, get a Lua interpreter). After that, you could look through the list of methods of Lua and then proceed with the rest of the LÖVE tutorials and then the documentation. After you have done and understood all that, you should be a real expert.
If I haven't written anything else, you may assume that my work is released under the LPC License - the LÖVE Community. See http://love2d.org/wiki/index.php?title=LPC_License.
Re: Lua Tutorials
Is the fine tile-based scrolling 0.6.0-compliant or does it need any tweaks?
Re: Lua Tutorials
http://love2d.org/wiki/index.php?title= ... ling_Juicenunix wrote:Is the fine tile-based scrolling 0.6.0-compliant or does it need any tweaks?
-
- Party member
- Posts: 215
- Joined: Sun Jan 18, 2009 8:03 pm
Re: Lua Tutorials
Just basic changes: adding a "love." prefix to callbacks and replacing constants with strings. Wiki article updated.nunix wrote:Is the fine tile-based scrolling 0.6.0-compliant or does it need any tweaks?
If I haven't written anything else, you may assume that my work is released under the LPC License - the LÖVE Community. See http://love2d.org/wiki/index.php?title=LPC_License.
Re: Lua Tutorials
Uh.. can you explain your changes, Thelinx? Your edit-reason was "0.6.0 is not the stable version right now"..but.. 0.6.0 sure as hell does seem to be the stable version right now. -.- Also why would you change one tutorial back to 0.5.0 but none of the others?
However, on topic!
1) is table.getn really right there? Looking through the 5.1 book, there's a note that says table.getn was a 5.0 thing, and that 5.1 uses #. There's also no mention of table.getn in the online reference manual that I can see.
2) The tutorial, as it stands, seems to crash on me. I made a couple of small changes that I THOUGHT I understood, but maybe I don't:
First I made the map smaller
Also I'm using bigger tiles, 400 x 400 so I did
I get a grey love screen to pop up, and then it crashes, without any real error report. Any idea what's going on?
edit: gah, it's because of the dumb tile={} thing at the start, I think. If a tutorial is going to rely on particular assets/directory/whatever, they should be included in the tutorial. -.- Anyway, it's not crashing anymore since I changed it to
and got my graphics in the right place, but now it's just a BLACK screen. what gives?
However, on topic!
1) is table.getn really right there? Looking through the 5.1 book, there's a note that says table.getn was a 5.0 thing, and that 5.1 uses #. There's also no mention of table.getn in the online reference manual that I can see.
2) The tutorial, as it stands, seems to crash on me. I made a couple of small changes that I THOUGHT I understood, but maybe I don't:
First I made the map smaller
Code: Select all
--the map
map={
{0, 0, 0},
{0, 2, 0},
{0, 0, 0},
{0, 0, 0},
{0, 0, 0},
{0, 1, 0},
{0, 0, 0},
}
Code: Select all
tile_w = 400
tile_h = 400
edit: gah, it's because of the dumb tile={} thing at the start, I think. If a tutorial is going to rely on particular assets/directory/whatever, they should be included in the tutorial. -.- Anyway, it's not crashing anymore since I changed it to
Code: Select all
for i=0,2 do
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot] and 3 guests