Friday, May 21, 2010

Global Highscores .. Again

Yup i am here to talk about Global Highscores.

The Good news is I got them working. The GREAT news is they are working. Ohh, erm.. i repeateed myself again. Oh well, they are working and good enough for three Yippees in my book.

Anyone notice how i don't capitalize my singular i's? Well it is because my Capitalizer Key is broken. My fingers just don't seem to want to work that way. I have decided that is it is gonna be that way, then so be it.

Back to Highscore sharing. I had in fact made a single error in the removal of the saving code as I suspected. It was just never getting to call Aggregatescores(). That was bad for a number of reasons, and once i added in a simple bool and set it when appropriate, voila! it worked a treat. Well not quite a treat at this point. But was apparently working from the debug output i was seeing. YAY!

Then it was onto the interface code i needed. The reason i ned this is I am gonna maintain my local highscore table, which also has other information in it, like options etc for the local player. However the sharing highscores only needed 3 elements. So a conversion function was in order. In fact it required a minimum of two. One to set the scores correctly in the global system, then one to retrieve them. This in fact took me a lot longer than i would have expected. I blame brain farts and it being late and me still being in pain from my shoulder. Anyway, i got it done, the most time being wasted on how to convert a string back to a number. This was nescessary cos the global system has it's third element be a string, and i have an int.. Well I got the conversion working, and with help from a couple of people on Twitter i managed to convert the stupid thing back. 8 c# web pages and nothing. Twitter took like 4 minutes and i was sorted.. haha!
Oh course today i realised that i could just change the class and not have the message as a string, just have it as an int. HAHA it did make me laugh at my dumbness this morning. So tonight i changed it and it is the best!

Testing the highscore sharing has been a real pain and also has wasted a number of hours. the reason is that the PC i have is running the Xbox version so i can see the output window. It is laso running the local PC version. so that means the runtime game and the debugger again.. Well once i log into windows live on the PC all hell breaks loose and my PC grinds to a halt, or the game does. So i cannot view the highscores on my PC, or even make one, ARGH!

So today i realised that i could seed the PC version with some mock scores etc. this worked freakin great. then for some reason for about 15 minutes the PC was running fast. so i got to see the highscores on both machines. YAY and WIN!

I hope everyone else has success with the Highscore component from J.Watte. It is fine even if a bit spares on comments. However it does work, and works out of the box very well if you do not need to alter it. If you are altering it and having issues, I will try to help ya best i can, pop me a message etc.

One last Note. Thanks to J.Watte for messaging me what he did. That looks like a nice way to go. I like it, though not for this project.


No comments:

Post a Comment