creating an array of images, help!!

I am currently in grade 10 but am in a grade 11 computer programming class. For our final project we are required to make a game. I am making a version of Space Invaders but I have a major problem. I need to know how to make the program - when i hit spacebar - to produce a bullet on the screen. I have an picture saved as “bullet” in the same directory. Is there a way to make the program so that when I hit spacebar, the program will withdraw the picture from the file, then put it on the form? My teacher has no idea how to do graphics so it is up to us to find out the answers, and I have been wasting valuable time (the last 2 days) trying to find an answer :confused:

I am using Delphi 3 and I need a code that will, when I press enter, make an image and put it on the screen. I don’t want to have it so I have a series of images already on screen with .visiable := false, I need something that will make a “bullet” appear on screen then start moving up.

What programming language are you using?

I did something very similar in VB5. The best way to get multiple pictures in is a pictureclip, you can look it up on google, and it gives you far more then I can tell you.

Private Sub out_KeyDown(keycode As Integer, Shift As Integer)
If keycode = vbKeyP Then
    Call Pause
End If

Was part of the code used. Replace out_ with whatever object you are using to draw images (Hint: Picturebox) Then check the keycode thats called, using the vbKey* constants (They are somewhere in object browser)

I don’t know if it will help but you could make one “bullet” in a picture box, image box, or your language’s equivalent (if there is one), position it at the ship’s location, make it visible and, while looping, move the picture 1 unit up on the screen every loop. Then, when it hits something, just make the box disappear.
Dunno if it will help.