Posted by: lljkkennedy | March 29, 2010

Bug: Framerate degraded by NPCThink

The NPCThink function for my Agent has to interrogate the world to get all the preconditions for the world state. Unfortunately, this destroys the frame rate because it has to traverse the full list of level entities, and the think function is called every frame.

Fix: Limit the drop into the interrogation function to only happen every 2 seconds – the state will not change so much in 2 seconds to have any effect on the performance of the planner, and this fix improves the frame rate tremendously.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s


%d bloggers like this: