Go to Post Count up all the white space in your code sometime and calculate how much weight it adds. - ChuckDickerson [more]
Home
Go Back   Chief Delphi > Technical > IT / Communications
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 03-01-2005, 13:27
kris_krantz kris_krantz is offline
Registered User
no team
 
Join Date: Jan 2005
Location: canada
Posts: 1
kris_krantz is an unknown quantity at this point
Question 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

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.

Last edited by kris_krantz : 04-01-2005 at 13:01. Reason: adding information
  #2   Spotlight this post!  
Unread 03-01-2005, 13:33
Kyle Fenton Kyle Fenton is offline
GET IT ON!!
FRC #0121 (Rhode Warrior)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 2000
Location: Middletown, R.I.
Posts: 785
Kyle Fenton has much to be proud ofKyle Fenton has much to be proud ofKyle Fenton has much to be proud ofKyle Fenton has much to be proud ofKyle Fenton has much to be proud ofKyle Fenton has much to be proud ofKyle Fenton has much to be proud ofKyle Fenton has much to be proud ofKyle Fenton has much to be proud ofKyle Fenton has much to be proud of
Send a message via AIM to Kyle Fenton
Re: creating an array of images, help!!

What programming language are you using?
__________________
121
Rhode Warriors
NAVSEA/Raytheon/URI/Middletown, Portsmouth, Tiverton, Mt. Hope HS
Quality Robots Since 1996
  #3   Spotlight this post!  
Unread 03-01-2005, 22:32
devicenull devicenull is offline
Robot? We need a robot?
no team
 
Join Date: Sep 2004
Rookie Year: 1234
Location: n/a
Posts: 359
devicenull is just really nicedevicenull is just really nicedevicenull is just really nicedevicenull is just really nicedevicenull is just really nice
Re: creating an array of images, help!!

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.

Code:
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)
  #4   Spotlight this post!  
Unread 04-01-2005, 17:12
patTeam241 patTeam241 is offline
College Student
AKA: Pat Cleary
no team
 
Join Date: Jan 2004
Rookie Year: 2001
Location: Boston, MA
Posts: 54
patTeam241 will become famous soon enoughpatTeam241 will become famous soon enough
Send a message via AIM to patTeam241
Re: creating an array of images, help!!

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.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Capture webcamera images at timed intervals? NoodleKnight IT / Communications 7 12-09-2004 03:42
Cassini-Huygens Images on JPL Webcast petek Math and Science 4 02-07-2004 01:18
Creating Videos Raven_Writer IT / Communications 13 20-06-2004 23:48
Loading Images? Tom Bottiglieri Website Design/Showcase 3 16-02-2004 18:26
polar array in 3ds Ghetto_Child 3D Animation and Competition 6 12-01-2002 18:55


All times are GMT -5. The time now is 04:35.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi