I'd like to point out why pre-calculated paths are good and why "fully dynamic AI pathfinding" is bad.omfgjohnnyisback wrote:0:24 Admits they use static pre-calculated waypointing in this game for performance purposes (why the f**k?! if it's not a console game) and is followed by Bernd implying that fully dynamic AI pathfinding is actually bad for immersion. LMAO!MrSuperKarti wrote:Im just going to drop this here: http://www.youtube.com/watch?v=dt4B4e3i5_0
Today Matthias shows us how the game calculates paths to allow smooth movements for AI ships even inside complex geometries like the new X Rebirth stations. The video shows a mid size transporter ship unloading energy and to get to the docking position it flies very deep into the geometry of the station.
... if i would be that "Matthias" i would rage around my office now kicking asses for making my work look terrible.
Specially the last 2 Minutes are pretty awesome to compare what they say vs what we got.
Money Quote: "X-Rebirth is optimized for Computers of the Future!"
Efficiency is a great thing in programmiing. Because you only have so much of the CPU to use, removing calculations from one bit means you can spend those on other parts of the game. In this case, rather than taking every single ship in the universe (or however much it needs to calculate) and saying each frame "Alright, now where am I going to move" and calculating that they opted to have the ship calculate a spline when it needs to move. Instead of calculating the path every frame it now just has to move the ship along the pre-calculated spline.
If this was implemented correctly, paths would make sure they weren't going to collide with another ship or station at any point on their destination: since the ships are mostly following pre-calculated paths the generation could calculate if two paths would cause the ships to collide. From a player's perspective they wouldn't be able to tell at all if it was calculated every frame or not and it saves an extreme amount of processing power, which can be used elsewhere.
The problem which people are seeing is that obviously they're screwed it up. Capital ships flying through each other and stations, trade ships like in the video just aimlessly bouncing off stations. The issue is probably with their path generation code failing to detect future collisions. I don't know whether it's through errors or shortcuts, but that's my take on it.
Hopefully that has cleared it up a bit.