Ouch the autopilot is dumb

General discussions about X Rebirth.

Moderator: Moderators for English X Forum

Ovni
Posts: 141
Joined: Sun, 6. May 12, 23:42
xr

Ouch the autopilot is dumb

Post by Ovni » Wed, 24. Aug 16, 20:25

Finally tried X Rebirth, how come the autopilot is dumber than in X3TC? In the latter it could take to my destination and dock 90% of the time. Now it bangs me repeatedly against stations.

BrianPaone
Posts: 50
Joined: Wed, 23. Dec 15, 15:38
x3ap

Post by BrianPaone » Thu, 25. Aug 16, 00:29

Huh. Haven't seen that. Autopilot works differently in X:R. In X3, you couldn't pilot a Kyoto through a friendly populated zone because it'd just ram everything and POOF there went your rep. So here, the auto actually plots a course around stuff.

You're not trying to dock with autopilot, are you? I don't think that works. Gotta shift+D it. At least I have to.
I tried signing this but now there's just a bunch of ink on my screen. Who do I sue to correct this?

Snafu_X3
Posts: 4472
Joined: Wed, 28. Jan 09, 15:14
x3tc

Post by Snafu_X3 » Thu, 25. Aug 16, 01:01

BrianPaone wrote:You're not trying to dock with autopilot, are you? I don't think that works. Gotta shift+D it. At least I have to.
Yup, that's by design (currently)
Wiki X:R 1st Tit capping
Wiki X3:TC vanilla: Guide to generic missions, Guide to finding & capping Aran
Never played AP; all X3 advice is based on vanilla+bonus pack TC or before: AP has not changed much WRT general advice.

I know how to spell teladiuminumiumium, I just don't know when to stop!

Dom (Wiki Moderator) 8-) DxDiag

Ovni
Posts: 141
Joined: Sun, 6. May 12, 23:42
xr

Post by Ovni » Thu, 25. Aug 16, 07:50

I just have my mission target selected and I engage the auto-pilot. The game gets me there (most of the time, see below) but once the destination is reached instead of doing something sensible such as stopping or docking it repeatedly collides against the station.

This is by design you say? Umm, ok.

The autopilot worked better in X3TC at least for small ships. I distinctly remember it plotting a course around asteroids and stations. Here besides the abovementioned problems, it occasionally waits forever at a highway entrance, or gets stuck banging against a large asteroid. I'm sure there are technical explanations for all that, but the end result isn't impressive.

MrFiction
Posts: 215
Joined: Sat, 7. Jul 12, 19:16
x3ap

Post by MrFiction » Thu, 25. Aug 16, 09:41

The autopilot never worked well, not in X3 and not in X rebirth, although I get less crashes in the latter. It would be best to turn off collisions while the autopilot is active. Although lots of people disagree with me on this last statement :)

AleksMain
Posts: 907
Joined: Thu, 21. Sep 06, 11:05
x3tc

Post by AleksMain » Thu, 25. Aug 16, 10:44

MrFiction wrote:The autopilot never worked well, not in X3 and not in X rebirth, although I get less crashes in the latter. It would be best to turn off collisions while the autopilot is active. Although lots of people disagree with me on this last statement :)
In X3:Albion Prelude I often use autopilot, while managing my ships and stations. Also, if I need to pick up cargo crate, then I can use autopilot too.

ajax34i
Posts: 1826
Joined: Tue, 8. Sep 09, 01:32
x4

Post by ajax34i » Thu, 25. Aug 16, 14:03

The autopilot in X3:AP was horrible at navigating around large objects like asteroids and stations. I'm not sure what you remember, but it used to fly at the asteroid, then perpendicularly away from its surface, then at the asteroid again, then perpendicularly again, basically drawing what looks like a sun-flower drawn by a kid around any object it tried to get past.

Also, fire up X3:AP and go to the 4 Albion sectors that have dense asteroids, then try to autopilot there. Or to the big rock sector and try to autopilot to a station on the other side of that rock.

In X-Rebirth, they actually programmed it with curved paths to take the ship around the obstacle nicely. They were showing it off in one of the preview videos before the game was launched; they put some effort into it.

