|
-
Nov 6th, 2001, 12:50 PM
#1
game help
i am trying to make a space invader type game, i have an image on a picture box, and i can movew it left and right, but i want to know how to, when spacebar is pushed, have like a pixel, or bullet type thing come out, oyu know, and shoot, but it wont work , please help any way that you can
thanks
-
Nov 6th, 2001, 02:28 PM
#2
Junior Member
You should have some picboxes (depending on if/how many shots can be there simultaneously) and set them invisble. Move them along with the ship. When you fire, make one of them go visible and move it up the screen. About the code for this... I don't know how picboxes work and I'm lazy, so I won't test it here but it's not that hard.
-
Nov 6th, 2001, 03:26 PM
#3
Hyperactive Member
It's game theory.
You have to keep track of it in memory, and plot a course for it. You'll probably only need the X and Y coordinates of it, and it's increment factor.
This method requires you redraw everything on the form at a certain frame rate.
After a certain time take the X and Y memory coordinates and apply them to the pixel drawing function.
Form1.PSet (X, Y), color
And clear the form
From1.Cls
And redraw everything.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|