Jump to content

COM takes control movement logic summary

Recommended Posts

THis is what happens after the COM has done there predefined moves and they are the ball carrier.  


From the source code this is the ENTIRE Com movement Logic (This example is from the COM is P1 perspectuve)


Is com near out of bounds? (YES, set direction to left or right depending on P1 or P2)


This is the first logic check so com will ALWAYS run straight once they are near (1/2 yd) of being out of bounds


Is there a defender the COM can collide with IN FRONT of the runner? (NO-> move towards middle of field)


If all the defenders are behind the com runner he will move towards the middle of the field at a very mild direction.




The collision check is biased in the RE to SS order. And it only puts the first 4 it finds as players to check. So the com's decisions MIGHT not always be optimal. It counts how many of the a possible 4 are above or below. Positive number = more above. Zero= even. Negative number equals more below. 


The com direction either gets adjusted  up or down 11 degrees per frame depending on the check above. If there are an equal number of players above and below it will mildly move towards the middle at a constant  169 degrees or   191 degress where 180 degrees = right. 


The com can never go straight up its max upwards direction is 112 degrees where 90= up 

The com can never go straight down its max upwards direction is 248 degrees where 270= down 









Share this post

Link to post
Share on other sites

cool.  to be clear, this info is related to the DF in FCFFE0DFFEFC, for example?


where can we tweak it (the COM angles and stuff)?

Edited by buck

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.