vb6 help: Creating A Game

socialnu2

New Member
Messages
61
Reaction score
0
Points
0
Hi, im interested in getting some help for creating a game in visual basic if you have any resources to help that would be great thanks :)
 

CharlesW

New Member
Messages
9
Reaction score
0
Points
0
There's a great set of tutorials at MSDN. I believe it's called "Upgrade your game," located in a section titled "Coding for Fun" or "Coding4Fun." This is for a sprite based, 2D game, mind you. I reccomend defining a sprite class. Then, you can draw out bitmaps (or some more compressed image format) and load them into an arraylist on start up. There's also an "ImageList" class, but I've had poor luck with it, myself. Collision detection is tricky. You can use graphics.bitmap.getPixel() (please correct me if I have this wrong) to find the location of a pixel, and compare pixels in two sprites to see if they match, but this isn't very efficient. For efficiency, you could instead use x and y bounds to see if sprites collide, but this is inaccurate except for square shaped sprites. To draw the sprites, there should be something (I forget the exact path) like eventArgs.paint(), which you can re-define to draw your sprites onto the form.
As for adding sound to a game, I'm still figuring that out myself.
 
Top