r/howdidtheycodeit • • Jan 03 '25

How did they code FIFA

I am football fan, last time I was playing FIFA, I was amazed like how player manage their run when they are in offside position. I have just start working on game engine. Now I am curious like how they manage to control all 22 player position and movement. Can you suggest me any resources, tutorial or book, that mention how football game build and implement all logic

0 Upvotes

4 comments sorted by

View all comments

Show parent comment

5

u/djgreedo Jan 03 '25

From my experience playing the game it's mostly:

if(player.State == State.Winning)
{
    BecomeInvincibleAndForceGoal();
}

2

u/SurocIsMe Jan 03 '25

which is why I saty away from these games xD