Hi, I'm wondering how to create my first game
Hi, I'm wondering how to create my first game
Hi everyone I'm a programmer and I know only a few about lua but I'd like to create my first game, and pack it in a .love file of course (somenting like a circle which can be moved with the keyboard arrows or something simple like that). Thanks a lot and regards, sorry for the bad english.
-
- Party member
- Posts: 235
- Joined: Sat Dec 15, 2012 6:54 am
Re: Hi, I'm wondering how to create my first game
Welcome!tavuntu wrote:Hi everyone I'm a programmer and I know only a few about lua but I'd like to create my first game, and pack it in a .love file of course (somenting like a circle which can be moved with the keyboard arrows or something simple like that). Thanks a lot and regards, sorry for the bad english.
To make your first game, first step through these quick lessons:
https://love2d.org/wiki/Getting_Started
https://love2d.org/wiki/Tutorial:Callback_Functions
http://nova-fusion.com/2011/06/14/a-gui ... th-love2d/
Then, perhaps you could following this tutorial:
https://love2d.org/wiki/Tutorial:Hamster_Ball
Or maybe you'll find video tutorials easier to follow. Here are some that start you from the very beginning:
http://sockmunkee.com/videos/
http://www.youtube.com/playlist?list=PL924F20B05A624D91
You can find other LOVE tutorials here:
https://love2d.org/wiki/Category:Tutorials
As for making a .love file:
https://love2d.org/wiki/Game_Distribution
EDIT:
Also, if you need to brush up on Lua, check out these two resources:
http://www.lua.org/pil/#online
http://lua-users.org/wiki/TutorialDirectory
Re: Hi, I'm wondering how to create my first game
Thanks a lot I'll check that.
- ejmr
- Party member
- Posts: 302
- Joined: Fri Jun 01, 2012 7:45 am
- Location: South Carolina, U.S.A.
- Contact:
Re: Hi, I'm wondering how to create my first game
All of the links from scutheotaku are great resources. I would only suggest one other:
http://www.lua.org/manual/5.1/
This is the official reference for Lua 5.1, which LÖVE uses. Most of the information in that reference is also in the 'Programming in Lua' link that scutheotaku gave. However, that edition of 'Programming in Lua' covers version 5.0 of Lua. If I remember correctly there are not that many differences, but you may find the 5.1 reference useful for when you need to quickly lookup a standard library function for Lua 5.1, things like that.
Good luck with your game.
http://www.lua.org/manual/5.1/
This is the official reference for Lua 5.1, which LÖVE uses. Most of the information in that reference is also in the 'Programming in Lua' link that scutheotaku gave. However, that edition of 'Programming in Lua' covers version 5.0 of Lua. If I remember correctly there are not that many differences, but you may find the 5.1 reference useful for when you need to quickly lookup a standard library function for Lua 5.1, things like that.
Good luck with your game.
-
- Party member
- Posts: 235
- Joined: Sat Dec 15, 2012 6:54 am
Re: Hi, I'm wondering how to create my first game
'ejmr wrote:All of the links from scutheotaku are great resources. I would only suggest one other:
http://www.lua.org/manual/5.1/
This is the official reference for Lua 5.1, which LÖVE uses. Most of the information in that reference is also in the 'Programming in Lua' link that scutheotaku gave. However, that edition of 'Programming in Lua' covers version 5.0 of Lua. If I remember correctly there are not that many differences, but you may find the 5.1 reference useful for when you need to quickly lookup a standard library function for Lua 5.1, things like that.
Good luck with your game.
Ah, yeah, good point!
If you'd like Programming in Lua for Lua 5.1, you can get it but AFAIK not online for free (well, not legally). You can buy it in book-form, though make sure that you get the SECOND edition (the first edition is Lua 5.0, the second is 5.1, and the third is 5.2): http://www.amazon.com/exec/obidos/ASIN/ ... ilindex-20
Though, since you have past programming experience and Lua is a pretty simple language, the 5.1 reference manual ejmr posted and the other links above will probably be more than sufficient
Re: Hi, I'm wondering how to create my first game
Lua is really easy to use in most cases. And for all the more complicated stuff you might run into, you can always download a small library to do the heavy lifting for you.
My game called Hat Cat and the Obvious Crimes Against the Fundamental Laws of Physics is out now!
Re: Hi, I'm wondering how to create my first game
Welcome in the Löve community!
I can tell you that it's one of the most wonderful way of programming a game!
Some says it's good for prototypes only but they clearly didn't get the point. I'm currently developing a whole simulation game based on it (simulation games = many many many calculations at once) and every thing runs smoothly even if I try very hard to make it slow down hehe
Lua is simple, yet different. It's a bit like Ruby but not too much. Array = Tables, keep that in mind.
PRO TIP: Look at the docs before doing anything, I found myself refactoring a lot of code that was already in Lua's code base. (Such as many table functions, go check out table.foreach, table.insert, table.remove, etc).
Hope this helped a bit!
I can tell you that it's one of the most wonderful way of programming a game!
Some says it's good for prototypes only but they clearly didn't get the point. I'm currently developing a whole simulation game based on it (simulation games = many many many calculations at once) and every thing runs smoothly even if I try very hard to make it slow down hehe
Lua is simple, yet different. It's a bit like Ruby but not too much. Array = Tables, keep that in mind.
PRO TIP: Look at the docs before doing anything, I found myself refactoring a lot of code that was already in Lua's code base. (Such as many table functions, go check out table.foreach, table.insert, table.remove, etc).
Hope this helped a bit!
- ejmr
- Party member
- Posts: 302
- Joined: Fri Jun 01, 2012 7:45 am
- Location: South Carolina, U.S.A.
- Contact:
Re: Hi, I'm wondering how to create my first game
Lua 5.1 deprecates this function and Lua 5.2 removes it completely, so I would not recommend using it, as LÖVE could use Lua 5.2 in the future.tomshreds wrote:...go check out table.foreach...
Re: Hi, I'm wondering how to create my first game
Oh didn't know. Then could you please inform us of what should we use instead? Thanksejmr wrote:Lua 5.1 deprecates this function and Lua 5.2 removes it completely, so I would not recommend using it, as LÖVE could use Lua 5.2 in the future.tomshreds wrote:...go check out table.foreach...
- ejmr
- Party member
- Posts: 302
- Joined: Fri Jun 01, 2012 7:45 am
- Location: South Carolina, U.S.A.
- Contact:
Re: Hi, I'm wondering how to create my first game
My understanding is that the Lua developers dropped table.foreachi in favor oftomshreds wrote:Oh didn't know. Then could you please inform us of what should we use instead? Thanks
Code: Select all
for key,value in ipairs(table) do … end
Who is online
Users browsing this forum: No registered users and 4 guests