Level Linkage

Started by
1 comment, last by JoHnOnIzEr 20 years, 3 months ago
In a tile-based game, what is a decent way to do level linking? Do you just assign each tile a special "warp" function if the player collides with the tile? Or how about defining a rect for each "zone" that will warp a player to somewhere else? The problem is, if the level for some reason has many links gameplay might be slow if it has to keep checking if the player intersects with those rects. Also, if i was a broad area of tiles to warp the player and I am using the first method, Each tile would need to be configured to warp the player, also building up filesize and making it hard to implement level links. I''m not sure which way to go, or if there is a different one =/. Any help would be greatly appreciated.
Sidra Headquarters
Game engine is currently at version 0.9.8! Currently Down
Advertisement
Bascially, you want a trigger to the next level. The two most common ways are what you described.

-Having a lot of triggers which are assigned to tiles activate the next level script

-Assigning an area that triggers the next level script.

The third possiblity, one that you should plan for, is if an NPC triggers the next level. Defeat the last boss, warp outside of a cave. That kind of thing.

Unless you''re working on a very limited system, like a PocketPC, the easiest to implement and debug the first option. Checking 10, 20 or 30 extra bools will not significally slow you down. Since your end of level trigger is baised on tiles, the level editor and making sure your characters cannot sneak past ''triggers'' will be easier.
~~~~~Screaming Statue Software. | OpenGL FontLibWhy does Data talk to the computer? Surely he's Wi-Fi enabled... - phaseburn
If you have a large map of tiles that scrolls on the screen, and are worried about checking all the different triggers, you could partition the map into different zones (which would be transparent to the user). That way you only check the triggers for the zone in which the player is currently in.

[edited by - Expendable on January 13, 2004 10:30:35 AM]
E-x-p-e-n-d-a-b-l-e

This topic is closed to new replies.

Advertisement