It could work for any station, player-built or not. Stations are modular, docks are modules, they're prebuilt. Everything else can be calculated. To be fair, I don't know how it's actually done in this game, but I don't think that this "fly to center" even was a case until some recent patches, i.e. likely something just broke.Gregorovitch wrote: ↑Sat, 15. Dec 18, 23:19 Well, something like that might work were it not for the fact that the player can also build stations, and most build a lot of stations by the end of the game, so that idea is bust I'm afraid.
Weak programmatically implementation
Moderator: Moderators for English X Forum
-
- Moderator (English)
- Posts: 3230
- Joined: Mon, 14. Jul 08, 13:07
Re: Weak programmatically implementation
-
- Posts: 491
- Joined: Tue, 4. Dec 18, 16:54
Re: Weak programmatically implementation
i like these people who thinks everybody is stupid...radcapricorn wrote: ↑Sat, 15. Dec 18, 23:16I was a game programmer, I'd make sure artists placed valid entry/exit directions at each dock, then use those directions to find intersections with the station's bounding sphere, and place smaller approach volumes at those points, directing a ship to first enter that volume before switching to a docking maneuver. Gulp?Gregorovitch wrote: ↑Sat, 15. Dec 18, 23:08 If you were a game programmer asked to code this behavior the correct and professional reaction would be "Gulp!". If it wasn't then you wouldn't know what you were doing.

