In July 2019, I produced, using Pygame Zero and Python, a (very) simple Apollo moonlander game - details on it can be found at https://bit.ly/moonlander_pygamezero.
I wanted to test that I could do the same thing in PyGame (and Python) - literally can I do it.
The lander
- has to touch a red rectangle on the surface;
- the mouse is used to move it in the correct direction.
- When the lander touches the red rectangle:
- a sound is played
- the lander resets for another run;
- the target moves to a new location.
Two images were used
- The lander image came from https://www.kissclipart.com/apollo-program-apollo-lunar-module-lander-moon-landing-wgwzny/ shared by Xfanmy. This needed to be shrunk by about x10 to fit.
- Surface came from Vector Designed By from Pngtree.com
I am trying it out in Trinket (see below); so that there isn't a need to install Python or Pygame first.
You can run it here if you just want to play.
Have a go yourself and please feel free to comment and share what you did to change it. There are lots of improvements that could be made; please share them. Some ideas to extend it
- What do you do if it misses the target?
- Could a booster be added that changes the image to include a flame?
All opinions in this blog are the Author's and should not in any way be seen as reflecting the views of any organisation the Author has any association with. Twitter @scottturneruon
Comments
Post a Comment