Travel time, hyperspace, etc

FluffyFreak
Posts: 1343
Joined: Tue Jul 02, 2013 1:49 pm
Location: Beeston, Nottinghamshire, GB
Contact:

Re: Travel time, hyperspace, etc

Post by FluffyFreak »

These two links seems to have resolved the quintic polynomial part at least.
impaktor
Posts: 994
Joined: Fri Dec 20, 2013 9:54 am
Location: Tellus
Contact:

Re: Travel time, hyperspace, etc

Post by impaktor »

So that Goldstein "Classical Mechanics"-book I mentioned is 600 pages on Lagrange mechanics, and I've read it all 4-5 years ago (and passed the course with distinction), so I did know all that stuff at that time, alas, memory fades much too fast. But in your second link, doesn't that "z=x/a" give you where to put the L1 point along the line between the two bodies? I assume you get 4 different z from the equation, but you can throw away any negative or bigger than 1 solution.

Anyway, I don't think we need it for this implementation, unless you're curious or dead set on it.
impaktor
Posts: 994
Joined: Fri Dec 20, 2013 9:54 am
Location: Tellus
Contact:

Re: Travel time, hyperspace, etc

Post by impaktor »

Ah, as I thought:
derivation in fluffy's second link wrote:By studying the graph of the lefthand side for various values of k, we discover that this fifth-order equation has one (and only one) solution in the interval 0 to 1.
Or maybe there's a problem I'm not seeing? Sorry if I'm rubbing something (I don't know what) in your face, not my intention.
DraQ
Posts: 149
Joined: Sun Mar 23, 2014 10:02 pm

Re: Travel time, hyperspace, etc

Post by DraQ »

FluffyFreak wrote:Also I've been reading up on calculating L1/2 & 3 points and I have to say that if it's easy then I would like someone to have actually done it.
Instead what everyone does is what you just posted, yet another equation that doesn't actually give you the distance from the Earth toward the Sun where L1 is.

Actually I'm annoyed by all that, everyone assumes you've got a bloody degree in mathematics and it's makes it impossible for someone like me, who struggled with GCSE maths, to join in. It's elitist fuckery.

Sorry it's just really annoying having your weaknesses rammed repeatedly into your face whilst being told that the answer is "simple" :(
Sorry, but I never claimed that to be simple, especially now, when the math part of my brain has pretty much rusted shut from disuse ( :( ).
L4 and L5 are simple to find (but not to derive) because you just need to draw two equilateral triangles in orbital plane with primary and secondary as vertices of their shared base and the remaining vertices will point the L points.
I claimed that true gravitational equilibrium point between primary and secondary (not the actual L1 point) should be easy to find because you can get distances ratio from mass ratio and you also know the sum of both distances
(so given masses m1 and m2 and orbital separation d the distances to each body are d2 = d/(1+sqrt(m1/m2)) and d1 = d/(1+sqrt(m2/m1)) - assuming that I haven't made a stupid, of course), and that it's the only point that's actually relevant if going for gravity-based explanation as it is the only point in two-body system where gravity forces cancel out.
It's also a safer candidate because there will certainly be no natural object there so pretty much every body in a multi-body system is going to have its gravitational equilibrium point that's open for traffic, while L4 and L5 are likely to contain bodies, possibly even as massive as entire planets:
https://en.wikipedia.org/wiki/List_of_o ... ian_points
https://en.wikipedia.org/wiki/Co-orbita ... an_planets


Again, sorry, if I use math to describe something it's generally because it's the best way I know to avoid ambiguity and describe something precisely, not to rub anything in anyone's face - honestly!
FluffyFreak wrote:Ok, a bit calmer now, try again.

L4 or L5 is a destination (exit) point for in-system travel - Earth to Neptune.
The Star(s) of a system is/are the target from inter-system travel - Sol to Epsilon Eridani.

When exiting an inter-system jump you come out just like we currently do, nothing changes in this regard, you're still ~12AU from the star you targeted on the side nearest the system you departed.
When exiting an in-system jump you come out at the targeted L4/L5 point, regardless of other mass that's there (for the time being), with some random jitter so you're not popping out at it's exact location atop another ship.

You're got a real knack for overcomplicating things DraQ ;)
I don't really see how trying to make consistent mechanics where a single thing (hyperjump) always works in the exact same way is "overcomplicating".

From player's pov it's certainly going to be less complicated to know that they can jump to any planet in any system as long as they have enough fuel and that jumping is most efficient from gravity equilibrium points (that can be entered as navigation targets) with hud/icon showing jump efficiency as percentage, and that this jump will drop them some AUs from their target than to have to learn two completely different sets of mechanics that are used based on a rather arbitrary distinction that has no way of affecting hyperdrive physics whatever it might be.

Plus, regarding consistency (from another thread):
impaktor wrote:
is it important to you that it be fully simulated

Sometimes I see the question "is it possible to fly from one system to the next using only thrusters?". There is a value in just knowing it is possible to do and that things are "correctly simulated", but as you said this comes at a cost.
Making games is ultimately smoke and mirrors and what's important is whether or not the game behaves as if it did the right thing, not necessarily whether it actually does it.

In this case even if Pioneer offered ability to travel between systems in conventional manner players would not be able to test it. OTOH having jump mechanics that doesn't discriminate between systems would foster the illusion that those systems really do exist in some shared space rather than being rooms in space, even if very, well, roomy (even though it's what they actually are).
nozmajner
Posts: 1079
Joined: Mon Jul 01, 2013 3:25 pm
Location: Budapest HU

Re: Travel time, hyperspace, etc

Post by nozmajner »

I read a bit more about these points, and I found that gravity doesn't really cancel out at any of the L points, only partially. It's just that the gravitational pull of the parent and child object modifies the orbital period of the satellite/whatever placed there, as if it was fixed to an invisible point. It's only a partial cancellation that makes the orbital speed required there to be about the same as if it would be fixed on the line drawn between the two bodies (1 2 3) or 60° along the orbit in each direction.
I guess nothing would happen orbit-wise in the actual spot where the two pulls really cancel out, because as the spot rotates away you would just leave it along your orbit. There might be a little pull towards the point on the plane perpendicular to the line (like a rubber band between the bodies), but I don't think that would be strong enough to fix you in that point.
Might look like if you are leaving the point behind, since it's apparent orbital period matches the period of the child body (as it's always on the line between the two bodies). Which is lower than what you would have on that height, since the child is further from the parent body than the point of cancellation.

