View Issue Details

IDProjectCategoryView StatusLast Update
0002562The Dark ModAIpublic07.07.2013 22:34
Reportertels Assigned To 
PrioritynormalSeveritynormalReproducibilityalways
Status resolvedResolutionwon't fix 
Product VersionTDM 1.03 
Summary0002562: AI path around func_statics
DescriptionThe AI currently has problems with pathing around func_statics. There is a bit of comment in the code in game/ai/ai_pathing.cpp that relates to that.

grayman also works on the AI pathing, so maybe he already fixed that, or maybe it is something additional. However, just tracking this so it doesn't get forgotten.
Additional Information                // SZ: Oct 9, 2006: BinaryMovers are now dynamic pathing obstacles too
                else if (obEnt->IsType(CBinaryFrobMover::Type))
                {
                        //p_binaryFrobMover = static_cast<CBinaryFrobMover*>(obEnt);
                }
                else if (obEnt->IsType(idMoveable::Type))
                {
                        // moveables are considered obstacles
                }
                /*else if (obEnt->IsType(idStaticEntity::Type))
                {
                        // greebo: func_statics should be considered
                }*/
                else
                {
                        // ignore everything else

                        // TDM: SZ Oct 9, 2006: Comment this continue out, and the AI will path around func_statics
                        // and the like, even without monster-clip brushes around them.
                        // However, the CPU load is higher and the weapon an AI is carrying
                        // is an obstacle (bad).

                        continue;
                }
TagsNo tags attached.

Activities

grayman

grayman

22.01.2011 19:51

viewer   ~0003474

While working on the movement changes, I temporarily added code to path around func_statics, ignoring AI attachments. I didn't notice much of a decrease in FPS, but on my slow system, I might not have noticed more degradation.

I decided an AI should only consider a func_static in its path when it was bumping into that func_static.

There is a tremendous amount of code in path-finding, and it happens every frame for every moving AI that's not using interleaved thinking. Anything we can do to limit this is worth it.

In the future, it might be worth investigating whether the AI need to pathfind every frame. Not much of the world is going to change each frame, so perhaps doing pathfinding every 5 frames would suffice. At that point, an AI could consider all func_statics in its way.
grayman

grayman

07.07.2013 22:34

viewer   ~0005661

I'm resolving this as "won't fix" since allowing it to happen causes all kinds of problems. Mappers can just use monsterclip to keep AI out of trouble.

Issue History

Date Modified Username Field Change
22.01.2011 13:01 tels New Issue
22.01.2011 13:01 tels Additional Information Updated
22.01.2011 19:51 grayman Note Added: 0003474
07.07.2013 22:34 grayman Note Added: 0005661
07.07.2013 22:34 grayman Status new => resolved
07.07.2013 22:34 grayman Resolution open => won't fix
07.07.2013 22:34 grayman Additional Information Updated