The only downsides to the X-Rebirth autopilot are:

- You have to manually shift-d to dock.

- You cannot select the docking destination with the joystick until you have the combat extensions software installed. Because the docking destination is a subsystem and you cannot target subsystems until you install combat extensions. Must manually click it with the mouse. Annoying.

I believe that if Egosoft changes their minds about the autopilot docking automatically, it'll be such an easy thing to implement. Pretty sure the hard part was those curved paths. Ships fly very nicely in the dense asteroid fields in DeVries.

Ovni
Posts: 141
Joined: Sun, 6. May 12, 23:42
xr

Post by Ovni » Fri, 26. Aug 16, 23:01

What I'm mostly complaining about is that the game baits you with an autopilot feature which can take you to your mission target sectors away. Which I'm gonna use, because steering in highways holds no interest whatsoever - especially when using the gamepad where you have to constantly press LT to move forward! However once autopilot is engaged I shouldn't have to pay attention to my surroundings the whole time. If for some bewildering reason Egosoft are fine with taking me the whole way there automatically but not docking me, sure, I'll do your little key shortcut. Just stop at the destination instead of ramming me repeatedly against it. Thank you.

Also, as an aside I did more testing such as clicking on an unknown station part and pressing shift-A to go scan it - the most unbelievably obtuse mechanic I've ever seen BTW, the part in question doesn't even get targeted (using the much-touted analog gamepad mode, at least) so how are you supposed to know you can trigger autopilot from the zone menu? Anyways, every time I did that when my ship was near a station it ran me straight into a wall. In X3:AP the game did all kinds of stupid maneuvers but eventually managed to get me to my target without crash most of the time. I think I understand why they disabled collision damage in this game :P .

Snafu_X3
Posts: 4472
Joined: Wed, 28. Jan 09, 15:14
x3tc

Post by Snafu_X3 » Sun, 28. Aug 16, 03:16

In both sets of games (X3 & X:R) the autopilot has problems with large objects.. but in different ways:

In X3 the AP had pathing routines that worked suboptimally, but did work eventually if you didn't use SETA (even at default x6 speed) except in the cases of large objects (the Aldrin rock is the classic example, or the huge Terran stations)

In X:R the AP pathing routine has changed significantly, so you'll have to watch when you're near a station/'roid or other large object to make sure it does what it's supposed to do..(in X:R this 'bug' can occasionally be used to your advantage to get out of 'ship stuck within structure xxx' situations)

Either way don't engage AP until you're a significant distance away from a 'large object'

(BTW the X:R change from simple 'OOS vs IS' to 'OOZ vs <range identifier>' may also be confusing.. & worth looking out for!)
Wiki X:R 1st Tit capping
Wiki X3:TC vanilla: Guide to generic missions, Guide to finding & capping Aran
Never played AP; all X3 advice is based on vanilla+bonus pack TC or before: AP has not changed much WRT general advice.

I know how to spell teladiuminumiumium, I just don't know when to stop!

Dom (Wiki Moderator) 8-) DxDiag

Ovni
Posts: 141
Joined: Sun, 6. May 12, 23:42
xr

Post by Ovni » Sun, 28. Aug 16, 04:56

ajax34i wrote:In X-Rebirth, they actually programmed it with curved paths to take the ship around the obstacle nicely. They were showing it off in one of the preview videos before the game was launched; they put some effort into it. (...) Ships fly very nicely in the dense asteroid fields in DeVries.
Forgot to say, thanks for pointing this out. It's good to know that at least the engine has evolved in this respect.

I know that 3d pathfinding with a lot of moving actors is a big technical challenge and I'm not surprised a small company like Egosoft has trouble with it. Still, it feels like they should put in some basic workarounds to hide the flaws of their system. For instance it shoud be easy to check if the autopilot is gonna run the player ship straight into a very close obstacle by doing a few collision checks along the determined path! Just give some "object too close" error message instead of proceeding. For a whole fleet or longer distances it's a different matter.

ajax34i
Posts: 1826
Joined: Tue, 8. Sep 09, 01:32
x4

Post by ajax34i » Mon, 29. Aug 16, 15:57

