Tutorials for making simple games with LÖVE

These tutorials show you how some games can be programmed.

The intended audience is people who know some programming basics, but don't know how to go about making something game-like.

The aim of these tutorials is that, by being guided through the process multiple times, you will somehow gain an intuition about how to turn a simple game idea into code.

There aren't any explanations about things related specifically to Lua or LÖVE in these tutorials. The focus is only on game logic and the programming process.

If you are familiar with Lua but unfamiliar with LÖVE, there is an introduction to LÖVE's basic concepts here: https://simplegametutorials.github.io/basic_love_concepts

You can download each game and play it to get an understanding of what's going on with it. You can also unzip it to access its images, if it uses any.

The tutorials generally start with an overview of how the data for the game is stored, and how it changes based on input and/or time.

Then the code of the game is built up step by step. You can follow along by typing/copying in the code and running it after every step.

I suggest focusing on understanding the code and not worrying about understanding the written descriptions of what the code is doing. The writing might be confusing, and some things aren't explained at all. If you're unsure why something works (or doesn't work), you can step through the code line by line in a debugger and see how the program flows and how the the variables change, or you can write some code to test things out and give yourself a better understanding of what's going on.

The code in these tutorials follows a certain style.

When a value is used more than once, it is generally made into a variable, and when code is used more than once, it is generally made into a function

Variables and functions are generally created as close to the other code which uses them as possible, and if possible are local to the scope which uses them.

Note that the window size is never changed from LÖVE's default window size. You can set the window size using love.conf.

I recommend using a debugger, such as ZeroBrane Studio. With it, you can see how your program runs line by line, and see the values that variables have at different times. Even if you use another text editor to edit your programs, you can still use ZeroBrane Studio when it's time to debug (it will automatically reload changed files).

The code for generating these tutorials, if you want to make your own, is at https://github.com/simplegametutorials/simplegametutorials

All of these tutorials are public domain, so if you would like to use some of the code in your game, or port them to a different framework, or do anything you please, you can.

The current version of LÖVE at the time these tutorials were last updated was 0.10.2.