dcsimg
December 3, 2016
Hot Topics:

Using Graphics: Making a Lander Game

  • November 19, 2002
  • By John Percival
  • Send Email »
  • More Articles »

Well, we've now got all the ingredients for a great little Lander game, but as with any recipe, we must be careful how we put them together. There is a demo that you can refer to, or you can follow the instructions through this page, then compare your result to my result at the end.

Load yourself up a new project. On Form1, draw 3 picture boxes, and call them picEarth, picLander and picSmash. Load up two suitable pictures for the lander craft (), and a crashed version () into the picLander and picSmash picture boxes respectively. For these two boxes, set the BorderStyle to 0 - None, ScaleMode to 3 - Pixels, Visible to False, AutoRedraw to True, and finally AutoSize to True. For picEarth, set BorderStyle to 0 - Nove and ScaleMode to 3 - Pixels. Make sure that it is suitably big. I used 336x568 pixels (5040x8520 twips), and that seemed to work well.

Now, also place a timer on the form. Call it tmrGravity, and set Enabled to False and Interval to 1. Also place a command button called cmdGo, and set the caption to "Start". Also draw 3 text boxes with accompanying labels, called txtFuel, txtVSpeed and txtHeight. These will be used to provide some driving assistance to the pilot.

Well, that's basically it for the form design. Now we need to code!





Page 6 of 8



Comment and Contribute

 


(Maximum characters: 1200). You have characters left.

 

 


Enterprise Development Update

Don't miss an article. Subscribe to our newsletter below.

Sitemap | Contact Us

Thanks for your registration, follow us on our social networks to keep up-to-date
Rocket Fuel