Click here to Skip to main content
15,886,873 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello, i have created a GUI game using vISUAL C# and at the begining of the game the user is required to enter their name and then saves it, how do i save user input?
secondly, the name that was saved at the begining of the game must then be used to represent the score of that player. how do i do that?
Sorry, quite new here..
Posted
Updated 1-Sep-11 5:28am
v2

There are 2 common ways of doing this -

1. create a database and when the player enters the username it enters it into the db and then at the end of the game the score updates and gets posted into the database alongside the name.

2. Read the players name and score into a file(excel,word etc) and then at the start of every game the file is read and the usernames and scores can be used as a "top 10" or something of the sort.


Dan
 
Share this answer
 
Comments
morojele 2-Sep-11 14:26pm    
thanks Dan
Dan is right. I would opt for the database solution though, because this could scale to multiple users. You could then keep a "high score" tally accessible to all users of the game.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900