Visual basic game creation

Status
Not open for further replies.

NoNeedForAName

Beta member
Messages
4
I'm trying to create an RPG-like game in visual basic. I'm making a separate form for your character's statistics and equipment that can be brought up at any time, and I have a few questions.

1. Saving a game. I need to know if I can save all the variables in the form to some kind of document so I can "Load Game" and bring back the same character that was saved before.

2. After switching to view the form with the characters stastics, I need to be able to switch back to the last form I was on. Is there a way I can set the frmForm.show as the last form I was on?


Sorry if these questions seem fairly stupid, I just recently learned visual basic and I think it's probably the most useful language I know so far. I'm really excited to start learning more!!

Thanks in advance!
 
For the saving and loading you can use a ".INI" file (a configuration file) for nice and neat examples go to http://www.planet-source-code.com/

For the second thing use a string to hold the name of the form you was on it. And use a "If" command here is an example:

Private Sub cmdBack_Click()
If strLastFrm = "frmSomething" Then
Me.Hide
frmSomething.Show
End If
End Sub
 
Hey thanks alot! I'm reading up on creating these .INI files (i know i've used these somewhere before but I can't remember where) and hopefully I will be able to get it. As for the second part, I'm glad you brought that up because I totally missed it, it seems so easy now. I appreciate it!
 
You could also use something like RPG Creator 2k3. When I'm at home I'll upload it for you if you want.
Also, just pass the current form as a parameter to the second form, then you'll have it as a variable to work with.
 
Status
Not open for further replies.
Back
Top Bottom