Results 1 to 3 of 3

Thread: game help

  1. #1
    t420h
    Guest

    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

  2. #2
    Junior Member
    Join Date
    Oct 2001
    Location
    Gränna, Sweden
    Posts
    23
    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.
    Bye

  3. #3
    Hyperactive Member
    Join Date
    Aug 2001
    Location
    The Dark Side of the Moon
    Posts
    448
    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
  •  



Click Here to Expand Forum to Full Width