Showing posts with label jwatte. Show all posts
Showing posts with label jwatte. Show all posts

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

Tuesday, April 27, 2010

Global High Score Component issues

After my rant last night, I thought I should bring it back down to what I am doing and not what other people are not doing. See what I did there ?

Anyway, I got the Highscore component into the game real fast. then once it compiled I called it to set it up etc. all went well, and fast! That was last night.

Tonight I am a little baffled. I thought I had to sign up for two Creator accounts to do some network testing. After many issues I found that I was not handling a local profile that had no online permissions. Ok, should be easy enough. so I set about creating another persona for me to test with. Now just so's ya know. I have two PC next to each other, as well as the Xbox. I figured I could just test between the Two PCs. Well NOOOOOOooo you cannot. Unless you have a live account. So i got one. Then i paid the money and made it golden and shiny. Still no love. It appeared I was now required to make the new Gold account a CC or creators premium account.

While I was studying this though I found a couple of posts in the XNA forums (great place for information or to help others out ya know!) These posts said I could use a Local profile on the PC. Woohoo! Cha-ching I am gonna save some money! Yeaaahhhaw!

Then about 40 minutes of playing with code and otions etc later, i am baffled. I cannot get the Xbox and PC to see each other through the systemlink. The Xbox thread seems to give up on looking for people to join shortly after it starts. Now this is not my code, so is still a little hard to work with. But it has been used in a number of games already. Why does it not work for me. And while we are at it, I do not understand how these machines can ever get to see each otehr anyway. The code requires a Host and a finder. Then when matched you can share your scores. However From what I have seen of the code and the print statements, neirther machine ever goes into Host mode. Hmmm, That could be an issue, but could be one of many.

At this point I might just cough up the money to have my two PCs connect to each other. But I don't know. I would rather buy another piece of music for the game tbh.

If anyone has any suggestions or Helpful advice. I would love to hear some. I have of course posted in the forums where otehr people have said that they are having success with this.

So it is with heavy sadness that I now go to Bed.

Sleep well y'all, I am sure I won't with my mind swimming with network connectivity possibilities.

g'night

Monday, April 26, 2010

Global High Scores Required now

I have been in Debate about this subject with one of my good friends. The question comes down to 'Is it worth the effort to put in Global High Scores?'

This is indeed an interesting question. One i have thought about a lot. People have had real trouble with this stuff. To be honest it is a pain in the butt. However... I love knowing just how good I am at an Arcade style game. That is where I come from. I loved having the top score or Scores on the arcade machines at my local arcades. I worked hard for that achievement. It means much more to me today than the achievements we can all get in WOW or on the Xbox etc.

So the work IS worth it in my mind. I of course do not know exactly how much work it is. J.Watte has produced a nice component for the use of XBLIG folks. Very very nice of him i have to say. Though i do not like components. They like to work in a nice rigid way.. This is the issue I face. I was looking over the high score component and deciding to rip out all the network connectivity code and just put the rest of the swapping code in myself. This I am sure I can do. However it looked to be a nasty and large job. what to do eh ?  I was getting frustrated.

Then it HIT me!
I would just write a nice simple transfer function. This function would translate my highscore code to the one that the Global High Score table uses, and back again the other way. I reckon this is brilliant and will allow me to keep my custom tables, but still use the generic one that J.Watte has written. (have i mentioned he Rocks?).

So that is my plan. I will write more when I finally get to attack it this week.

G'night