What's your way of handling level transition across multiple files?

4 posts

Flag Post

Original Title: Travel downwards to proceed to next level (only 2 levels right now so that switch back to each other). Kong programmers, what’s your way of handling level transition across multiple files? Edit by UG

https://dl.dropbox.com/u/17828135/shooter.swf

What I do is load the file and construct the level on warp. I’m interested in better ways of handling this transition.

 
Flag Post

Interesting question! There are probably several ways to do this. I have a couple of ideas.

Idea One: Load the level, and then load other levels as they appear. On my computer, that appears to be what you are doing now, because there is a pause during level transition. (Either that, or the draw time on my computer is crap.) Pros: Easiest to implement. Cons: Performance issues. Especially on slower computers. And my computer is a bad computer, so I’m kinda talking from experience.

Idea Two: Do what they did in Talesworth (have the second level ready, and then you could get all sorts of interesting effects for the transition. Slide transitions, or whatever you can think of.) Pros: Quite efficient. Cons: You’ll still need to draw a level EVERY time anyway, so is it really going to matter?

Idea Three: Draw a GIANT bitmap that contains EVERYTHING the player will use for a particular part of the map. Pros: Loading levels will be a low-priority issue. Cons: It’s still going to take a long time to load ANOTHER giant bitmap the same size if the player wants to traverse to other areas of the map.

Idea Four: Draw the next level while the player is in one level. But do it in little bits over time. Pros: It saves a lot of time (and drastically improves performance). Cons: You’ll have to keep the player pre-occupied for long enough in one level should you want ample time to load the next level.

 
Flag Post

Depends on the game. Having a clear move from one level to another and loading new content is often fine, and it’s the easiest. For a seamless experience you want to pre-load levels that could be needed, and unload those that are now too far away, as the gameplay is going on.

 
Flag Post

Find rooms that you could possibly get to through the current room- load all of those. I mean direct rooms, so not rooms that you can get to by going into the next room. Draw those but keep them to visible = false until loaded, to save rendering time.