- Home /
Best way to store and load levels for a side scroller.
Hi guys,
I am making a Major Mayhem-style side scroller game for iOS. All the levels have to be pre-defined. I was thinking it would be pretty wasteful to load the entire level at once. An alternate was to break the level down into smaller chunks of screensize/2. Keep 4 of them in memory at a time, load new ones at runtime as the camera moves forward and dispose off the ones which are left behind.
However, its my first game and I dont have much experience. If anyone has previous experience about it, I'd love to hear your thoughts and suggestions.
Regards.
Answer by Bamboy · Jan 15, 2013 at 09:36 PM
If its your first game and you don't plan on doing much with it in terms of selling or whatever, then I wouldn't worry about optimization too much. (Unless it causes serious performance issues) What you could do is build your levels manually and then write a script that saves the transforms of all the objects to a list or array. Then when you want to load the level just have it instantiate an object for each transform location in the array. Really though, unless there is some major issue you are having, just load the levels from individual scenes.
Your answer
Follow this Question
Related Questions
Call function after Level loaded 1 Answer
How to make an exit level trigger? 3 Answers
How To Determine What is Causing Slow Level Loading 0 Answers
UnityAds and LevelLoad Problem 0 Answers