bg

Seamless 2D Solar System

Dev Log #1

I've been working on a seamless surface to surface 2D solar system. One of the difficulties has been in having gravity seamlessly transfer a vehicle from one world to another and have the camera track nicely.

Here's a look at what I found to be complex scenario. Flying a rocket in a system with two moons orbiting a world. When the moons are close together the player could begin to escape their moon and then go anywhere from earth to the other moon, to possibly a satallite orbiting that moon. This is hard to track and ensure that no matter the path they take the camera smoothly rotates to the correct position and the player feels the force of gravity gradually shift.

It took a lot of drawings of circles to help me understand the complexity. Eventually I realized computers are better at drawing stuff than I am and added a visual debugger that draws green circles to let me see how gravity wells overlap.

So far so good. Let's see how flying from a moon to a planet feels.

Perfect!

With two moons, if their sphere of influence overlap the range shrinks to avoid affecting one anothers surfaces.

With the core functionality of worlds running well I moved on to improving the worlds surfaces. I've taken them from circles to being derived from curves for worlds that play great with wheeled vehicles too.

I’m really happy with how this turned out.

Briefly in the background you can also see colored boxes showing off how I can add in background images into my parallax background solution. Parallax is the effect that simulates perspective where far away objects appear to move slower than ones closer to the camera. I’m using orthographic cameras so this effect has to be faked.

I've also coded up the surfaces to be dynamic giving the ability to hoe, plant, water and burn the ground.

Looks like everythings working better than ever! Breaking changes have slowed down for core world scripts at this point. It’s about time for me to get back to working on core gameplay. There’s a ton to figure out there and I'm excited to take a crack at it.

Next Star Over logo

© All Rights Reserved Next Star Over 2024