Saving entity positions

Blitz3D Forums/Blitz3D Programming/Saving entity positions

Chimeara(Posted 2004) [#1]
Is there an easy way to create a save file that stores the position of all the entities that exsist in the programe other than returning all the entity HD locations (d:\models...) and their last location in the 3D space of the programe (x,y,z).


Bot Builder(Posted 2004) [#2]
hmm. I would say the easiest way would be to create a world pivot, and parent everything you want saved to it. then, cycle through its children, and its childrens children(etc.) and save the positions or whatever other data they might have.


jfk EO-11110(Posted 2004) [#3]
Unfortunately there is not Image save and restore function. It would also be hard to write one since Blitz uses Ram, Vram and has to initialisze a lot of things.

Savegame Functions can become pretty complicated. It is something you should implement from beginning on. This will save you a lot of headache.

You can also keep an array in memory which will store all important information parallely to what you have coded so far. Of course this Array must be able to store all kinds of stuff: meshes, sounds, images, whatever, parent-relations etc. Then you need to write a list of all Variables, Arrays and Types you need to save as well.