Save medals and unlocked rooms
UtopianGames
Member Posts: 5,692
Hi Guys,
I have started on Bumps and wondering if for eg i have 20 scenes/rooms with gold silver and bronze awards and each room is locked or unlocked is it possible to save everything in one go or will i have to save unlock room 1 unlock room 2 gold medal room 1 silver medal room 3 etc etc.
I would love a save game that saves everything! but cant seem to find it or even think it exists,
Darren.
I have started on Bumps and wondering if for eg i have 20 scenes/rooms with gold silver and bronze awards and each room is locked or unlocked is it possible to save everything in one go or will i have to save unlock room 1 unlock room 2 gold medal room 1 silver medal room 3 etc etc.
I would love a save game that saves everything! but cant seem to find it or even think it exists,
Darren.
Comments
e.g. Lets say you finish your level. You could have a rule that says when level is finished change save game to 1 and change scene to whatever.
Now you could maybe have a rule that says, if game save = 1, save attribute room unlock 1, room 2 unlock etc etc
Then at the start of your next scene or just after it changes originally you could have it change game save back to 0. That would in theory save all the attributes at once, saves individually doing it each time, you could just implement the change between save to 1 and save to 0 and it would save everything for you.
Basically, you'd set up all of your variables as game attributes. These would be updated as the game is played, e.g WhatLevel would be updated when moving to another level with WhatLevel=WhatLevel+1 (if moving from room to room is linear); or WhatLevel-1 if your going back to a previous room. Other variables would be whether or not you've bronze, silver or gold awards (boolean attributes); whether or not a room is locked, whether or not an item has been picked up, etc.
Then in the Rules of a Save button, you'd use a whole bunch of Save Attribute behaviours, one for each variable. Then in your Continue Game button, you'd use the exact same amount of Load Attribute behaviours, + a way of telling it to go to the start of the level saved.
Because this is really important to my adventure game as well, I want to get round to making an example of Loading and Saving. I'll let you know the link when I do, if you like.
:-)
---------------------------------------------------------------
Spiral Gyro Games
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
This will let you define what medal you have using just one integer variable rather than checking three boolean values. See below:
Integer Medal Value=1
If player gets bronze then change variable MedalValue to 1 - Display "You got Bronze!"
If player gets silver then change variable MedalValue to 2 - Display "You got Silver!"
If player gets gold then change variable MedalValue to 3 - Display "You got Gold!"
Then you could do stuff like multiply the level score by the number so you can actually change the score the player gets based on what medal you get:
Change attribute level.score to level.score*MedalValue
Getting a bronze medal will therefore give you the normal score for that level. (score multiplied by 1)
Getting a silver or gold will multiply your score (which you couldn't do without more mucking about with more variables - score multiplied by 2 or 3 depending on medal).
Hope that helps. I've been digging deep into scoring mechanisms for 'Project K' in an effort to increase replayability!
Cheers,
QS
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
:-)
---------------------------------------------------------------
Spiral Gyro Games
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
I also have a bronze, silver, gold medal system and I have that running the exact same way that QS hinted at with integer variables. Then when the player beats the stage it displays the appropriate medal.
Both work great.
/hears your head rattling
/steps away, slowly...
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
I was more amazed that I managed to figure out something and it was done along the same lines that someone else had done. I must be paying more attention in class lately.