Cogito World State - resource for consistency between levels #315
Phazorknight
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey everyone,
I've encountered this in a different game recently and was wondering if this should be a built-in Cogito feature, something that I'm simply calling World State
Let's say you have two level scenes:
Headquarters_Interior
andHeadquarters_Exterior
. And then lets say in theExterior
level scene, there's lit up sign. In theInterior
level scene, there's a switch in the basement that cuts off power to the building. Now when you go back to theExterior
level scene, the sign should be dark, because the building power is off.My idea for this would be creating a
CogitoWorldState
class that's a custom resource that gets managed per save slot (similar toCogitoPlayerState
), except in this case, we don't know exactly what data the user needs to save.I haven't tried this at all, but in my head I'd approach it like this:
Create a tab in the Cogito Editor tab called
World State Data
Create a simple interface that lets the user create a new
WorldStateData
resource (.tres)Let the user add which kind of data/variables the WorldStateData resource can contain (keeping it maybe Strings, bools and ints )
Now in game runtime, if there's a WorldStateData present, it's contents gets saved/loaded as a state resource file as part of each save slot. My hope is that we can just write all variables present in the WorldStateData into a dictionary and then save/load that.
Thoughts, ideas, critiques?
PS: This would be for after the 1.0 release.
Beta Was this translation helpful? Give feedback.
All reactions