(Although this might be useful if arrival points are really can only manifest in this equilibrium, since it's moving so fast that the likelihood of two ships arrive at the same time/point of space would be really low (self regulating). And when you arrive, you might start to fall towards one of the bodies immediately, so there's a need for navigation if you don't want to crash. And could provide nice opportunities for emergencies/distress calls, where the arriving ship can't enter into a proper orbit due to some failure.)

So if we are strict, neither of these points completely cancel out the two gravitational pull, so that hand-wave explanation would just go out of the window anyway.

And also I don't think it would be possible for a planet to be placed to an L4-5 point, at least a not minor one, since it's not really a negligible mass (even if it's a gas giant L4-5), and would perturb the other bodies, which would move the L4-5 points too.

I think what fluffyfreak described (jump to L-points from the outside of the system/from anywhere in the system) would play out better. It's less limiting on where you engage your drive, and you can plan your trip a bit better. And any opposing party, like pirates or assassins can also plan their nefarious acts better. And the police can plan their patrols and actions on those wrongdoers better. So there's more opportunity for stuff happening between ships.

I doesn't seem to me that an added factor of hemisphere randomness when jumping to a body would add that much to the game. Like if you just arrive at a certain distance + some randomness at your destination, then it's just the same point and shoot navigation , but for less time and distance. With these L4-5 arrival points, you can at least pick the destination and plan and optimize your trip a bit. Like one of the Sun-Earth L-points is much closer to Venus then any of the Sun-Venus points at some times of the year (Like 2-3 times closer). With that random arrival points, you (and anybody else) can't really plan that much, so you get to make less decisions.
True, a little bit of randomness is a good thing, for like avoiding any overlapping arrivals, or always the same battles.

Same goes to putting stations on L4-5s. Even if there's no fictional rule about that you can't use that L-point if there's something there (since it would orbit it at a quite huge distance anyway), it's pretty much would be impossible to put a station to all of these spots in a system with more then two or three planets. Especially if all moon L-points can be picked as destination.
Which facilitates decisions further from both point of views. Police and military forces need to decide, which points need more protection. Also you might need to decide if you jump to the L-point that would make your trip shorter but less guarded, or go the longer but safer road.
L-point departure seem to allow for less of this, since you just decide to go to the L-point, or further out to be able to engage your drive (as gravity decreases with distance), and it's pretty sure there's less patrol/police away from the planet. And since the L-point is closer anyway, it would be obvious to choose that, with it's station and police too. Or if there's no station there, then just thrust away at a random direction to avoid any bandit. (I think that a bandit would have a hard time intercepting you outbound, if he wasn't already close to you, since you don't need to decelerate to jump.)

And on the other hand, if there's a fictional reason that you can't really use an L-point if there's a station or something large enough there, then it's also a decision for the system government. They can have either road, or station. Although this fictional reason would create the requirement of cleaning L-points up regularly, like road maintenance. So small systems might have less usable L-points, and uninhabited ones might don't have any at all until somebody cleans them up.
impaktor
Posts: 994
Joined: Fri Dec 20, 2013 9:54 am
Location: Tellus
Contact:

Re: Travel time, hyperspace, etc

Post by impaktor »

As far as I know, it's only fluffyfreak working on this. Me, nozmajner and fluffy (i.e. current active dev team) seem to be on the same page about how it should work, and I have not seen any convincing argument why not. Pioneer is still primarily a game, not a hard core physics simulator.

Making fuel consumption depend on where you start the jump drive would complicate things terribly for the player, and add a lot of work to be implemented, and clutter tings up: I assume one would have to have many different max-range-spheres in the star map, depending on what distance from the planet you start your drive at. I assume most players plan their trip when landed and going through the commodity market and BBS missions.
FluffyFreak
Posts: 1343
Joined: Tue Jul 02, 2013 1:49 pm
Location: Beeston, Nottinghamshire, GB
Contact:

Re: Travel time, hyperspace, etc

Post by FluffyFreak »

First: Sorry DraQ I'm not having a go at you, I understand that maths is the best way of communicating these things it's simply that I'm a dunce and struggle mightly with a lot of maths, it's my personal frustration boiling over at times. Ignore me when I rant, or call me an ass for it and I'll stop.

Just to be clear I'm only talking about in-system jumps using Lagrange Points.
I think it's easy to understand why, because between stars we can just about resolve the biggest of gas giants but only if they transit the host star or if we observe them for a number of years, so the idea of picking a Lagrange Point around one of their moons from a distant star system is just a bit silly and easily explained away as being technically impossible.
Remember that the mass of a star system is basically 99% Star, 1% Gas Giant(s) and the rest of the planets, ice giants, asteroids etc is just a rounding error.

So:
  • Target star system,
  • Take-off & reach hyperspace safe range/distance/etc-ness and jump,
  • Arrive in target system exactly the same as we currently do,
  • Target a Lagrange Point of a local planet,
  • Jump too it,
  • Proceed as normal to planet/station/etc.
I suggest that we do it this way because:
  • it's easy to understand for the player
    • when leaving you just have to get to safe distance from a planet and the UI tells you where that is so it's easy to point upwards, accelerate and wait,
    • it makes sense to arrive where you do as your system can't target something small like an L-point from another system,
    • you can target the L-points of planets other than your destination, the L4/5-points of Venus and Mars are often closer to Earth then Earths L4/5 points for example.
  • easy to implement, making things more complex make them harder to implement, review, test and less likely to get done overall - I will not be implementing this for a whole year,
  • I don't think that we need hyperspace entry chokepoints because we already have the station a player/ship is leaving, you can wait until they're away from a station before attacking, ambushing however is impossible without an exit chokepoint as reaching a station can be quick and the're travelling very fast,
  • None of this precludes bodies being at the L-points, it can simply be explained as a way that the targeting system works, not a limitation of the drive, if there are bodies there then we exit the jump a safe distance out from them,
  • it's ok if the first attempt at this is not good enough or perfect, because this won't go straight into master, we'll do builds and test how it plays so quick and easy is important here then we adjust based on feedback.
I'm not planning on adjusting fuel consumption for in-system jumps yet, just using the same distance function we already do, in the name of simplicity and consistency but it can be reviewed and adjusted later.

I do think we have a system laid out that we can implement and test there, it might be right for the game but without trying it I am loathe to add more complexity.
The things that I think that we need are:
  • some UI/HUD to show where we can use hyperspace - I'd prefer it if this was displayed ingame like a grid/plane shown along our flight course where we would go past, possible/safe/free marker for hyperspace entry, perhaps with HUD showing distance to each as well?
  • the SystemView has to show which L-point you've targeted and perhaps fuel usage of jump(?) other things?
Does that all sound reasonable to everyone? Because I'm also working on other stuff in parallel so I'd rather not switch back n' forth too frequently :)

Andy
FluffyFreak
Posts: 1343
Joined: Tue Jul 02, 2013 1:49 pm
Location: Beeston, Nottinghamshire, GB
Contact:

Re: Travel time, hyperspace, etc

Post by FluffyFreak »

DraQ: the L4/L5 targeting stuff was merged just the other day, if you do want to add displaying the L1/2/3 points then take a look in `SystemView.cpp` and `SystemView::PutBody` and it should be pretty clear how I hacked in the drawing of L4/L5.

By default it might be best to show only L4/5, press againt to add text, then press the button again to get L1/2/3 with no text, again for text on all of them. Just from a UX viewpoint as it get's cluttered quickly.

Also what would you think to showing the L-points in a different colour? At the moment they look a little too much like they're planets/other-bodies I think.
nozmajner
Posts: 1079
Joined: Mon Jul 01, 2013 3:25 pm
Location: Budapest HU

Re: Travel time, hyperspace, etc

Post by nozmajner »

How about a blueish tint? I can't upload a mockup right now, but #00d6e2 looks good I think.
FluffyFreak
Posts: 1343
Joined: Tue Jul 02, 2013 1:49 pm
Location: Beeston, Nottinghamshire, GB
Contact:

Re: Travel time, hyperspace, etc

Post by FluffyFreak »

Nozmajner, yes I think we can :)
Post Reply