Saving state of levels possible?

Topics regarding Scripting with Reality Factory
Post Reply
User avatar
ZenBudha
Posts: 285
Joined: Wed Aug 17, 2005 6:06 am
Contact:

Saving state of levels possible?

Post 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?
Fear not the textures for the almighty stylus is with thee - Book of Zen
Jay
RF Dev Team
Posts: 1232
Joined: Fri Jul 08, 2005 1:56 pm
Location: Germany

Post 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.
Everyone can see the difficult, but only the wise can see the simple.
-----
User avatar
ZenBudha
Posts: 285
Joined: Wed Aug 17, 2005 6:06 am
Contact:

Post 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.
Fear not the textures for the almighty stylus is with thee - Book of Zen
Jay
RF Dev Team
Posts: 1232
Joined: Fri Jul 08, 2005 1:56 pm
Location: Germany

Post 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.
Everyone can see the difficult, but only the wise can see the simple.
-----
Lupus
Posts: 10
Joined: Tue Sep 27, 2005 9:17 am

Post 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.
Life is the software of reality...
If you think it isn't fair, ask God to hack the code!
Guest_Jay

Post by Guest_Jay »

how do you check the entity states?

PS: I am using the computer at school.
Post Reply