I was just wondering if anyone has any ideas on the best way to achieve this in a game.
I want the player to be able to save their game, so they can come back and continue it later. However, if they die, I don't want them to be able to just load up the saved game again like nothing happened - death should be permanent.
The obvious solution would be to just delete the saved game file when the player dies, but then what's to stop the player looking in the game folder and creating copies of the saved game before they die?
OldManClayton: Sorry, could you elaborate on those please - I don't really understand. How could you store the info "in the game" without losing it when the player quits?
Simon Kubisch: It won't be an online game, so the server idea isn't really an option. I think a lot of people don't like games leaving random files all over their harddrives without their consent.
I've played games that do it very effectively, so they can tell if the file you're loading is a copy and not the original. "Critical Mass" for example - I was devestated after working my way up to Admiral, only to be killed by a fluke hit to my ejector pod...
Is there some way to read the "time & date modified" or "time & date created" of a file in mmf2? Maybe then I could store the date in the file somewhere and check they match? Or can you edit the "date modified" easily from windows? That would make it useless.
I've played with the concept of permadeath, but then I realized its a pain in the ass for the player. What if there's a bug in your game that causes the player to die instantly for no reason? You're basically saying, "Screw you, restart your game from scratch," for something that's entirely YOUR fault. Punishing the player for something they didn't do is bad game design.
Don't want people to save/load to "cheat" your game? Don't cheat them out of your game with permadeath. Instead, consider options like designated save points that are few in number, like at the beginning of a level in a platformer or only in the hotels of large cities in RPGs.
How about having a setting in the save game file that when set at, for example 0, nothing happens. However, when a player dies the setting is changed to 1 automatically saves progress. From then on whenever that save game file is opened the setting switched to 1 will automatically send the player to a game-over screen?
Let's assume you have a .INI file with all the saved data.
For example :
Then if you want permadeath, you can do something like this :
+ Number of lives of "player1" reach 0
° Set ("File.INI", "Save01", "Level") to 0
° Set ("File.INI", "Save01", "Lives") to 0
° Set ("File.INI", "Save01", "Points") to 0
This way you have erased all the data in your INI file.
If you need more specific help for your situation, just ask
All that I see is the years...
Assault Andy Administrator
I make other people create vaporware
15th October, 2008 at 12:01:54 -
If you want to get really pedantic about it you could use the binary extension to slap the MD5 of the savefile onto the end of your exe. Then when you start the game check the MD5 of the save file against the one stored at the end of your exe. Most people wouldn't guess to copy and backup both the exe and the save file.
But I don't really like the idea of permadeath in the first place
ok, thanks a lot everybody - I should be able to come up with something using one or more of those ideas.
I agree that permadeath isn't good in most cases, but sometimes it is appropriate. Generally, if the game doesn't have a specific long-term goal (and especially if there are a never-ending supply of randomly generated levels), or if the goal is deliberately so hard to achieve that most players won't be able to, then permadeath is a good idea. Imagine if you could keep loading saved games in Tetris - it would go on forever; however, it would still be nice to be able to save your game, because let's face it - tetris does get quite tedious after a while. Permadeath is also one of the defining features of a "rogue-like".
Adam Phant: I'm certainly hoping that there won't be any bugs resulting in "unfair" death, so I'm not concerned about that. I don't think it's cheating the player.
Permadeath in the old Apple II game Deathlord was really brutal but maybe you could do the same type of thing. As soon as one of your guys (or THE guy) dies, make the game save instantly. You could also alter one or two variables to that same save file so that if the person tried to re-load the thing it'd detect the guy had already died and refuse to load the information. You could also do funny things like make the player's max HP equal to 0 when the die.
I don't know, but it shouldn't be too hard.
"Del Duio has received 0 trophies. Click here to see them all."
"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"
DXF Games, coming next: Hasslevania 2- This Space for Rent!
I think you might be missing the point a bit. The player could still just open up the game folder in the windows explorer, find the saved game file, and make a copy of it every now and then before they die. Then, if they do die, they just overwrite the existing file with their copy.
What I need, is a way to check the save game file is an original and not a copy.