How to load data for specific level at runtime?
Posted
by
Siddharth
on Game Development
See other posts from Game Development
or by Siddharth
Published on 2012-06-20T13:27:18Z
Indexed on
2012/06/21
3:26 UTC
Read the original article
Hit count: 197
I'm trying to create a game with many levels loaded from XML files. In my game I have many objects in each level.
At present my game contains 20 levels, and I load all the textures at once on startup. But I think the correct way to do it is to only load textures used in the current level. I don't know how to do that. So please explain this by providing some example code.
At present I create a class for each type of entity by extending my Sprite class. This subclass loads the appropriate image. I know this is not the best way to do things.
Basically I want to know how to load large levels efficiently in Andengine. What is the proper method for loading textures, level data and background images from files when the level is run?
© Game Development or respective owner