Save and Load Custom Nodes

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
ansu832001
Posts: 95
Joined: Thu Mar 01, 2007 6:39 am

Save and Load Custom Nodes

Post by ansu832001 »

Hi All,

I want to Save a Scene which consists of Custom Nodes and iam aslo applying Textures and other things to the nodes, now my question is how can i save this scene so that it can be reloaded later.

I have searched the forum for this and everybody says "you have to store additional information and like that",but soory i didn't understand it.

I want to know how this can be done and from where to start this process(i mean procedure).Help Needed.

Best Regards.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

You have to write proper serialize and deserialize methods. These store all necessary values into the attributes element they are passed (or get it from there on deserialize). You will have to ensure that your node can be recreated with those values, though.
ansu832001
Posts: 95
Joined: Thu Mar 01, 2007 6:39 am

Post by ansu832001 »

Hi Hybrid,

Thank you for your quick reply,but from different posts which i saw many has to say that Serializing is very tedious rather use another way to save.

Just clearing my doubts about it,Sorry for ignorance.
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

It's not really tedious; it shouldn't take more than 10 minutes to code it in.

The question is whether you actually want to serialise Irrlicht objects directly, or whether you'd be better off serialising your game state some other way and then building the appropriate Irrlicht objects once you've loaded it again. Only you can decide that.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
ansu832001
Posts: 95
Joined: Thu Mar 01, 2007 6:39 am

Post by ansu832001 »

Hi Roger,

But i don't have clear Idea on either,Wanted some inputs from you,iam now little clear on what to do.

Best Regards.
ansu832001
Posts: 95
Joined: Thu Mar 01, 2007 6:39 am

Post by ansu832001 »

Hi All,

Another issue i want to bring to your notice is that in my application i have to bookmark different areas.
i would like to project the requirement this way,

1. I bookmark one area.
2. Perform various operations.
3. Bookmark Again.
4. I click first bookmark,i should load all the things till the first bookmark.
5. when i click second bookmark i should load all the things till the second bookmark.

I am planning to save scene whenever i bookmark and load them when i click bookmark.I fear this will take a lot of time for saving and loading.
Any other way i can do it,or can i speed up the process of saving and loading.

Help Needed.

Best Regards.
Post Reply