XNA Essentials

Game Programming for Xbox 360, PC + Windows Phone

NAVIGATION - SEARCH

How to display High Scores

Thanks very much for the book (I own it and it has been a great help) and the website.


Had a real beginner question regarding the High Score tutorial - 


What is the best way to display the scores as a list in game?


Thanks for any help you can provide -

drfate1 - Friday, September 18, 2009 @ 9:15 PM

Re: How to display High Scores

Glad you are enjoying the book. If you are using the 1.0 version of the book, you can find detailed information in Chapter 22 under the Creating the High Score Screen. If you are in the 3.0 book, it is in the same section, but the chapter is 24.


Ultimately, the displaying of the data is the easiest part. You just have to iterate through your list in memory (that you retreived from storage) and draw it to the screen just like any text with the spriteBatch.DrawString method.


Handling the Storage device itself has changed from the 1.0, so if you have that book it isn't up to date. The high score tutorial I have on my site is also out dated and I plan on correcting that soon. In the mean time, Nick Gravelyn has great information on the Storage device. So if you actually need help with the storage device and not just displaying the high scores, definitely check there. Updating the tutorial on this site has moved up my priority list, so hopefully I'll get to that really soon.


If you have a specific question about something that is not working, please let me know.


Hope this helps,


Chad

Chad Carter - Monday, September 21, 2009 @ 12:00 AM