I happened to read the interview with the creators of Professor Fizzwizzle. Professor Fizzwizzle is one of my favorite games that I've seen here, so I was really glad to see that it is an IGF finalist. It's very inspirational seeing that 2D games still have a good place, seeing as that's really all I want to create.
It seems also that they just used plain SDL, without OpenGL. This was also very good to hear, because personally I'm not really interested in using OpenGL since I'm just going to be creating 2D games. They did use pre-rendered 3D models to create the graphics, though, which is something that seems to be more common in 2D games nowadays.
Ok, I said I would write a tutorial on creating your own level, so here it is:
Creating your own Stompy level
One interesting thing about Stompy's Revenge is the cability to create each level with it's own look. In theory, anybody can create a level for the game with enough patience, but it's hard to understand how the levels work just by looking at the files. So, that's why I'm writing this tutorial.
However, keep in mind that I never had the intention for anyone but me to be creating levels for this game. Therefore, you'll probably notice that the method for creating levels is pretty convoluted.
For the sake of this tutorial, I will call the level "tutorial".
Step 1: Create the background
Open up paint, or whatever image editor you use. Set up a new image with a size of 640x480 pixels. After that, simply draw what you want the background of the level to look like. Keep in mind when you are drawing it that your background will be repeated constantly throughout the level. So try to make it look natural.
When you're done, save the image to the folder gfx/bgs, and name it "tutorial.png".
Step 2: Create the tile graphics
Each level can have a maximum of 9 different types of tiles. The image files for the tiles are called 0.png, 1.png, etc, corresponding to what tile they represent. For the sake of this tutorial, we'll make two types of tiles.
First, go into the folder gfx/tiles. In there, create a new folder called "tutorial".
Second, open up your image editor and set up a new image with a size of 32x32 pixels. Fill the image with the color pink (r=255, g=0, b=255). Pink is the transparent color in this game, so this will just create a blank tile. Save this image in the folder you created as "0.png".
Third, set up a new image with the same size. In this image, draw what you want a basic tile to look like (examples include grass, dirt, etc). When you're done, save this image in the same folder, but call it "1.png".
If you've done this correctly, you should have a folder gfx/tiles/tutorial, and inside it two files, "0.png" and "1.png".
Step 3: Edit the tile data
First, download this little program. It's a program I created to generate a generic level. When you run it, it will simply create a file named "map.txt", which is basically just a generic level that's empty except for a floor. Rename the file to "tutorial.txt", and move it to the folder called "Levels".
If you open up "tutorial.txt", you should see a collection of numbers, 0s and 1s in this case. These numbers correspond to the images that you drew in Step 2. A 0 is blank tile, while a 1 is the tile that you drew. You can simply edit the level by changing these numbers. Remember, any tile with a number above 0 will register as a collision in the game.
I recommend you don't edit the file until you've tested the map, which I'll explain in Step 5.
Step 4: Adding enemies
This is probably the hardest part of the whole process. If you open up one of the files in the folder "Scripts" (except for "LevelLoad.txt"), you'll see something like this:
RobotGuard 1300 397 1
BombBot 400 410 0
These are little enemy codes that tell the game where to place the enemy in the level. So far they follow this form:
[type of enemy] [x-location] [y-location] [direction]
in place of [type of enemy], you could place these:
I think [x-location] and [y-location] are pretty self explainitory. They're the coordinates of the enemy in the level.
[direction] is what direction the enemy starts of facing. Only two values can go here, 0 or 1. 0=Right and 1=Left.
For now, just create a blank text file called "tutorial.txt", and save it in the folder "Scripts". I recommend only trying to add enemies after you've tested the level.
Keep in mind that adding enemies will be very difficult, because of how exact you need to be. For instance, the RobotGuard needs to be placed exactly above the floor, and if it is even a pixel off, will produce unexpected results.
Step 5: Running your map
By now, you should have the following:
1. An image file in "gfx/bgs" called "tutorial.png".
2. A folder called "gfx/bgs/tutorial", with "0.png" and "1.png" in it.
3. A file called "tutorial.txt" in the folder called "Levels".
4. Another file called "tutorial.txt" in the folder called "Scripts".
If you have all of these things, go into the folder "Scripts" and open the file called "LevelLoad.txt". Change it so this file says "tutorial" instead of "city". Now run the game.
You should now be playing the game in the map you made. If it doesn't work, you will know, because the game will crash.
I realize that I'm awful at writing tutorials, so please feel free to leave a comment if you have any questions.