Should i Doom my latest playtest version by saying that this will be it's last time in there before Peer review.. Yeah i guess i just did.
There is a very large discussion going on about high score sharing on Xblig at the moment. I have several comments in there myself. There are a few groups of Developers or opinionators on every side at the moment, and no clear winners so far. Although i feel that some posters feel they have won or are winning something. Mostly i just think we are just headed for more rules, more restrictions and a lot more time in development and also review.
So remember, it's all for the children. ;)
I am done with this topic for now, though i expect to ruffle some feathers with A Shooter as it does indeed have High Score Sharing. and not in a way that some of these Peers feel is acceptable. I will take my chances and see what goes down. I will not break the rules for my game, however i will argue what those rules should be.
G'night
Showing posts with label sharing. Show all posts
Showing posts with label sharing. Show all posts
Saturday, September 11, 2010
Tuesday, August 31, 2010
High Score Sharing - Done
Yes, you read that right. It is now done. Working really well and the hiccups are very minimal. I cannot say entirely removed, i think because of network session underlying code can do that. However the stuff on top appears to be clean and working.
I found my bug. I needed to make sure i waited a second or two before terminating the session from the Host. For some reason this caused the ElapsedTime field of Gametime to get really really small. As there is a timer on the sharing code to only do stuff every so many seconds, then it basically stalled me out. Once i sent in a fixed time delta (1/60th) it updated fine as well. so with both these things fixed it all works very nicely.
Testing it has taken some time. I am methodical and commited to doing that part properly, so i have left it running over several hours to see what it would do. And it works great.
The last thing i added was a Previous Hosts list. This is a class that will store anyone you connected to (the host). Then there is a timer on them. This effectively causes a timeout from matching up with the again. I might set this at 4-5 minutes, i am not sure. I could see this being game dependant though. for examply 10 minutes playing my game is quite a lot, but 5 minutes is low. So i could set my previous Host expired timer to soemwhere between those figures.
I intend to share this code once i have finished tidying it up. there are plenty of comments already, but some of the names are a bit wrong. Once it is done i shall make it open source. Oh.. and it is about 600 lines of code (including comments and lots of debug messages.
G'night
Tonight i go to bed a much happier man. Next up is encrypting my save file.
I found my bug. I needed to make sure i waited a second or two before terminating the session from the Host. For some reason this caused the ElapsedTime field of Gametime to get really really small. As there is a timer on the sharing code to only do stuff every so many seconds, then it basically stalled me out. Once i sent in a fixed time delta (1/60th) it updated fine as well. so with both these things fixed it all works very nicely.
Testing it has taken some time. I am methodical and commited to doing that part properly, so i have left it running over several hours to see what it would do. And it works great.
The last thing i added was a Previous Hosts list. This is a class that will store anyone you connected to (the host). Then there is a timer on them. This effectively causes a timeout from matching up with the again. I might set this at 4-5 minutes, i am not sure. I could see this being game dependant though. for examply 10 minutes playing my game is quite a lot, but 5 minutes is low. So i could set my previous Host expired timer to soemwhere between those figures.
I intend to share this code once i have finished tidying it up. there are plenty of comments already, but some of the names are a bit wrong. Once it is done i shall make it open source. Oh.. and it is about 600 lines of code (including comments and lots of debug messages.
G'night
Tonight i go to bed a much happier man. Next up is encrypting my save file.
Friday, August 27, 2010
Xblig - A Shooter and more
It has been a very busy bunch of days for me this week. I have been very productive though and hopefully soon Xblig playtest will see some of the work i have been doing.
I will start with A Shooter...
I have been rewriting the highscore sharing class, even though it works in my game. The reason for this is simply because i cannot score share while actually playing my levels. Due to the massive garbage collection issues it stutters my side scroller so badly for a second or so, you will mostly die. That would be unfair and go against my friendly none cheating game policy. So i have rewritten the component to make it so there is no garbage collection (ok, there is a teeny tiny bit). Now i knwo i could have updated to the version2 component, but to be honest. When i lokoed at it, it was huge. I don't write huge anything. I write simple small amounts of code. So i have it mostly working and tonight when i have obtained my friends Xbox, i will be testing the score sharing once more. Efficiency is the name of the game here. A couple of frames hiccup ill be ok, but any more than that and i will have to work on it some more.
I think that after i have gotten this all working i will spend a bit of time tidying up the names of some of the variables and then put it here on the blog for people to use or reference if they want. The reason the names of variabels are a bit odd in places is because they were there while i was cutting the code base down. After it works will be the time to name verything to be more explanatery.
Tomorrow i will post about A Dreamland Chronicles Game update and the idea of Episodic content.
Laters
I will start with A Shooter...
I have been rewriting the highscore sharing class, even though it works in my game. The reason for this is simply because i cannot score share while actually playing my levels. Due to the massive garbage collection issues it stutters my side scroller so badly for a second or so, you will mostly die. That would be unfair and go against my friendly none cheating game policy. So i have rewritten the component to make it so there is no garbage collection (ok, there is a teeny tiny bit). Now i knwo i could have updated to the version2 component, but to be honest. When i lokoed at it, it was huge. I don't write huge anything. I write simple small amounts of code. So i have it mostly working and tonight when i have obtained my friends Xbox, i will be testing the score sharing once more. Efficiency is the name of the game here. A couple of frames hiccup ill be ok, but any more than that and i will have to work on it some more.
I think that after i have gotten this all working i will spend a bit of time tidying up the names of some of the variables and then put it here on the blog for people to use or reference if they want. The reason the names of variabels are a bit odd in places is because they were there while i was cutting the code base down. After it works will be the time to name verything to be more explanatery.
Tomorrow i will post about A Dreamland Chronicles Game update and the idea of Episodic content.
Laters
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.
G'night.
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.
Subscribe to:
Posts (Atom)