TheProgrammingZone
TheProgrammingZone.com
Welcome, Guest. Please login or register.
Did you miss your activation email?
February 07, 2012, 06:17:48 pm

Login with username, password and session length
Search:     Advanced search
Welcome to the TheProgrammingZone.com forums.
219 Posts in 87 Topics by 1333 Members
Latest Member: mherbbartlettz
* Home Help Search Login Register
+  TheProgrammingZone.com
|-+  Programming
| |-+  Visual Basic (5/6)
| | |-+  Need help with a tile based game please
« previous next »
Pages: [1] Print
Author Topic: Need help with a tile based game please  (Read 1306 times)
Corey
Newbie
*
Posts: 1


View Profile
« on: June 06, 2005, 09:26:48 am »

Hey,
Im currently working on a tile based adventure game. I started out with the tile based game example from http://www.homestead.com/vbgames6/down2.html . It seemed to work well, and i made a few maps and worked on other parts of my code such as the character creation and so forth. However my problem is that i have more then one map so i have used multiple forms to switch from map to map. The problem I am encountering is that if I move from Form1 to Form3 it works, but if i move back to Form1 it loads the new map picture but the collision stays the same as the previous map.
IF anyone needs the actual code i am using, reply with an email adress, or use the one given in http://www.homestead.com/vbgames6/down2.html as it is virtually the same, except I am trying to go from one form to another
Thanks in advance,
Corey
Logged
golem
Newbie
*
Posts: 13


View Profile
« Reply #1 on: June 14, 2005, 10:23:13 am »

I don't quite understand what you mean by ' collision stays the same as the previous map'. Are you implying that it is displaying incorrectly (or the more likely you are not displaying the updated form based on actions on Form3).

If it is the latter, you are probably dealing you 'draw the image' routine is only being tripped by the form_load event. So when the form is first displayed, it works ok, but upon returning to the original form (which WILL NOT trip the form_load event) the change is not being reflected, (it would be in the same condition you left it in).

From a conceptual point of view you might want to think of it as follows:
  1) Your 'draw the image' routine needs to be a central routine.
  2) Your 'draw the image' decides what to render based on a shared data structure.
  3) You invoke that routine on form_load (already works. Smiley ), but you need to add other trigger events such as _resize, _gotfocus, etc. to suit as needed based on user  input.

Let me know if that helps. Smiley
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by SMF 1.1.16 | SMF © 2011, Simple Machines
TheProgrammingZone 2010
Site Map