Inspiration

When I was in elementary school and went to the arcade, I always played this one game where you have to guide an animal down to its owner in order to protect it, and I thought it would be cool to make one of my own with a few twists. Because of this experience a few years ago, I made this game but with a spaceship (the white box), and some thrusters to guide the spaceship to the landing zone (green area).

What it does

My game allows you to interact with the spaceship in order to land it safely. You can use the arrow keys to guide the spaceship. If you press the down arrow, it will slow down the ascent of the spaceship. If you press the right arrow it will apply a thrust to the right, and move the spaceship left, and vice versa for the left arrow key. To win, land in the green area at an optimal speed. The game will auto-restart 5 seconds after it finishes.

How I built it

I coded this project in Python, with the import of Tkinter. Tkinter allows for the visual effects/GUI of the game. I coded the basic background and the randomization of the landing pad first and then continued with the interactiveness of the game. I used many functions in order to make the code readable and added comments to know where each part of the code was. After the interactive aspect of the game was coded I started on the replay function.

Challenges I ran into

It had been a long time since I worked with Tkinter, so I took some time to learn how to use it, but as I watched videos and read some articles about how to use it, it became easy enough. Also, since this was one of the more interactive games I have coded, I had to keep in mind all the possible scenarios, and what my user would like when they play the game.

Accomplishments that I am proud of

I am proud of including a new skill (Tkinter) in my project, and that I learned it all by myself in a short period of time. I am also proud of the fact that I coded a type of game that I am not very comfortable coding, and it beingsuccessful.

What I learned

When I came up with the idea for this game, I thought it would be extremely hard, and it was, but what I learned was that you can code anything, as long as you break it down it into manageable parts, which is exactly what I did. I coded the base of the game (background, visuals, etc), then the thrusters, and then the score. If you break it down into smaller parts, you can code anything, or at least know how to approach it!

What's next for Martian Moon Lander

I am going to try to trace the path that the Lander takes in order to see if I can predict the outcome of the user when they guide the spaceship down.

Built With

Share this project:

Updates