Chapter 6. Custom Levels
We have a game with multiple levels, but we would need to export a brand new EXE each time we add a new one. Instead of that, we'll load additional levels from a file and make a level editor to save to it. These skills will be useful for any future games we make and can extend the life of our BounceBall game.
In this chapter, we shall:
Learn what an INI file is and how they work
Modify our
BounceBall
game to load level data from an INI fileAdd a game over screen for when all levels are complete
Create a
BounceBall Level Editor
and save our level data to an INI file
So let's get on with it.
The user friendly INI file
An INI file is an extremely easy way to save information. It stores all data in a file as plain text, so it can be edited from any text editor. We'll need to know how these are stored and used before we can continue making our game.