Skip to main content

Pygame : Apollo Lander


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



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

Popular posts from this blog

Problem Solving Open educational Resource

  Another new Open Education Resource (OER) has been made available by the School of Science and Technology, University of Northampton. Problem-Solving Author: Dr Scott Turner http://find.jorum.ac.uk/resources/19001 Details These mini lectures are intended for undergraduate computing students, for providing simple steps in problem solving before the students learn a programming language. Problem-Solving and Programming is a common first year undergraduate module on the BSc Computing Programme at the University of Northampton. This material was taken from the problem solving part of the module and provides an introduction to five topics in problem-solving. The resource can be found at:  http://find.jorum.ac.uk/resources/19001 After one week on JORUM  93 downloads  and  12 views  of the OER.

Problem-Solving and Creativity in Engineering

Jonathan Adams, Phil Picton and Stefan Kaczmarczyk from the School of Science and Technology, University of Northampton in collaboration with Peter Demian from Loughborough University have recently published a paper in the Journal   Enhancing the Learner Experience in Higher Education  entitled " Problem solving and creativity in Engineering: turning novices into professionals ". Abstract: Recent UK and European benchmarks for both undergraduate and professional engineers highlight the importance of problem solving skills. They additionally identify creativity as an important capacity alongside problem solving for both novices and professionals. But, how can we develop and encourage these important skills in undergraduate engineers? For many years researchers have explored how the differences between novices and experts might show educators techniques for improving the problem solving abilities of their students. Whilst it is often a...

10 most view post on the problem-solving blog - April 2020

Building an artificial neuron in Scratch Build yourself a Crumble Eggbot from junk Full details at http://bit.ly/2yZ3dZT There was three inspirations for this project ·Eggbot - http://www.instructables.com/id/Plastic-Egg-Bot/?utm_content=buffer9b065&utm_medium=social&utm_source=twitter.com&utm_campaign=buffer  ·Femi Owolade supported by Nic Hughes ran a session at Mozilla Festival 2016 using the Crumble’s to make a wheeled robot. ·The junkbot project https://junkbots.blogspot.co.uk/  Kit ·Kinder Egg (without the Chocolate and toy) · Crumble   also available at  https://redfernelectronics.co.uk/crumble/  · 4x Crocodile clips and leads  · Battery pack  and 3xAA · Vibrating motor  ·Tape (lots of) Free Computing Resource: Junkbots and Scratch 1 The Junkbots project has been running for a number of years as an initiative to bring sustainability, computing and engineering together by building bots out o...