Jump to content
  • Advertisement
suliman

Use orbiting planets in 4x game?

Recommended Posts

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 

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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.

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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!