| Readme |  |  | How to play |  |  | How to create custom maps |
| How to create custom maps Creating a new map To make your own custom map just make a text file (map.txt for example) to maps directory. It will automatically appear into the custom maps menu in the game. When you create a map you might want to enable a few settings by editing settings.dat file in a text editor. There is 'map debug' setting while enabled shows the elapsed time in seconds in upper left corner and the enemies' names above them. There is also 'map debug keys' setting that will enable the use of q, w, e, r and t keys to change the game speed on the fly and y and u keys that will toggle 'invincibility' on/off. Map settings Now we are going to look what the map file looks like. Note that you shouldn't copy the following lines to your map because they use spaces instead of tabs. It is recommended that you use the original maps as examples and copy stuff from them. The map file starts with the following lines: time 0 lives 0 damage 0 accuracy 0 speed 0 homing 0 level -1 If time is set to 0 or a negative value the map will be a survival map. Otherwise it will be a stage map that ends after the the time has passed in seconds. Lives simply tell the amount of lives. Rest of the numbers tell what the initial levels are when the maps starts. If level is set to -1 it will be automatically set based on the other levels. Spawners The rest of the file consists of blocks that define every spawner and what kind of enemies they spawn. One of these blocks could look like this: spawner: start 3 end 35 rate 5 raterandom 40 minrate 3.5 progress 0.2 enemy: type -1 value 1 speed 0.4 speedrandom 50 size 2 health 1 You may replace spawner: with anything. This is also what is shown above the enemy if the map debug setting is set to 1 in the settings.dat file. Start tells when the spawner starts spawning enemies in seconds from the beginning of the map. End tells when the spawner stops spawning enemies in seconds from the beginning of the map. If set to a negative value the spawner will spawn enemies forever. Rate is the minimum time between spawns in seconds. Raterandom percent of rate is the maximum random value that can be added to the time between spawns. Basically the time between spawns may be from rate to rate + rate * raterandom%. Minrate is the minimum rate. Progress tells how much to subtract from rate every second. Type tells which enemies to spawn. If you want to spawn common enemies (green, blue, red) you should use -1 because it chooses the color automatically. The other possible values are: 0 = blue 1 = green 2 = red 3 = yellow 4 = black 5 = fast 6 = violet 7 = boss Value is the score multiplier for killing the enemy. Speed is the minimum speed of the enemy in pixels per frame. Speedrandom percent of speed is the maximum random value that can be added to the speed of the enemy. Basically the speed of the enemy may be from speed to speed + speed * speedrandom%. Size is the size of the enemy. Can be from 1 to 5. The size of the black, fast and the boss enemies is set automatically. Health tells how many hitpoints the enemy has. End After you have set all the spawners you want to have in your map, you have to have end immediately after the final spawner. There can be anything after the end. That's it... but in the end you should just take the original map as an example. |