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.
  1. Last night i had my Xbox and PC running my game.
  2. Neither of them wanted to Host, so they never saw each other.
  3. There is no comment to explain how this system to supposed to have someone start as a host.
  4. I ran over the code many times and cannot see how a machine can start out as a Host.
  5. So i debugged into the Xbox and told it to host.
  6. Then the machines connected and i believe swapped scores.
  7. 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
I hope this new method will make the system more dynamic about hosting or searching. Resulting in faster connections to other people.. Of course for my testing i will have to use smaller numbers to simulate. If it lokos like it works, then i think i will head to playtest.

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

No comments:

Post a Comment