How to make a game with LOVE?
Posted: Wed Oct 22, 2014 5:01 pm
Hi!
I'm not an experienced game-developer, but I have some 'more-than-just-a-basic' skills in programming. And I've always dreamt to make my own game(s).
So, A game is a cycle. Data is updated with every iteration.
In LOVE we have three modules: .load(), .update() and .draw().
To get started with love, I have used headchant's tutorials instead of reading a wiki. Well, I've tried to read it first, but it looks like just a huge reference book. Here's the link of a tutorial I used: http://www.headchant.com/2010/11/27/lov ... -must-die/
Ok,
.load() preloads all game's stuff.
Here objects (classes?) declared as a massives (tables) of data, but indexes are not called by their number(eg. 1,2,3..) but by they name.
Example:
.update(dt) is a program itself. All game logic and math stuff is done here with every frame.
and finally .draw() is a graphics module. It is called every frame too.
So, I have some questions to answer.
Did I understood (I mean, written) it right?
Tables and classes. Are they same?
How to set a scene with walls and other stuff?
Kind regards.
I'm not an experienced game-developer, but I have some 'more-than-just-a-basic' skills in programming. And I've always dreamt to make my own game(s).
So, A game is a cycle. Data is updated with every iteration.
In LOVE we have three modules: .load(), .update() and .draw().
To get started with love, I have used headchant's tutorials instead of reading a wiki. Well, I've tried to read it first, but it looks like just a huge reference book. Here's the link of a tutorial I used: http://www.headchant.com/2010/11/27/lov ... -must-die/
Ok,
.load() preloads all game's stuff.
Here objects (classes?) declared as a massives (tables) of data, but indexes are not called by their number(eg. 1,2,3..) but by they name.
Example:
Code: Select all
love.load()
Player = {} --creating a player table
Player.x = 300 --assigning 300 to a cell named 'x' of a table 'Player'
Player.y = 600 --assigning 600 to a cell named 'y' of a table 'Player'
end
and finally .draw() is a graphics module. It is called every frame too.
So, I have some questions to answer.
Did I understood (I mean, written) it right?
Tables and classes. Are they same?
How to set a scene with walls and other stuff?
Kind regards.