Funny story:

Without spoilering too much, I was doing an escort mission, and the recommended easiest way was to set my autopilot to follow the escort ship.

So here I am, following directly behind it, and it gets closer and closer to a big asteroid. I'm thinking "improved pathing, here we go!" So it angles to the right, on a path to avoid the asteroid, like any normal person would do.

Then, mid-arc, it drops to 0 speed, turns to "look" at the asteroid, then turns back and continues on its way. I was like "Nooooo! Not the old pathing!" then "Yessss!" then "WTF was that?" all within the one second it took to pull this stunt.

bambikaka
Posts: 153
Joined: Sat, 26. Dec 15, 13:24

Post by bambikaka » Mon, 29. Aug 16, 22:48

ajax34i wrote:Ships fly very nicely
except they make 5+ unnecessary turns even when they would just have to fly straight between two points... the predetermined paths would nice... if they would work. but even 3 years after-release patching and 7 years development they still dont. :( and with the current speed of the capitals, especially without SETA, its a far bigger pain than X3 ap stupidity was... all they would have to do to fix the x3 ap to, when detecting a large object in front, take the bounding box of that object, draw a vector from it geometrical midpoint with the biggest diagonal +some into any direction and add that point as the new aim for the ap, go there and target the final point again... voila... collision avoided nicely, smoothly and with style... instead they tried to create an overcomplicated pathing that is clearly over their skills and to fix it... well, they turned the collision off. job done...

Ovni
Posts: 141
Joined: Sun, 6. May 12, 23:42
xr

Post by Ovni » Mon, 29. Aug 16, 23:03

bambikaka wrote:
ajax34i wrote:Ships fly very nicely
except they make 5+ unnecessary turns even when they would just have to fly straight between two points... the predetermined paths would nice... if they would work. but even 3 years after-release patching and 7 years development they still dont. :( and with the current speed of the capitals, especially without SETA, its a far bigger pain than X3 ap stupidity was... all they would have to do to fix the x3 ap to, when detecting a large object in front, take the bounding box of that object, draw a vector from it geometrical midpoint with the biggest diagonal +some into any direction and add that point as the new aim for the ap, go there and target the final point again... voila... collision avoided nicely, smoothly and with style... instead they tried to create an overcomplicated pathing that is clearly over their skills and to fix it... well, they turned the collision off. job done...
Right. What if your "simple" collision avoidance routine runs the ship straight into another static object or another ship? What if you don't have a single big obstacle in front of you but a big collection of bounding boxes? Now multiply that by potentially hundreds of actors pathing at the same time. You must leave some CPU time for the rest of the game to run :P .

User avatar
Santi
Moderator (DevNet)
Moderator (DevNet)
Posts: 4046
Joined: Tue, 13. Feb 07, 21:06
x4

Post by Santi » Tue, 30. Aug 16, 01:10

bambikaka wrote:all they would have to do to fix the x3 ap to, when detecting a large object in front, take the bounding box of that object, draw a vector from it geometrical midpoint with the biggest diagonal +some into any direction and add that point as the new aim for the ap, go there and target the final point again... voila... collision avoided nicely, smoothly and with style... instead they tried to create an overcomplicated pathing that is clearly over their skills and to fix it... well, they turned the collision off. job done...
That is how it works for all X3 games, and why ships will start rotating looking for a new vector, then going forward, rotate to the old direction of travel, go forward, detect the object again, start rotating again looking for another vector, and get pretty much stuck on rotating because by now, it is too close to the object is trying to avoid. Or crash into it and get destroyed.

You can see the improvement when taking refuge in a Station geometry, X3 ships will not get very close to stations when dogfighting, and you can find cover easily, not in X Rebirth, they will hunt you down and find a way to fire at you except in the most inaccessible nooks.
A por ellos que son pocos y cobardes

bambikaka
Posts: 153
Joined: Sat, 26. Dec 15, 13:24

Post by bambikaka » Tue, 30. Aug 16, 11:52

Santi wrote:
bambikaka wrote:all they would have to do to fix the x3 ap to, when detecting a large object in front, take the bounding box of that object, draw a vector from it geometrical midpoint with the biggest diagonal +some into any direction and add that point as the new aim for the ap, go there and target the final point again... voila... collision avoided nicely, smoothly and with style... instead they tried to create an overcomplicated pathing that is clearly over their skills and to fix it... well, they turned the collision off. job done...
That is how it works for all X3 games, and why ships will start rotating looking for a new vector, then going forward, rotate to the old direction of travel, go forward, detect the object again, start rotating again looking for another vector, and get pretty much stuck on rotating because by now, it is too close to the object is trying to avoid. Or crash into it and get destroyed.

You can see the improvement when taking refuge in a Station geometry, X3 ships will not get very close to stations when dogfighting, and you can find cover easily, not in X Rebirth, they will hunt you down and find a way to fire at you except in the most inaccessible nooks.
nope, X3 does not do that... it just goes backward when it detect an object in front and then turns towards its target again...

[ external image ]

Ovni
Posts: 141
Joined: Sun, 6. May 12, 23:42
xr

Post by Ovni » Tue, 30. Aug 16, 12:12

Wait, all this doesn't make much sense. Surely to navigate around static geometry they're using some variant of A* pathfinding? Probably precomputed for various actor sizes. With perhaps some path smoothing afterwards, especially in X:Rebirth. Actually I suspect that in the latter the smoothing might be badly done, leading to a smoothed path that clips with certain objects even if the original path was good.

Collision avoidance routines like you're describing should only be necessary to deal with other moving objects. If they indeed use it for static geometry, the zigzagging behavior we observe could be due to the collision avoidance kicking in, then as we're "lost" another (bad) path is calculated, which send us straight into the obstacle again, at which point the avoidance mechanic kicks in again, and do forth. But that only speculation... pathfinding can go wrong on so many ways.

bambikaka
Posts: 153
Joined: Sat, 26. Dec 15, 13:24

Post by bambikaka » Tue, 30. Aug 16, 15:46

Ovni wrote:Wait, all this doesn't make much sense. Surely to navigate around static geometry they're using some variant of A* pathfinding? Probably precomputed for various actor sizes. With perhaps some path smoothing afterwards, especially in X:Rebirth. Actually I suspect that in the latter the smoothing might be badly done, leading to a smoothed path that clips with certain objects even if the original path was good.

Collision avoidance routines like you're describing should only be necessary to deal with other moving objects. If they indeed use it for static geometry, the zigzagging behavior we observe could be due to the collision avoidance kicking in, then as we're "lost" another (bad) path is calculated, which send us straight into the obstacle again, at which point the avoidance mechanic kicks in again, and do forth. But that only speculation... pathfinding can go wrong on so many ways.
yep, this is the biggest problem with the x games (other than the similarly stupid AI) that their pathing was generally nonexistent... they were just watching forward and when they have met an obstacle they have turned around in a VERY big angle, moved some and turned towards the target again. no matter if static or moving objects we are talking about, it was always working like this in X3. As you said, it was only collision avoidance and big ships were sucking a lot because of it....

now for xr they have tried to make a pathing but totally removed the watching for obstacles aspect so now once a path is made, its made. if something gets in your way... your bad. if that obstacle gets right in front of you... this will happen.

once i watched my capital going from a jump beacon to a dock that was visible from the beacon (so it would only need a fly there, turn into position, dock) going 8 turns and took 37 minutes. wasnt funny. i was tearing my hair out. in an other case i called my capital to help me dealing with some K-s around a station. it was on the other side... Ive finished killing, i dont remember if 5 or 6 K-s and it still was on its way just going around the station :( yeah, this is what I call a letdown :) inbetween there would be my proposed solution which is quick and simple and looks a lot better than any of these.

ohh, and A* pathing in space is not the best due to the insane amount of possible paths. determining the geometries of the obstacle is a lot easier.

what i dont understand... why caps cant destroy asteroids with their huge guns? pathing would be so much easier... (ive missed this from X3 too and i think it should be in XR too) capital wanna go through dense asteroid field? grab ya guns and melt them. the small bits should just bounce off the shield with dealing minimal to no damage anyway. (ohh, wait, i guess asteroids in XR are just big static object so no physics other than collision detection so they couldnt even bounce :( sad, really sad)

this is how capships should fly in asteroidfields: https://www.youtube.com/watch?v=MLtlcSR9A6M

User avatar
Observe
Posts: 5079
Joined: Fri, 30. Dec 05, 17:47
xr

Post by Observe » Tue, 30. Aug 16, 16:23

Lack of collision avoidance, is the single-most reason I cannot play this game. I could put up with just about every other shortcoming, but this totally breaks any semblance of immersion for me. Of all the X-games, Rebirth has the absolute worst (read no) collision avoidance. Same in highways. Constantly bumping other ships makes it impossible for me to role-play in any fashion whatsoever.

User avatar
Santi
Moderator (DevNet)
Moderator (DevNet)
Posts: 4046
Joined: Tue, 13. Feb 07, 21:06
x4

Post by Santi » Tue, 30. Aug 16, 21:55

Very interesting post from CBJ, dev for Egosoft, regarding the subject of pathing in another thread:
CBJ wrote:Let's just clarify a couple of things about pathing here, because there seem to be some misconceptions. Disclaimer: I'm not the "pathing guy" so a) I'm not defending my own work and b) I don't have all the fine details.

Games up to and including X3AP did not have any kind of "pathing" AI to plan a "route" from A to B within a sector. Ships could be given a destination and they would fly towards that destination in a straight line. If something got in their way then they would turn and fly away in a random direction and then return to flying towards their destination, again in a straight line. The method for determining whether something was "in the way" was basic at best, with essentially just a detection range to play with. Increase the detection range too much and ships would spend most of their time flying in random directions trying to avoid things; decrease it too much and ships would keep crashing into one another. All ship movement used this same system, including for situations such as "dogfights", and it was extremely limiting. There was nothing much that could be done to improve this, partly because as a single-threaded game there was no time for more complex calculations for the hundreds of ships that needed to be processed.

With XR we clearly needed to take a completely different approach. One major difference is that pathing calculations can run on a separate thread, partially freeing it up from the usual frame-by-frame cycle. This allows much more complex calculations to be made and means that ships can now plan a route, and as part of that route can fly paths that are not just straight lines. However, the flipside to that is that the environment they are flying in is also much more complex. While ships in X3 have no option but avoid other objects by a huge distance in order not to bump into them, ships in XR need to be able to fly close to other objects, for example, in and out of the complex spaces created by station structures. As a result, there still has to be a trade-off between making the pathing system "intelligent" and preventing it from affecting performance. Turning off collisions between certain types of objects is not a "solution" to some kind of "failure" of the pathing system, it's a performance optimisation to ensure that pathing calculations don't slow the game down too much. Of course it's not perfect, and of course we'd like to improve on that, but it's not a case of trying to hide an underlying "problem" as some people keep claiming.

Regarding the video of the ships colliding repeatedly at the gate, yes it's amusing, but when you analyse it it's not as trivial to solve as some people seem to imagine. If you consider two people trying to pass one another in a narrow corridor, and how they often end up going in the same direction several times before they manage it, you will see why. They usually only solve the problem by some form of direct communication, for example with one person indicating to the other the side on which they should pass. The AI pathing equivalent would be communication between pathing tasks for different ships, which is obviously possible, but trickier to do in practice for a variety of reasons. Similar explanations apply to other scenarios where the pathing is not as good as we'd like, such as small ships hitting station hulls; they are trying to fly through complex spaces, and sometimes the pathing just doesn't get it quite right, for example some calculation isn't accurate enough, or the logic isn't able to handle some odd "corner" scenarios. Despite the glitches, this is fundamentally "better" than X3, where flight close to the surface of other objects was not even possible.

In X3 there was no way to solve the problems that were reported because the pathing system had been operating at the limit of its capabilities for a long time. With XR there are clearly some things that are not as good as you, or indeed we, would like them to be, but there is plenty of scope for improvement within the framework that has been created.


Original post can be found here:

http://www.egosoft.com/X2/FORUM/viewtop ... 74#4530374
A por ellos que son pocos y cobardes

bambikaka
Posts: 153
Joined: Sat, 26. Dec 15, 13:24

Post by bambikaka » Wed, 31. Aug 16, 00:04

Santi wrote:Very interesting post from CBJ, dev for Egosoft, regarding the subject of pathing in another thread:
CBJ wrote:Let's just clarify a couple of things about pathing here, because there seem to be some misconceptions. Disclaimer: I'm not the "pathing guy" so a) I'm not defending my own work and b) I don't have all the fine details.

Games up to and including X3AP did not have any kind of "pathing" AI to plan a "route" from A to B within a sector. Ships could be given a destination and they would fly towards that destination in a straight line. If something got in their way then they would turn and fly away in a random direction and then return to flying towards their destination, again in a straight line. The method for determining whether something was "in the way" was basic at best, with essentially just a detection range to play with. Increase the detection range too much and ships would spend most of their time flying in random directions trying to avoid things; decrease it too much and ships would keep crashing into one another. All ship movement used this same system, including for situations such as "dogfights", and it was extremely limiting. There was nothing much that could be done to improve this, partly because as a single-threaded game there was no time for more complex calculations for the hundreds of ships that needed to be processed.

With XR we clearly needed to take a completely different approach. One major difference is that pathing calculations can run on a separate thread, partially freeing it up from the usual frame-by-frame cycle. This allows much more complex calculations to be made and means that ships can now plan a route, and as part of that route can fly paths that are not just straight lines. However, the flipside to that is that the environment they are flying in is also much more complex. While ships in X3 have no option but avoid other objects by a huge distance in order not to bump into them, ships in XR need to be able to fly close to other objects, for example, in and out of the complex spaces created by station structures. As a result, there still has to be a trade-off between making the pathing system "intelligent" and preventing it from affecting performance. Turning off collisions between certain types of objects is not a "solution" to some kind of "failure" of the pathing system, it's a performance optimisation to ensure that pathing calculations don't slow the game down too much. Of course it's not perfect, and of course we'd like to improve on that, but it's not a case of trying to hide an underlying "problem" as some people keep claiming.

Regarding the video of the ships colliding repeatedly at the gate, yes it's amusing, but when you analyse it it's not as trivial to solve as some people seem to imagine. If you consider two people trying to pass one another in a narrow corridor, and how they often end up going in the same direction several times before they manage it, you will see why. They usually only solve the problem by some form of direct communication, for example with one person indicating to the other the side on which they should pass. The AI pathing equivalent would be communication between pathing tasks for different ships, which is obviously possible, but trickier to do in practice for a variety of reasons. Similar explanations apply to other scenarios where the pathing is not as good as we'd like, such as small ships hitting station hulls; they are trying to fly through complex spaces, and sometimes the pathing just doesn't get it quite right, for example some calculation isn't accurate enough, or the logic isn't able to handle some odd "corner" scenarios. Despite the glitches, this is fundamentally "better" than X3, where flight close to the surface of other objects was not even possible.

In X3 there was no way to solve the problems that were reported because the pathing system had been operating at the limit of its capabilities for a long time. With XR there are clearly some things that are not as good as you, or indeed we, would like them to be, but there is plenty of scope for improvement within the framework that has been created.


Original post can be found here:

http://www.egosoft.com/X2/FORUM/viewtop ... 74#4530374
yeah, now this "Turning off collisions between certain types of objects is not a "solution" to some kind of "failure" of the pathing system, it's a performance optimisation to ensure that pathing calculations don't slow the game down too much." is just .... :/ it clearly happened to stop the continuous crashing of ships. this is only good against laymen. those know how physics simulation works on computers know very well that collision detection ISNT OFF in XR simply the effect coming after a collision is not the explosion of the ship but a bouncing effect that even calculates correct bouncing directions (aka takes MORE computing time). ffs! now this is where its clear how much they think we are stupid!

ohh, and for me to solve their "but when you analyse it it's not as trivial to solve as some people seem to imagine" problem, for good money i will solve it for them. i will charge 5 years of dev time and it will take about 10 minutes (it would be 2 if i wouldnt make a coffee in the meantime :) )

Post Reply

Return to “X Rebirth Universe”