no its not, it would work with any kind of stations and there are even more ways to do it. there is simply no reason to direct the ships into the center of the stationsGregorovitch wrote: ↑Sat, 15. Dec 18, 23:19 Well, something like that might work were it not for the fact that the player can also build stations, and most build a lot of stations by the end of the game, so that idea is bust I'm afraid.
-
- Posts: 629
- Joined: Mon, 5. Sep 11, 21:18
-
- Posts: 491
- Joined: Tue, 4. Dec 18, 16:54
Re: Weak programmatically implementation
simply to the intersection of the current path and the bounding box of the station. there switch to docking ai. its that f* simple. what more, if x4 would be under my hands the stations would have a proper route system like real towns that could house all flying through ships without a single drop of pathing required...
-
- Posts: 57
- Joined: Mon, 19. Aug 13, 15:05
Re: Weak programmatically implementation
They still cant fix issue when one resource will take all storage space and kill station. Though all it takes is make so each resource only take respective amount of space, if station needs 2 resources then one max take 0.5 of storage. Its a few lines of code. Im a programmer myself as a full time job. So yeah, they are have some issues with programming or designing experience.
Last edited by battou on Sat, 15. Dec 18, 23:44, edited 1 time in total.
-
- Posts: 58
- Joined: Thu, 4. Dec 03, 04:42
Re: Weak programmatically implementation
1km outside the bounding sphere of the station. Or, in simpler terms, max_station_dimension (in either of the 3 axes, assuming the station is not a cube) + 1km from the point they go now (i.e. center of station), in the direction of the line from the ship's position to the center of station (the line that's already plotted on the map).
Really it's basically an issue of picking the point on the map. It's best to pick a point outside the station's radius, then find the closest dock, rather than inside the station's radius and risk smashing into things. You have to find the closest available dock in both cases, but in one of them you risk colliding with things, while in the other you don't.
Really it's basically an issue of picking the point on the map. It's best to pick a point outside the station's radius, then find the closest dock, rather than inside the station's radius and risk smashing into things. You have to find the closest available dock in both cases, but in one of them you risk colliding with things, while in the other you don't.
Last edited by thanos on Sat, 15. Dec 18, 23:49, edited 1 time in total.
-
- Posts: 629
- Joined: Mon, 5. Sep 11, 21:18
Re: Weak programmatically implementation
That would undoubtedly work. The question is how expensive would it be? It requires a bunch of math that is currently not required and therefore saved - multiplied by the number of ships flying around the universe. I suspect that's why they didn't do it. What they do is fast because it's very simple.thanos wrote: ↑Sat, 15. Dec 18, 23:44 1km outside the bounding sphere of the station. Or, in simpler terms, max_station_dimension (in either of the 3 axes, assuming the station is not a cube) + 1km from the point they go now (i.e. center of station), in the direction of the line from the ship's position to the center of station (the line that's already plotted on the map).
Thing is if you get out of your pilots seat on your ship, let your relief pilot take over, and issue an order to dock at a distant station, or anything really, you can watch how they behave. What I see is that they make a move. Then when they've completed it they appear to do nothing sometimes for an appreciable amount of time before they suddenly wake up and do the next move. They appear to sit there thinking a bout it for sometimes three or four seconds or more. My guess is that the pilot is basically waiting for her AI thread to get to the top of the queue and work out what she should do next.
If this was true it would imply the AI nav system is under a lot of resource pressure, hence the decision to keep this as simple as possible. You could argue add additional resources to AI navigation, but at the expense of what?
-
- Posts: 61
- Joined: Tue, 27. Nov 18, 04:42
Re: Weak programmatically implementation
i got shit on for reminding everyone not to preorder and that the game would be busted on release. same devs, making the same mistakes. theres a chance some better docking logic might come out during this game's life cycle, but just look at x3. what a damn shame.
-
- Moderator (English)
- Posts: 3230
- Joined: Mon, 14. Jul 08, 13:07
Re: Weak programmatically implementation
No, it doesn't. Again, all the valid approach points can be pre-calculated only when station geometry changes, i.e. at build/modification time. And the accurate simulation is only required in the player's vicinity, not for the whole universe. You're overthinking this. Or under-, not sure which.Gregorovitch wrote: ↑Sun, 16. Dec 18, 00:16 That would undoubtedly work. The question is how expensive would it be? It requires a bunch of math that is currently not required and therefore saved...
Who said they didn't? I distinctly remember seeing just that: ships flying near the station first and then docking. This whole "fly to center" is recent.I suspect that's why they didn't do it.
-
- Posts: 58
- Joined: Thu, 4. Dec 03, 04:42
Re: Weak programmatically implementation
You can simplify it by treating the station as a square, and storing the coordinates of its 4 corners (yes i know it's a 3-d rectangular shape but this is for simplicity). The values of those coordinates only change when the station plot changes.Gregorovitch wrote: ↑Sun, 16. Dec 18, 00:16That would undoubtedly work. The question is how expensive would it be? It requires a bunch of math that is currently not required and therefore saved - multiplied by the number of ships flying around the universe. I suspect that's why they didn't do it. What they do is fast because it's very simple.thanos wrote: ↑Sat, 15. Dec 18, 23:44 1km outside the bounding sphere of the station. Or, in simpler terms, max_station_dimension (in either of the 3 axes, assuming the station is not a cube) + 1km from the point they go now (i.e. center of station), in the direction of the line from the ship's position to the center of station (the line that's already plotted on the map).
Then, when you want to go to the station, you find the closest of the 4 points relative to your current position and go there. The computational cost is just a few comparisons (really you don't even need euclidian distance here) and it only needs to happen when the ship plots a course, which is not that often.
Really, there's no argument for computational cost here, not with today's CPUs and not with such a trivial problem.
-
- Posts: 176
- Joined: Mon, 4. Nov 13, 19:03
Re: Weak programmatically implementation
Quite ironic.CaptainX4 wrote: ↑Sat, 15. Dec 18, 23:10again belittling the other forum members, i guess you have nothing better to do. op is right in many ways, like it or not
I have been only pointing out how it is.
Happens quite a lot around you does it not?i like these people who thinks everybody is stupid...
-
- Posts: 629
- Joined: Mon, 5. Sep 11, 21:18
Re: Weak programmatically implementation
With respect, I was assuming that the station dimensions would be calculated and stored and build/modification time when considering your suggestion. The issue is that you would have to calculate where the intersection point was between the approach vector and the station "box", a non-trivial calculation. Which you don't have to do at the moment. That may mean a significant increase in computation time, possibly several hundred % since the current way of doing it is so simple. Whatever the increase would be, it undeniable it exists which is basically my point.radcapricorn wrote: ↑Sun, 16. Dec 18, 00:30No, it doesn't. Again, all the valid approach points can be pre-calculated only when station geometry changes, i.e. at build/modification time. And the accurate simulation is only required in the player's vicinity, not for the whole universe. You're overthinking this. Or under-, not sure which.Gregorovitch wrote: ↑Sun, 16. Dec 18, 00:16 That would undoubtedly work. The question is how expensive would it be? It requires a bunch of math that is currently not required and therefore saved...
Who said they didn't? I distinctly remember seeing just that: ships flying near the station first and then docking. This whole "fly to center" is recent.I suspect that's why they didn't do it.
I was not aware they had changed the behaviour. If what you say is true then they have deliberately simplified it and furthermore taken the time to code and test it. I suggest they would have had to have a pretty strong reason to do that.
-
- Posts: 5625
- Joined: Sat, 10. Nov 12, 17:55
Re: Weak programmatically implementation
And at the switch you would realise your ships cant just be taken over by the "dock ai" with its preset routes because the intersection is most likely not on a preset route, or even if it got lucky still there is no guarantee that route is not occupied atm.CaptainX4 wrote: ↑Sat, 15. Dec 18, 23:43 simply to the intersection of the current path and the bounding box of the station. there switch to docking ai. its that f* simple. what more, if x4 would be under my hands the stations would have a proper route system like real towns that could house all flying through ships without a single drop of pathing required...
So then you would have to force the ships to go to some fixed points where dock ai can kick in and schedule a route for the ship.
At that point you would have the same solution we see here. There could be more start points sure, but then your ships would have to keep evaluating the closest one on approach due to object position changes unknown at the time of issuing the fly to command.
Also you need to specify start points so that it satisfies any station geometry - and the more points you got, the more limits you have to introduce in terms of station layout.
Plus the preset routing also needs some level of pathing as it has to avoid other ships not governed by the dock ai - you can't just raise invisible walls around the preset routes as other ships who aren't docking will fly about, including the player.
Or say the player bumps into one accidentally and pushes it away a couple meters, then it has to recover.
All in all i would not mind any dev resources spent on such cosmetics going instead into ship design, economy, or faction behaviour etc. As long as it does work and not produce issues like flying through station geometry.
-
- Moderator (English)
- Posts: 3230
- Joined: Mon, 14. Jul 08, 13:07
Re: Weak programmatically implementation
With respect, stop trying to argue about things you don't understand very well. Calculating a couple hundred ray/box (sphere) intersections per frame (assuming you have a couple hundred ships coming into one station near you) you literally won't notice unless you're running on a potato. Which you're not, given the game's specs. Realistically it's what? 10-20? Stop exaggerating.Gregorovitch wrote: ↑Sun, 16. Dec 18, 00:55 With respect, I was assuming that the station dimensions would be calculated and stored and build/modification time when considering your suggestion. The issue is that you would have to calculate where the intersection point was between the approach vector and the station "box", a non-trivial calculation. Which you don't have to do at the moment. That may mean a significant increase in computation time, possibly several hundred % since the current way of doing it is so simple. Whatever the increase would be, it undeniable it exists which is basically my point.
Not to mention that having all the possible approach points pre-calculated, you won't even need any intersections, just pick closest point.
Or it means there's a new bug. Huh?I was not aware they had changed the behaviour. If what you say is true then they have deliberately simplified it and furthermore taken the time to code and test it. I suggest they would have had to have a pretty strong reason to do that.
-
- Posts: 629
- Joined: Mon, 5. Sep 11, 21:18
Re: Weak programmatically implementation
Calculating a couple of hundred of anything is going to take up computation resources, end of. In X games that is of utmost importance because of the nature of the game's design. My view is that you are looking at this through the pinhole of a single issue rather than in the context of the whole game. That's the problem.radcapricorn wrote: ↑Sun, 16. Dec 18, 01:12With respect, stop trying to argue about things you don't understand very well. Calculating a couple hundred ray/box (sphere) intersections per frame (assuming you have a couple hundred ships coming into one station near you) you literally won't notice unless you're running on a potato. Which you're not, given the game's specs. Realistically it's what? 10-20? Stop exaggerating.Gregorovitch wrote: ↑Sun, 16. Dec 18, 00:55 With respect, I was assuming that the station dimensions would be calculated and stored and build/modification time when considering your suggestion. The issue is that you would have to calculate where the intersection point was between the approach vector and the station "box", a non-trivial calculation. Which you don't have to do at the moment. That may mean a significant increase in computation time, possibly several hundred % since the current way of doing it is so simple. Whatever the increase would be, it undeniable it exists which is basically my point.
Not to mention that having all the possible approach points pre-calculated, you won't even need any intersections, just pick closest point.
Or it means there's a new bug. Huh?I was not aware they had changed the behaviour. If what you say is true then they have deliberately simplified it and furthermore taken the time to code and test it. I suggest they would have had to have a pretty strong reason to do that.
-
- Moderator (English)
- Posts: 3230
- Joined: Mon, 14. Jul 08, 13:07
Re: Weak programmatically implementation
The problem is that ships are not behaving like they're supposed to/used to. That is "end of". Again: the particular calculation you're hung up on, even when needed, is negligible. Don't be ridiculous. Just FYI, when you're moving your mouse, the game performs thousands of quite expensive operations per second (dozens-hundreds per frame, depending on your mouse). Let's maybe cut that out of the game then? Or maybe let's not mix sound? Or just disable collision detection wholesale, why stop on just cancelling hull damage?.. Oh, wait, I know, let's cut out generation of all those Vulkan commands. Totally unnecessary activity.
-
- Posts: 1793
- Joined: Sun, 1. Mar 09, 12:25
Re: Weak programmatically implementation
Totally agree, when I read X3 is barely playable EVEN WITH MODS.. lol I dont know which X3 he / she was playing but it for sure was not the one we were ! lol x3 even w/o dlc or mods blows X4 out the water .. at least for now.. in future I donno.. probably will still blow X4 out the waterrepatomonor wrote: ↑Sat, 15. Dec 18, 22:36 I don't want to defend Egosoft because X4 really is a mess, and the way they are handling releases has to be reconsidered in the future.
But. Saying that X3 is "barely playable even with mods" is such a far fetch, that... Basically, everything disproves that statement. But especially the fact that its a favourite among space sim fans.
-
- Posts: 61
- Joined: Tue, 27. Nov 18, 04:42
Re: Weak programmatically implementation
I'm fairly sure ships have been exhibiting this behaviour since launch. the second I got my trader I ordered the captain to trade whil i was on board and it clipped into the first station it tried to dock at. This is with M size ships though, do L ships do this with their docking piers?radcapricorn wrote: ↑Sun, 16. Dec 18, 01:34 The problem is that ships are not behaving like they're supposed to/used to. That is "end of". Again: the particular calculation you're hung up on, even when needed, is negligible. Don't be ridiculous. Just FYI, when you're moving your mouse, the game performs thousands of quite expensive operations per second (dozens-hundreds per frame, depending on your mouse). Let's maybe cut that out of the game then? Or maybe let's not mix sound? Or just disable collision detection wholesale, why stop on just cancelling hull damage?.. Oh, wait, I know, let's cut out generation of all those Vulkan commands. Totally unnecessary activity.
-
- Posts: 491
- Joined: Tue, 4. Dec 18, 16:54
Re: Weak programmatically implementation
eeeeeerrrrmmm... let me think about it. what about a -NO. if there would be preset routes they could always have simple endpoints that could be targeted which is a simple deduction of coordinates or even better, you can flag the endpoints based on their direction and then its just a flagcheck. preset routes should have forced speed, in this case the only check you need to do is to make sure its not occupied in the entrypoint in the moment of arrival, which is a very simple check, dont even need any route planning, if the route is occupied at any other point its not important as you can never reach an other ship with the same speed. make it one way and all problems solved. you see? no luck involved just planning.pref wrote: ↑Sun, 16. Dec 18, 00:56And at the switch you would realise your ships cant just be taken over by the "dock ai" with its preset routes because the intersection is most likely not on a preset route, or even if it got lucky still there is no guarantee that route is not occupied atm.CaptainX4 wrote: ↑Sat, 15. Dec 18, 23:43 simply to the intersection of the current path and the bounding box of the station. there switch to docking ai. its that f* simple. what more, if x4 would be under my hands the stations would have a proper route system like real towns that could house all flying through ships without a single drop of pathing required...
So then you would have to force the ships to go to some fixed points where dock ai can kick in and schedule a route for the ship.
At that point you would have the same solution we see here. There could be more start points sure, but then your ships would have to keep evaluating the closest one on approach due to object position changes unknown at the time of issuing the fly to command.
Also you need to specify start points so that it satisfies any station geometry - and the more points you got, the more limits you have to introduce in terms of station layout.
Plus the preset routing also needs some level of pathing as it has to avoid other ships not governed by the dock ai - you can't just raise invisible walls around the preset routes as other ships who aren't docking will fly about, including the player.
Or say the player bumps into one accidentally and pushes it away a couple meters, then it has to recover.
All in all i would not mind any dev resources spent on such cosmetics going instead into ship design, economy, or faction behaviour etc. As long as it does work and not produce issues like flying through station geometry.
"At that point you would have the same solution we see here." what? how would any of these get even close to the
-force flying to the center of the stations
-turn around and fly to the dock
kind of pathing? we could accept flaws in pathing, lets say sometimes they hit walls and bounce off, they happen with asteroids and on the docking procedure as well but nobody cares, those are minuscule issues compared to this forced crap.
"Also you need to specify start points so that it satisfies any station geometry - and the more points you got, the more limits you have to introduce in terms of station layout." sure, you realize those restrictions are already kinda there right? and so they should, even more than now where station modules can clip into each others
"you can't just raise invisible walls around the preset routes as other ships who aren't docking will fly about, including the player." just about the player and criminals should be able to break the fixed routes and even them only with penalty, you cant just drive irl in the oncoming lane or through a park
"Plus the preset routing also needs some level of pathing as it has to avoid other ships...Or say the player bumps into one accidentally and pushes it away a couple meters, then it has to recover" these already in the game, just watch the civilians and they only need to kick off if an event happens, otherwise they are off
"All in all i would not mind any dev resources spent on such cosmetics going instead into ship design, economy, or faction behaviour etc. As long as it does work and not produce issues like flying through station geometry." but but but, we are exactly talking about flying through station geometry

-
- Posts: 491
- Joined: Tue, 4. Dec 18, 16:54
Re: Weak programmatically implementation
sure, and the crappy fake lifts in the distance take up resources, the all around flashing lights take up horribly lots of resources, the fake miniship traffic takes up even more but they have to save the barely any resource use that would make the game far betterGregorovitch wrote: ↑Sun, 16. Dec 18, 01:24 Calculating a couple of hundred of anything is going to take up computation resources, end of. In X games that is of utmost importance because of the nature of the game's design. My view is that you are looking at this through the pinhole of a single issue rather than in the context of the whole game. That's the problem.


