AI - honestly?

General discussions about X Rebirth.

Moderator: Moderators for English X Forum

Hemmingfish
Posts: 435
Joined: Fri, 14. Mar 08, 23:00

Post by Hemmingfish »

omfgjohnnyisback wrote:
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!" :D
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!
I'd like to point out why pre-calculated paths are good and why "fully dynamic AI pathfinding" is bad.

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.
Ugottabejoking
Posts: 23
Joined: Wed, 20. Nov 13, 11:34

Post by Ugottabejoking »

Hemmingfish wrote:....
Can only agree with all of it Hemming, see one of my posts earlier.
Pantora
Posts: 16
Joined: Fri, 5. Jun 09, 23:55
x3tc

Post by Pantora »

There is something odd about the AI tbh a pile of Energy hauler capital ships where all just packed up, there was around 20 of these ships all parked up columns

This is how Space ships park
User avatar
omfgjohnnyisback
Posts: 92
Joined: Sun, 17. Nov 13, 20:38

Post by omfgjohnnyisback »

Hemmingfish wrote: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)
Do you understand a concept of IS (in-sector) and OOS (out-of-sector) in this game? You only have to simulate everything when the player is around. This is never going to be more than a few dozen of ships, ever. Plus don't forget - this is space, you have more degrees of freedom here. And what's up with all that computers of the future talk? Do you really need to take this dumbed down approach for performance reasons or are you just lazy?

EDIT: Also, do you really think there's no calculations going on every frame? Then how do NPC ships avoid collisions with the player's ship which itself is not flying along invisible spline rails?
Ugottabejoking
Posts: 23
Joined: Wed, 20. Nov 13, 11:34

Post by Ugottabejoking »

So any news whether they take care of this desastrous Ai any soon?
Hemmingfish
Posts: 435
Joined: Fri, 14. Mar 08, 23:00

Post by Hemmingfish »

omfgjohnnyisback wrote:
Hemmingfish wrote: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)
Do you understand a concept of IS (in-sector) and OOS (out-of-sector) in this game? You only have to simulate everything when the player is around. This is never going to be more than a few dozen of ships, ever. Plus don't forget - this is space, you have more degrees of freedom here. And what's up with all that computers of the future talk? Do you really need to take this dumbed down approach for performance reasons or are you just lazy?

EDIT: Also, do you really think there's no calculations going on every frame? Then how do NPC ships avoid collisions with the player's ship which itself is not flying along invisible spline rails?
There doesn't have to be no calculations, there just has to be fewer. Again, the approach isn't "dumbed down": at any point in time the ships are free to create another spline to move along.
AI ship: "The player just intersected my planned path, I shall generate a new one to prevent a collision!"

Are you actually implying optimisation is a bad thing?
Ugottabejoking
Posts: 23
Joined: Wed, 20. Nov 13, 11:34

Post by Ugottabejoking »

The question is more: Predefined paths, as it was shown in that Dev Video: What went wrong? Implemented but bugged? Not implemented and just a placeholder for what might come in the game at some point?

Because every station needs them, now, asap. Paths for dogfights and paths traders take. Paths for small and for big ships. And *tadaaa*, no more bumping cars at staions.


What about flee formations? What about capitalships aligning to each other, isntead of piercing each other?
Tikigod60
Posts: 21
Joined: Wed, 20. Nov 13, 13:47

Post by Tikigod60 »

Hemmingfish wrote: EDIT: Also, do you really think there's no calculations going on every frame? Then how do NPC ships avoid collisions with the player's ship which itself is not flying along invisible spline rails?
They don't generally. Most fighters I engage in do the same 2 or 3 set routines actions even if it means flying into me head first.

And I've been escorting NPC freighters on missions and had them turn into me and ram my ship, only rather than realise and stop to make slight adjustments they just keep carrying on ramming me until I move out the way so they can complete their turn. heh

Return to “X Rebirth Universe”