Post news RSS Spreading out the AI

On how the AI in Super Sec Soccer tries to be in the right place for the player to take over.

Posted by on

("Player" = human player controlling the action. "player" = soccer player in the field)

This was the first thing I tweeted about Super Sec Soccer:

@dickpoelen wrote: These's dudes play like a bunch of 6 year olds, all clumped up around the ball! Need to fix that

Back then the AI players just ran towards the ball all the time which often led to 75% of the playing field being empty. And that's not ideal.

First, let me explain the goal I had in mind for the AI. It's not there to win the game, of even pass the ball to you so you can score. The idea is that the Player does all the important actions (apart from being the keeper). So that means that the AI players on your team "just" need to be at the right place - or at least, what could be the right place - so that the Player can switch to that player and perform an offensive or defensive action.

That means that they shouldn't all just run towards to ball all of the time. You might need them to be on the other side of the field so you can pass a ball at them. Or to run further back to play defense.

How this is done is that each player is either an attacker or a defender on the left or right side of the field. So each player has his own quadrant that he's responsible for. If the ball is in their area they just go right towards it. But if it's somewhere else on the field that might mean that they go in the opposite direction in anticipation of the chance that the ball might end up on that side of the field.

This is the AI in action with the lines displaying where they want to go:

Super Sec Soccer AI

This means the players are usually better spread out across the field. I say usually because I didn't want to completely remove the clumping 'cause sometimes, it's kind of fun :)

Here's a large chunk of a match, sped up 500%, where you can see the AI using the whole field:

Super Sec Soccer speed match

In that GIF the blue team is completely controlled by the AI, including the blue selected player. That AI has a few more choices to make than just trying to be in the right location, but that's a post for an other time.


its kind of cute! =D

Reply Good karma Bad karma+1 vote

I know I said I like this on TIG already. But I actually can't stop thinking about how cool this game is. I didn't realize this was made in gamemaker either which is awesome. How is the controller support with Gamemaker?

Reply Good karma Bad karma+1 vote
kingPenguin Author

@Pyroinflames thanks :)

@Crateboy thanks again! Controller support in GameMaker is great. Super easy to use. That mainly what I love about GM, everything is made for making games. Guess that's why they called is GameMaker ;)

Reply Good karma+1 vote
Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.

Post news
Related Games
Related Engines
GameMaker Studio
GameMaker Studio Commercial