Avi's journey to create Moonshot


Deciding a game idea

“Moonshot” – what a fantastic theme suggested by the Github Game Off! I immediately had so many ideas that for the first two weeks of the jam couldn’t decide on what I wanted to do! I wanted to make something chaotic + unpredictable, and fun to watch while playing. The concept of chaotic systems stuck with me:

a small change in one state of a deterministic nonlinear system can result in large differences in a later state

Choas with Gravity!

After discussions with my housemates, I decided to do something with Newtonian gravity! I liked the idea of having something neat and tidy and throwing something into the clean mixture to disturb the sanctity of the environment.

I started with coding up Newtonian Gravity for a bunch of bodies randomly thrown in the camera’s view:

Orbits

After coding up Newtonian Gravity, I realised that it might be fun to try to get some things in orbit! However, having many bodies influencing one other might make stable orbits hard to achieve. Hence, I decided to hard code some circular orbits:

The circular orbits would be my clean starting point that would then get disrupted by some external influence (i.e. the player :D ).

Chuck in some rockets

On taking a look at the hardcoded orbits, my game idea evolved. I imagined it’d be fun to have rockets (human-controlled objects) that would have to navigate safely to a destination! Maybe Interstellar golf? A colonisation game? A turn based-two player mode where the first to colonise the entire system wins? So many choices! I proceeded with coding up a rocket to be gravitationally influenced by the objects in stable orbits:

First Release

Playing around with the rockets helped sharpen the final game concept. I decided to make a game where the player has to slingshot rockets from planet to planet, without crashing into stars or getting yeeted from the system (going off-screen).

To work towards the idea, I initialised a starting and destination planet and tested the game out. It was very satisfying to watch the rocket navigate a successful journey! After adding some UI, I created a beta release of the game and shared it with some friends try it out!

A couple of hours later, I got some responses. The feedback was universally the same.

“Avi, your game is TOO HARD”

My friends found the game frustratingly challenging because they found it had to predict the rocket’s trajectory. Their feedback made me realise: understanding and predicting the effects of gravity can be tough! The difficulty most likely arises due to the distance-squared term that decreases the gravitational influence between two objects exponentially, the more separated they. After some googling, I found quite a few posts about how our brains have trouble understanding exponential functions.

Following this, I started to consider: can I bend the laws of physics and change the distance-squared relation to a linear distance relation? Change r^2 into r in the Newtonian gravity equation. Hopefully, Newton won’t mind.

“Linear” gravity

I sent across a new version of the game with “linear” gravity to my friends to gauge if this might make the game easier. To my surprise, even though it’s unnatural, they had an easier time (and hence had more fun) playing the game!

If you’d like to decide for yourself which version of gravity is easier/harder to intuit, try out my game! You can change the laws of the game’s physics in options.

Future work

Sonification

It’d be cool if I could sonify the orbits, similar to how SYSTEM Sounds has done for the TRAPPIST-1 planetary system. I tried this out with Rohan Datta (see this pull request), but gosh, it sounded terrible! Maybe I need to have better sound files?

Level variation

It’d be nice to have a variety of levels. Right now the levels are of the same flavour: 3 stars, each with 1 planet. I can add in more planets, and deeper layered orbits (make planets orbit other planets). Or even have some stars without planets. These variations might make the game more entertaining!

Get others involved?

The most probable scenario: I am likely to get more excited about other projects, and might not come back to this one (lol). Hence, I’ll clean up the repo and hope that someone might be able to make use or build upon this work in the future!

Leave a comment

Log in with itch.io to leave a comment.