• Register
Post feature RSS Physics of Planar

An overview of the features of Planar related to physics.

Posted by on

In Planar you can fly your spaceship troughout the galaxy in a realistic way. The Galaxy is made up of a hierarchy of moons orbiting planets orbiting stars and so on.

Example showing how to use the mapview to look at the moon.

The universe of Planar is a fictional version of the real Galaxy, with realistic sizes. This means that most journeys involve a wide range of length scales, kilo-, mega-, giga-, tera-, peta-, exa- and finnaly zetameters.

View from moon to galaxy.

To explore this vast Galaxy you need to start by getting your ship into orbit. Since this can sometimes take a long time the game offers timewarp, which makes game time pass faster than frame time. This is also usefull when making large maneouvres and approaching an object you want to land on.

Timewarping your way into space.

Once in space you can change your orbit by turning on your space ships engines. In this case the ship is accelerating, causing the elliptical trajectory to expand until it wraps around the planet, and continuous expanding after that.

Orbit around planet

The orbit of a space ship around any massive object is usually an ellipse. As the ship accelerates, the shape changes from an ellipse to a parabole and finnaly a hyperbole. The trajectory gets cut off at the sphere of influence of the planet. At this point, the path continuous as an independent orbit around the mother star of this planet.

Escaping from a planet.

Once we have the orbit we want, all you need to do is wait to get the place you want to reach... for days, months or even years. Fortunately, you can skip this wait with the time jump function. Select any point on your orbit and then time jump towards it. The game will forward time by the amount needed, causing all planets in the view to orbit around as well.

Space ship jumping in time to different parts of its orbit.

Eventually you might want to visit a planet orbiting the same star you are orbiting. In this case, we managed to find an intersection orbit with the sphere of influence of Jupiter. This is more simple than it looks, all you need to do is put your ship on any point of jupiters orbit, then accelerate until jupiter happens to arrive at this point at the same time you will return to it. As the ship passes by Jupiter it gets slingshotted around and away. This generates a new orbit around the sun, shown in green.

Looking for jupiters sphere of influence

This is what the same trajectory looks like, while zoomed in on Jupiter. The orbit passes by and exits the sphere of influence again, unless it happens to collide with Jupiter itself.

Entry orbit around Jupiter.

Finnaly there is still the problem of interstellar travel. To reach another star there is no choice but to go to a sci-fi solution like a warp drive, unless the destination star happens to be very close. In that case, we can extend a normal orbit towards the destination.

Intersteller travel between close stars.

Congratulations! You know have a conceptual understanding of space travel and all the knowledge you need to play and beat Planar.

A little note for the experts among you: the trajectories in Planar are calculated using the famous patched conic approximation. This is by no means the approximation used for real life space travel, since it is too innacurate. So why didn't I use the real system for Planar? Well that's because most people don't want to play games on their home super computers. Calculating an orbital trajectory for real life applications takes minutes, hours or days, meanwhile Planar needs to do the same thing within one frame (1/60th of a second). This means that a more simple, faster approximation is needed.

And for the programmers among you: the code for calculating the trajectory can be found in the SpaceEntity and Path classes of the Planar_Source jar file. This involves nearly 2000 lines of code and some hardcore math and physics, so beware.

Even if Planar is not the kind of game for you, I hope I at least convinced you that physics can be awesome. Don't forget to support space travel!


Seems interesting ideas.
So KSP RPG version?
Will it include N-body Physics?

Reply Good karma Bad karma+1 vote
WARdd Author

Unfortunately N-body physics won't fit in the framework of Planar. Mayby I'll put it in the next game

Reply Good karma+1 vote
Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.