Time for action — creating an INI file
We'll create an INI file using Notepad to understand how they work. In doing so, we'll also make a test level we can load later in BounceBall
.
1. Open up
Notepad
(normally found in Start | All Programs | Accessories) and then use File | Save As….2. Navigate to the folder where
BounceBall
is saved, and enter the File name ofLevels.INI
and set the Save as type to All Files. Click on Save:3. Now we can begin entering the level details. Type the text
[Game]
on the first line as the group and then press Enter.4. Next, type
NumCustomLevels=1
and move down a line again.5. We can then add data for the first level. Write the text
[CustomLevel1]
and press Enter.6. We are now defining the values of the level. Fill the first line of the level with the text
Background=Back3.png
and move to the next line.7. Use this next line to set the number of pegs to be created for the level. Enter the line
NumPegs=12
.8. Now we can fill in the X and Y positions of objects...