The "45 Minutes LÖVE Tutorial" Extended


For the tutorial, look here or here.

I'm extending the tutorial by providing some additional code. It felt unnatural and limited only being able to move at the bottom of the screen. I wanted to extend the functionality of the ship so you can move around the entire map.

Just add

if love.keyboard.isDown("up") then
game.playery = game.playery - 100*dt*3

if love.keyboard.isDown("down") then
game.playery = gameplayery + 100*dt*3

Final note

Scale is equal to 4 and the default value set by the tutorial. For my game I used 3. You can assign it to whatever you want (well, almost, depends).

Another thing, if you want to increase the difficulty, have the user put in a number then have that number equal to game.enemy_rate. Anything more than 2 but less than 15 is good. You could fill the screen but that's completely pointless.

Where you put these code, of course depends on how you structured your code. If you followed the tutorial, it should be obvious where they go.

I can't think of anything else to add to the game except more level, more enemies, etc. That also shouldn't be hard to do on your own.