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.
G'night.
Showing posts with label global. Show all posts
Showing posts with label global. Show all posts
Friday, May 21, 2010
Wednesday, May 19, 2010
Global High Score Component Issues
So here i am now getting round to putting in the Global Highscore Component by J.Watte. I tried once before but could not get my machines to talk to one another. I was trying the systemlink method so as not to buy a second Live account and creators club premium membership. So let me talk about this thing for a short while.
So far I have not really been able to find a nice resource or help for this component. Yeah, i know components are supposed to be drop in and work. However with this one that is not strictly what a dev will want to do. For example I do not want the high score savin that it does. I mean, shouldn't it just do global high score sharing? Not take over the saving of data from your game? I think it could be nice that it is in there for some people. Definitely not for me.
So i removed the high score saving code from the component. This was actually quite easy to be honest. I am pretty sure a lot of developers are going to do this. I have a good solution for memory card savings and it is a much more fancy and featured one than this component supplies. however removal was not just set a define at the top of the code page and it would remove the saving stuff. ???? At this point i am wondering why not? Why is this 2 part component not able to be switchable?
Second thing i find bad is the fact there are hardly any comments. I grabbed this as so many people are using this in their published games. Therefore it is already tested in the field of battle. If i wrote my own it would require a lot more testing. However using this is a bit like wandering in the dark. I just hope i dont run into any walls. so far I have run into a wall though.
Third thing.. I managed to glean from a number of XNA threads that it should be possible to test the sharing between an Xbox and a PC with only 1 live gold account and creators club membership. This is actually feasable by changing a few lines of code and setting up system link and removing the signed in players privelage test. Again this is NOT wrapped in something that could easily beswitched by a define. It is Also not commented. who produces code for the comunity and doesn't comment it up as much as possible?
I know it sounds like i hate this code or J.Watte. that is not the case. I do however feel like the component is really quite unfinished. What we really need is a central place that has actual help for it. But then would anyone care but a few of us devs? I am not sure.
So i finish this piece with an update to where i am right now.
So todays job is either to rewrite the host/search methods, or figure out how all those published games have worked up till now. BAH! I really thought this was gonna save me some time, so far I think it is accumulating into more time than i wanted to spend.
My new method of Host or not will be time based.
Thanks for listening, and if anyone has any bright ideas, especially on how hosting works, please let me know.
NOTE: I do believe the not hosting problem is somehow related to my removal of the saving code portion. I will add more information as i get it.
laters
So far I have not really been able to find a nice resource or help for this component. Yeah, i know components are supposed to be drop in and work. However with this one that is not strictly what a dev will want to do. For example I do not want the high score savin that it does. I mean, shouldn't it just do global high score sharing? Not take over the saving of data from your game? I think it could be nice that it is in there for some people. Definitely not for me.
So i removed the high score saving code from the component. This was actually quite easy to be honest. I am pretty sure a lot of developers are going to do this. I have a good solution for memory card savings and it is a much more fancy and featured one than this component supplies. however removal was not just set a define at the top of the code page and it would remove the saving stuff. ???? At this point i am wondering why not? Why is this 2 part component not able to be switchable?
Second thing i find bad is the fact there are hardly any comments. I grabbed this as so many people are using this in their published games. Therefore it is already tested in the field of battle. If i wrote my own it would require a lot more testing. However using this is a bit like wandering in the dark. I just hope i dont run into any walls. so far I have run into a wall though.
Third thing.. I managed to glean from a number of XNA threads that it should be possible to test the sharing between an Xbox and a PC with only 1 live gold account and creators club membership. This is actually feasable by changing a few lines of code and setting up system link and removing the signed in players privelage test. Again this is NOT wrapped in something that could easily beswitched by a define. It is Also not commented. who produces code for the comunity and doesn't comment it up as much as possible?
I know it sounds like i hate this code or J.Watte. that is not the case. I do however feel like the component is really quite unfinished. What we really need is a central place that has actual help for it. But then would anyone care but a few of us devs? I am not sure.
So i finish this piece with an update to where i am right now.
- Last night i had my Xbox and PC running my game.
- Neither of them wanted to Host, so they never saw each other.
- There is no comment to explain how this system to supposed to have someone start as a host.
- I ran over the code many times and cannot see how a machine can start out as a Host.
- So i debugged into the Xbox and told it to host.
- Then the machines connected and i believe swapped scores.
- I added some more debug output, but I will add more as I think this is something else that is missing from the component.
So todays job is either to rewrite the host/search methods, or figure out how all those published games have worked up till now. BAH! I really thought this was gonna save me some time, so far I think it is accumulating into more time than i wanted to spend.
My new method of Host or not will be time based.
- spend 5 minutes Hosting + everyone that connects to me will extend this by 30 seconds
- spend 5 minutes searching + everyone time i connect i will cut the time by 30 seconds
Thanks for listening, and if anyone has any bright ideas, especially on how hosting works, please let me know.
NOTE: I do believe the not hosting problem is somehow related to my removal of the saving code portion. I will add more information as i get it.
laters
Subscribe to:
Posts (Atom)