Hi Folks,
I'm just getting started using the Irrlicht engine and I want to use it for
displaying multiple maps sequentially (like leaving one level and
entering the next one which is a different map).
Now, I have looked around but haven't found any solution other than
creating a new IrrlichtDevice and doing all the initialization stuff over
and over again. This, however, does not appeal to me because it doesn't
look nice and I have to initialize values that do not change.
Does anyone know how to load another (by the way: BSP-) map in an
elegant way?
Regards,
D.
Loading multiple maps sequentially
-
- Posts: 386
- Joined: Thu Sep 25, 2003 12:43 pm
- Contact:
I think I know this one. Have the trigger in place ( IF, WHILE, whatever works ) and unload the device:
Then start again from after you have initialised the drivers ( I think ), tell it to load the the new map, probably give a load screen if it is gonna be long, and then initalise the device again loading the new map. I think that's right, that's what I was planning to do.
Code: Select all
device->drop();
What you want is removeChild, not delete mesh.
As far as elegance, that's the iffy spot. Games like HalfLife and Red Faction have you hit a spot and load a map that would be a continuation. At the swapping point, there is a little stub of the next level that you can't be at from the previous level. This gives the illusion of seemless movement.
Code: Select all
smgr->getRootSceneNode()->removeChild(NodePointer);
Crud, how do I do this again?