Sunday 30 March 2014

Simplifying Tactics

Well I've just wasted about a week of work by trying to be too clever!

Not truly wasted though, that's the point of the project; always learning something. Anyway, I had some really intricate ideas involving calculating the ball position, distance from ball and taking into consideration opposition positions with vector maths to come up with some "intelligent" movement which could simulate flock behavior, cohesion, separation etc...

It works, to a point. But the problem is that there are so many variables involved and so many different rules for different positions (center back, center midfielder) etc that it becomes almost impossible to allow the user to define his own formations and tactics.

So I'm going back to the basic method which, I assume, the original Sensible Soccer used. Basically the field is divided into a grid of squares and, for each player position, we define a square that he should try to get to depending on which square the ball is in.

It's a LOT of tedious work to set up, but once the initial framework is in place it'll be pretty quick and easy to create custom tactics though copy 'n' tweak.

The more squares there are, the more realistic and customizable (apparantly that's not a word, why not!?) the tactic, but the more work it is to define. For the sake of the game, I've veered to the side of "more squares for more fun." Here's how the tactical layout looks. You can see the potential for customization that when you consider for every ball position, you can specify which square any particular player should try to get to.

Later on, these basic instructions can be modified by general team tactics like "press" or "cover."

That's 285 positions to specify per player position, per situation. Eek! But remember, half of the positions can be simply mirrored to the other side of the pitch, and certain situations don't need to be specified but can be calculated, eg "one square north and one square east."

No comments:

Post a Comment