Use orbiting planets in 4x game?

Started by
22 comments, last by CrazyCdn 5 years, 4 months ago
1 hour ago, Irusan, son of Arusan said:

I'm not sure this is relevant. Travel calculations for real world space travel are complicated because space travel is slow. Very slow.

Which I know very well due to my work. The point is, what is your timescale for 4K game (1 tick is 1 second? 1 hour? 1 day? 1 week? ...) -> This makes huge difference... Also due to sci-fi technologies, nothing states that you can't have a lot more delta-v available.

I intentionally threw this in to point out that you still can realistically model trajectories and paths of not just bodies, but also 'space vehicles' - it may not be easy, and you might be required to play with time scale, or have ridiculously high delta-v (which is case for typical space game).

For your information, in Stellaris (which has been named here multiple times) - 1 second represents 1 day on Normal speed, which means that in Earth system (which is in game) - the planet should travel about 1 degree each second - in 1 minute it has to travel about 60 degrees around the star. That is definitely not slow! This gives you around 6 minutes for whole year. Travelling from Earth to Mars with delta-v even as low as 12 km/s (which is easily doable now - but currently we always target the least delta-v transfer), transfer can take just 60 days, which would be just 1 minute in Stellaris on normal speed - and planet would still go around!

Of course by increasing delta-v you can go faster.

I'd recommend you look at https://transfercalculator.com/calculator/index.html 

My current blog on programming, linux and stuff - http://gameprogrammerdiary.blogspot.com

Advertisement
On 10/1/2018 at 5:41 PM, Vilem Otte said:

@1024 I get what you mean, exactly - and that is road straight to you CAN'T make a believable motion of the spaceship in an easy way (the math required for the computation of the path is way too complex).

I don't think this is really true. In my engine I specifically added "fake" astral mechanics. This consists of being able to set orbits and rotations of planets, moons and stars.

As for ships it's a simple matter of calculating the gravity contribution of each body, the ship's current velocity, and any thust the ship is under.

Now plotting a course to reach a given destination is a whole nother story. But under manual control the motion should be realistic enough.

Or you could, like a lot of 2D 4x space games do and have your ships fly "over" the planets to their destination.  No physics required.  Then just attach them to the parent planet.  About the only thing I would fly around would be the sun(s).  You could even have a hidden or toggle-able grid/hex/etc system with the sun(s) zones set to non-moveable positions so it has to path around.  Space Empires 3-5 did this.

"Those who would give up essential liberty to purchase a little temporary safety deserve neither liberty nor safety." --Benjamin Franklin

This topic is closed to new replies.

Advertisement