Nappi

Orbit Golf

Recommended Posts

I figured there is a lower chance of me giving up on the project early on if I actually share it with you people. So, here is 

 

Orbit Golf (working title)

 

Background and idea

I wanted to play around with Unity and tried to come up with a game idea that would not require me to create a lot of 3D resources and would, potentially, be fun to play. At some point I started thinking of Kerbal Space Program and how much I love the part where you have to plan and execute orbital transfers, i.e. accelerate to extend the orbit around the first planet and then decelerate once you are captured by the second planet. I thought it would be a fun idea to make this into its own minigame.

 

The idea of Orbit Golf is to get from the starting planet to the end planet (or black hole) through one or more orbital transfers. The task is made more difficult by stuff like other planets, asteroid belts, solar winds (I'm not aiming for realism here), and so on. The score can be calculated by the amount of maneuvers executed (i.e. how many times you applied delta-v) or by the total amount of delta-v spent. Maybe I will have a per-stage star system for both values.

 

Progress so far

This is where I am after three days of playing around with Unity.

 

The visual style is not final. I just quickly whipped up something that I could tolerate during the near-endless debugging phase.

 

I already ditched the Unity physics engine in favor of calculating the velocity and position of the ball manually. I did this because I had serious problems making the actual and drawn orbits match, most likely because it was unclear to me at which point of the cycle the force was applied to the rigidbody. At first, I was worried that the orbits wouldn't be stable due to rounding errors and other problems associated with numerical integration of differential equations, but the method I ended up with (Runge-Kutta 4 for those interested in this kind of stuff) seems to be stable enough for this purpose. If someone wants to wait for tens of minutes to get a slightly better orbit, then whatever.

 

(In the actual stages, the planets will probably not be as close to each other as in the video. Orbits become very hard to manage when several massive objects are this close.)

 

 

Todo

- Add gameplay elements: starting area, hole, scoring, information displays

- Produce prefabs for planets and other obstacles

- Create a gravitational potential map (almost done)

- Come up with a visual style

- Optimize the line drawing for long orbits

- Adjustments to various parameters to make gameplay feel better

Share this post


Link to post
Share on other sites

Some (mostly invisible) improvements on orbit visualization. I also wrote a script that generates a gravitational map mesh based on the positions and masses of the planets. The grass still needs work. Finally, I started implementing the UI texts for the game.

 

(The game looks crisper than the video. Video capture settings are not very good.)

Share this post


Link to post
Share on other sites

Oooooh, this is a good idea! I like this kinda physicsy puzzle stuff, and you can just tell by looking at this that it's going to be fun to play with. The input here seems simple enough that this could even work as a smartphone game.

 

If you need a beta tester, send me a PM! :D 

Share this post


Link to post
Share on other sites

Thanks!

 

I haven't made more progress since the last update because I suddenly became interested in playing video games again. I think the next mechanics milestones are camera controls and either manual or automatic control of playback speed. In my mind the game is quite snappy and fast (although, players can still take their time with the "shots") so I would like to have an option to speed up gameplay during those long orbital transfers.

 

I also need to tweak the physics parameters to make the game more playable. The situation in the video, for example, is very hard to manage because all three planets contribute significantly to the balls acceleration, and without player interaction, the ball will quickly collide with one of the planets. This can be fun for certain stages, but I don't want the entire game to be about chaotic system.

 

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now