Challenge Scoring

A New Device Ok, this took a bit of fortitude. In my head I really wanted to serialize my challenge data but I kept putting it off. Mostly because I was not sure how I wanted it to work, literally. This weekend I made the challenges available on a new Gametastic+ device, available from the player glove menu.
By moving it to the player, it saves me from having to figure out how and where I was going to have the challenge start controls. Initially, they were just placed on the walls of the office with a button to start the challenge. I was going to make it a challenge to get to the challenge but decided this would be better. I will probably disable buttons and unlock on player progress, but at this point they are all open on the Gametasic+. This also meant I had to spend a good part of the weekend creating the button graphics for each challenge. The old versions The Saving Challenge, Challenge Saving settings in player prefs stores them in the registry. Not a horrible thing, but I really did not want to go that route, especially since I was saving the data as class objects. My original thought (which I already wrote the code for) was to pseudo serialize with delimited strings and parse them into the Challenge class object. There are three parts to this equation The first is the Challenge class itself. Quite simple with properties like ChallengeName, PlayerName (to allow mutliple player saves, settable in game), and scoring values like best time, last time, best score, last score, etc. The second part is the Challenges class and does most of the work for the challenge objects. Finally, there is the PlayerAttack class. This is the heavy lifter for all attack type challenges. It contains multiple indexed lists (I probably mentioned elsewhere) for each challenges and controlled by index. When a challenge is initialized by index, all of the objects, messages, timers, counters, blah blahr's are loaded from this class. This is where serializing the scoring to a file made sense. The file data is simply one large List built from the PlayerAttack object indexing parameters. My first attempt did not work. I thought I knew what I was doing and tried to wing it, but I was wrong. Well, actually I was right but there was something stupid I was doing.. not the first, won't be the last. I took my time and did some testing by going back to the start. Create a single property object, serialize the data, write to the file.. read the data from the file as serialized objects.. use them and it worked. In a nutshell, when I went back and simply typed out the source code it all began to work. Really don't know what I had wrong, but really don't care at this point. Just imagine my jubilation on my first successful write/read output: playerattack.cs-Loaded: IDX:0, Challenge: Tax Dayz, Player aBitOWhit Completed False, High:0 Last Score:0, Fastest 0, Last Time 0Loaded: IDX:1, Challenge:......... The next step will be displaying it all to the end user. This will be in both the challenge itself and the leaderboard of challenges. This may end up on the device display, since I have nothing on it now. Next will be adding the calculations in the player attack to increment high scores, best times, etc. Time to publish and see if it still actually works on the Quest2. :)