JeniferCaperman
New member
- Joined
- Mar 16, 2003
- Messages
- 1
I am new to VB.Net. As a self-tutorial, I decided to create a simple text based puzzle game to teach myself about VB.Net, objects, forms, etc. I figured that I could use the base knowledge I have (minor stuff from VB6), and when I get stumped, just research the problem I dont understand. The game itself was only intended to be a very small project (or is that now solution in VB.Net?); just enough to get my feet wet with VB.Net.
The game took off, and has come quite far. I am still new to VB.Net, so most of my code would probably be laughed at by most of you, but I am quite proud of it.
I decided since the game can not be completed in under an hour (unless you already know all the secrets and puzzles), I would like a way for the user of the game to save their game, and then be able to load it at another time.
My question is: would this best be handled by creating a database (which I have no understanding of), or by creating a simple text file(s)? I would rather use a text file, as I do not know a thing about databases.
My game is a very basic VB.Net windows application. Just a couple of forms, and some objects. However, the variables I created are constantly changing, such as the players score, number of puzzles completed, items discovered. I am setting these all to variables in the code, and continuously updating them when a player solves certain puzzles, such as
PlayersScore = PlayersScore + 500
when they solve a puzzle (yes - I already read about the shortcut I could use for this small piece of code - I believe it was += - but like I said, I am doing this as a basic tutorial).
How can I save all these variables (about 46 all together), so that when the player reloads a game, they are prepopulated to the same variable names (such as PlayersScore = 1500), the next time they start up the game?
I tried to search for writing to a text file on the Internet, but all I keep finding is how to take a large amount of text, write it to a text file, than read it back in later. This is not what I need. I need a way to save variables, not a bunch of text.
Any help would be greatly appreciated. Thanks!
The game took off, and has come quite far. I am still new to VB.Net, so most of my code would probably be laughed at by most of you, but I am quite proud of it.
I decided since the game can not be completed in under an hour (unless you already know all the secrets and puzzles), I would like a way for the user of the game to save their game, and then be able to load it at another time.
My question is: would this best be handled by creating a database (which I have no understanding of), or by creating a simple text file(s)? I would rather use a text file, as I do not know a thing about databases.
My game is a very basic VB.Net windows application. Just a couple of forms, and some objects. However, the variables I created are constantly changing, such as the players score, number of puzzles completed, items discovered. I am setting these all to variables in the code, and continuously updating them when a player solves certain puzzles, such as
PlayersScore = PlayersScore + 500
when they solve a puzzle (yes - I already read about the shortcut I could use for this small piece of code - I believe it was += - but like I said, I am doing this as a basic tutorial).
How can I save all these variables (about 46 all together), so that when the player reloads a game, they are prepopulated to the same variable names (such as PlayersScore = 1500), the next time they start up the game?
I tried to search for writing to a text file on the Internet, but all I keep finding is how to take a large amount of text, write it to a text file, than read it back in later. This is not what I need. I need a way to save variables, not a bunch of text.
Any help would be greatly appreciated. Thanks!