Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Bug Reports / [Dark AI + Dark Physics] Interaction bug

Author
Message
Cash Curtis II
19
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Corpus Christi Texas
Posted: 8th Sep 2006 10:34 Edited at: 8th Sep 2006 11:18
Here is an interesting bug that makes Dark AI and Dark Physics incompatible. In order to use the physics + the AI, you have to reset the AI position every loop to the actual location of the physics body. Since the AI position is different than the last position, it considers the body to be moving. This is fine if the body is already moving. However, if it is stopped for whatever reason (Stopped, Stopped and Attacking) then it instantly changes the AI Action to Moving. This makes the animation of the model vibrate back and forth from attacking to moving.

Here is the code to demonstrate the problem. No media, only Dark AI is required. Dark Physics is not required to run it, I have reproduced the problem as simply as I possibly could. Every time it repositions the AI it slightly moves the entity to an offset position, similar to what would happen with a physics body.

Observe the output when the AI entities are functioning on their own. You can control the green entity with the arrowkeys. Hold down Spacebar to see the problem. Any time the red entity stops to attack, the action begins to vibrate from moving to stopped.




Probably the easiest solution would be to add an overloaded function parameter to the command AI Set Entity Position to keep the current action from changing. Also, the command AI Get Entity Is Moving shouldn't return TRUE unless the entity is actually moving. As this command illustrates, it returns TRUE if the position has changed due to the at all due to the AI Set Entity Position command, even though the actual position of the model has not changed.

Hope this example is clear enough!


Come see the WIP!

Attachments

Login to view attachments
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 8th Sep 2006 17:36
Confirmed
Cash Curtis II
19
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Corpus Christi Texas
Posted: 8th Sep 2006 17:51
Awesome, thanks


Come see the WIP!
Dark Fire
15
Years of Service
User Offline
Joined: 23rd Jun 2008
Location: In the code you write
Posted: 27th Apr 2009 04:15 Edited at: 27th Apr 2009 07:33
This is a really big problem that I wish would be fixed. This bug is why I can't make any progress in my game.

What is TGC going to do to fix these bugs?

Thanks,

Dark Fire

My future self met up with one day to teach me what I know today.
Cash Curtis II
19
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Corpus Christi Texas
Posted: 11th Aug 2009 13:44
It's pretty easy to work around.


Come see the WIP!

Login to post a reply

Server time is: 2024-04-18 09:20:30
Your offset time is: 2024-04-18 09:20:30