tlaero wrote:It's pretty obvious how the state is encoded then. People would be able to reverse engineer it and send themselves to any part of the game with any score they'd like. Also, in your game, you have so many variables, that the state string would be really long.
With 2, you can trim it down to the couple variables that need to be carried over to the next game.
Which do you need?
I've been flip-flopping a bit about which one I need. Originally I thought the scenario 1, full savegame replacement, but the more I think about it, the more that seems like overkill. Unfortunately, I painted myself into a corner with the complexity of the game. I don't regret that complexity, but if I were to do it again, I would make it much less complex.
What I really need is a bridge from Act 1 to Act 2. I doubt savegames will survive the timing gaps. The Act 2 game will really be Act 1+2 together and will be a seamless experience. Likewise, Act 3 will really be Act 1, 2 & 3. This concept is important because it means that things like earned achievements and sub-achievements need to carry over, along with a subset of the actual gameplay variables. I doubt many people will want to extensively replay Act 1 once Act 2 comes out.
If I beat my head against it for a week or two, I'm pretty sure I could figure out how to loop through the three variable arrays (Achievements, Sub-Achievements, and Game), and build them into a simple string. More difficult for me is reversing that and reloading variables, especially since game variables are integers rather than binary like (sub)Achievements. I could probably figure out some kind of marker between variables or something to handle that but I'm hoping for a different solution.
By different solution, I'm hoping someone knows of a relatively easy way to encode and/or compress that information to make the strings shorter and easier for the players. I'm not particularly worried about reverse engineering, If someone wants to do that, more power to them, they can play the game anyway they want. I don't want that to be easy for them, but also don't want to go through the effort to purposely obfuscate and mislead. The goal is more compression of the data for ease of use. My thoughts originally went to bitwise, but all I really know about bitwise is that it exists. I have no understanding of how to use it, or even if it is a good option here.
It may also be a good idea to be able to export game variables, and achievements (including sub-achievements) separately. Achievements are binary, so may be easier to do, and if anything is encoded somehow, It should be these. Game variables are integers, but not as important in my mind to obfuscate.
Finally, I wonder if I am mentally capable of writing a post less than 250 words. Luckily I type 75 wpm, but still....

Thanks for your patience to my rambling everyone!
Wolfschadowe