Page 1 of 1

Saving state of levels possible?

Posted: Wed Oct 26, 2005 3:04 pm
by ZenBudha
Not sure on where to post this but just wondering if it is possible to save the state of each level as it was left by the player?

Basically lets say I seperate rooms ala Resident Evil. So you get a little load in between each area. Yet lets say a player walks into a room and picks up a pistol entity. Then leaves and returns.

How can I save the state of that level so the next time the player enters the level the pistol is no longer there?

Or vice versa if the player drops something in a room, and later returns for it how to make it still exist where it was dropped?

Posted: Wed Oct 26, 2005 4:18 pm
by Jay
there is no need for saving. Just make two seperate rooms in one level and use the Teleport Entities to teleport the player.

--------------------------------------------------------------

If you really need the saving(for SaveGames or LevelChanges) i think it might be done with NOT-LogicGates+ATTRIBUTE-LogicGAtes+SpawnTriggers for AttributeEntities. Though this only works for things you can only have one time, like weapons.

I mean:
If the player does not have the ATTRIBUTE of the AttributeEntity, then the Attribute-LogicGate is off causing the NOT-LogicGate (that uses the Attribute-LogicGate as trigger) goes on. Then the NOT-LogicGate is used as the SpawnTrigger of the AttributeEntity, which means the attribute is spawned.
If the player has the attribute everything is the other way around and the the attribute is not spawned.

Posted: Wed Oct 26, 2005 10:04 pm
by ZenBudha
Well the idea being to be able to raise the detail by seperating each area into seperate levels. Thus keeping fps up as well as graphic quality.

Unless I built every area into one level all spaced out from each other and teleported the player all over the place. I don't think RF would like loading or compiling that too much.

Posted: Thu Oct 27, 2005 9:48 am
by Jay
well i think one big loading time at the beginning is still better than have a loading time every time you enter a house (you can try it...after five minutes it nerved the heck out of me!)
Fps won't go do down because of the Vis routine of the compiler(at least in the end-compile with Full Vis)
Compile times may be an issue but i think when you compile 30 levels instead of one big level you will get the same amount of time just because you have got to open every single level and then for the end-compiling with full Vis you've got to sit next to the computer 3 days(or it will take you 5 or 6 days) and wait until one is finished then start the next, while with the big one you just go to bed and wait 3 days.

Seperating huge areas into several levels is a good idea i think, but seperating houses from outside is just too much, i think.

I am just saying my opinion, you don't need to share it.
When you need it you can try the tip i gave you for the unique items.

Posted: Sun Oct 30, 2005 10:54 pm
by Lupus
You could use a script that manages spawn triggers for each area... It'd take some work, but it's possible. You'd have to store the entity states in the attributes to preserve them between loads... When the script starts it'd check each entity state, and then spawn it if it still exists.

Posted: Wed Dec 07, 2005 12:11 pm
by Guest_Jay
how do you check the entity states?

PS: I am using the computer at school.