954,510 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Implementing a Score System for Naughts and Crosses

Hi there,

I'd firstly like to thank some of the daniweb members for helping me with my Hangman project. It's finally complete and I have uploaded it on my YouTube. Special thanks to ddanbe, Xcelled194, Mitja Bonca and Momerath.

Right, on to my next project. I'm making a Naughts and Crosses game, multiplayer. I've implemented all the logic, works fine but now I want to add a score system. I can make the game such that for every win, the winning player will get 1 or x amount of points. Now what I need to do is to store the points a long with the player's name in to a file so that when I load up the game, the highest score will be displayed on the main menu.

Like for example when you play games on your mobile phone, you have a highest score on the main screen. So I'd need save the scores to a txt file and then read from that txt file once the game begins. Also, an overwrite functionality would need to be instantiated as the points would need to be updated.

Any tips/ideas?

Usmaan
Junior Poster in Training
63 posts since Mar 2010
Reputation Points: 17
Solved Threads: 0
 

Hi Usmaan! Thanks, we are here to help, if we can :)
Personally, I would not store a high score etc. in a text file, but rather in a resource of the game. In that way they can never get separated.

ddanbe
Senior Poster
3,829 posts since Oct 2008
Reputation Points: 2,070
Solved Threads: 661
 

Ahah, okay. Erm, how would I do that?

Usmaan
Junior Poster in Training
63 posts since Mar 2010
Reputation Points: 17
Solved Threads: 0
 
ddanbe
Senior Poster
3,829 posts since Oct 2008
Reputation Points: 2,070
Solved Threads: 661
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: