This is the tricks tutorial for LEVEL-EDITOR v1.01 © Henrik Stokseth, 1999.


Introduction:

You think Level-Editor is too simple to be used for any really cool games? Perhaps you will change your mind after reading some of the tricks explained here. Anyways, I recommend making games more advanced than just using a static fourways scrolling single-layer tilemap as a background. yuck :-)


The black art of tilemaps:

I still remember someone suggested that i should implement lightning and transparency effects to the draw_tilemap_layer() function. Quite unnecessary. You need a buffered screen update function anyway. Applying transparency or lightning effects on many tiles needs CPU power, too much. One cannot expect everybody to sit with a Pentium 200 or? The solution is simple: Draw the layer you want to add the lightning or transparency effects to, to an empty bitmap. Then you blit it to the screen using draw_lit_sprite() or draw_trans_sprite() depending on which effect you want. See? Much faster...

Also someone suggested dynamic tilemaps. You can quite easily change the contents of a tilemap once it has been loaded to memory. It doesn't change the contents of the tilemap file itself, so it is quite safe to do it. To change the tile at a given position in a tilemap you should use the set_sprite_number() function. By combining this method with timers you can also animate the tilemap.

Also you can add parallax scrolling to your game, quite easily. Parallax scrolling means scrolling the different layers at different speeds. This method is often used to give the illusion of depth and perspective in games like Super Mario and Worms.

I hope this has been of inspiration to you. This simple tutorial was written with the purpose of giving you ideas on how to write more advanced games. If you still want to do something that you can't do easily using Level-Editor why don't you tell me? Most likely I will either assist you or add some stuff to the helper functions. You are also quite welcome to hack around on TILEMAP.H yourself, but have a backup ready. I won't help you fixing what you have managed to ruin yourself.