View Full Version : Goalkeeper AI
statto
08-07-2006, 02:25 AM
Hey Si,
In NSS I've noticed that the majority of my goals are scored because the goalkeeper gives me the inside post.
Ive played more goalkeeper than not in the past (not much) but the way I was taught - and this is by far not necessarily correct - was to try to cut off the angle of the goal from the attacking player.
Therefore, shouldn't the Goalkeeper try and cut off the angle of the shot instead of running out (when there are other defenders in the box) and having me dribble past him into the back of the goal?
Also, if there are any other GKs out there, how do you think when you're playing in different situations? If we could get the goalie AI down this game could be less of a goalfest :)
Fabrizio Gatti
08-07-2006, 08:11 PM
I 'm not a goalkeeper, but I do play football a lot, and I think in corners GKS run to the spot in which the ball is gonna bounce, so it could be programmed so :)
AfterDeath
08-07-2006, 09:19 PM
I'm a goalkeeper. I could attempt to help. Personally, to deal with long shots I come off my line to narrow the angle and make sure my body is behind the ball.
statto
08-08-2006, 08:56 AM
Well the technical aspects are good (body behind ball) but what kind of angles are we talking about, how could it be used in game as a formula basically?
Basically, guy coming down the left post directly one-on-one with you, where would you stand? I'd personally try to take away the near post with the angle, but I'm not sure this is the way to do it.
Fabrizio Gatti
08-08-2006, 07:22 PM
I think I'll better let you REAL goalkeepers do that I'm just a midfielder/striker
AfterDeath
08-08-2006, 08:50 PM
Well the technical aspects are good (body behind ball) but what kind of angles are we talking about, how could it be used in game as a formula basically?
Basically, guy coming down the left post directly one-on-one with you, where would you stand? I'd personally try to take away the near post with the angle, but I'm not sure this is the way to do it.
Yeah, I'd go for the near post too.
statto
08-08-2006, 11:44 PM
But the keepers in NSS don't... Cech could have taken the near post away, but instead, he charges out, and jumps after the ball is already past him, not even trying to dive for it. (sigh)
I'm just frustrated.
Fabrizio Gatti
08-09-2006, 12:55 AM
One thing I noticed (actually not about GK AI) is that in SS, when it's rainy, keepers give an excessive amount of rebounds, I know rain makes catching difficult, but rebounds are a lot I believe
Yeah, and sometimes the keepers dive for balls that are outside the post, nothing very wrong with that, but they almost punch the ball back into the box, instead of away, or over the line.
Fry Crayola
08-09-2006, 09:57 PM
I'm a goalkeeper too, so I'll add my tuppence.
The two most important things, especially where the game is concerned (but also applicable in real life), are positioning and diving, in that order.
With your positioning, you essentially want to carve out a semicircle that spans your goalmouth - the more central the ball is, the further away from your goal you should be in order to keep the angles as tight as possible. Of course, you don't want to travel too far and leave yourself open to lobs, so your six yard box is generally a good limit.
The semicircle also needs to go past the edges of the posts. When defending your near post, you want to be standing outside the goals so that any parry can go wide, instead of embarrassingly into the back of the net. You still want to be very close to that post (within arms reach) to give you time to get back if a cross comes in.
As for whereabouts on this semicircle you stand, you generally want to be placed on an imaginary line between the ball and the very centre of the goal line. This gives you the best theoretical position to defend your goal - angles are generally as small as they can possibly be.
Diving should not occur perpendicular to the path of the ball, but rather at an acute angle (i.e. slightly towards the source of the shot). You do this to close the angle, and to give yourself the least amount of travelling to do. It's obviously not always possible given the vast array of shots, and the possibility of being in the wrong position necessitating different motions, but it's a general rule.
Trigonometry is brilliant here - you can easily calculate (on a 2D plane) the angle that the keeper should dive in order to intercept the ball with the shortest distance moved. It's more complex to do it in 3D space, although a quick fix involves ignoring any ball position that isn't of a certain height, thus meaning your keeper will ignore any angle that gets him underneath the ball with no way to reach it. As a result, your goalkeeper will know the angle he needs to move.
It's important to make the keeper analogue. He must have full three-sixty degree movement when diving. If he doesn't then he'll be more susceptible to sweet spots. I'm sure we've all scored goals in SWOS and even NSS where the goalkeeper fluffed a shot by being restricted to eight-way diving or less. This shouldn't affect NSS4's hopeful ability to control the goalkeeper, as it shouldn't be too difficult to ensure that the player's dive button has a certain degree of automation to reduce frustration... either that or analogue pad support, but that's another thread.
Judging the angle is something that most keepers can do after a bit of practise. Either that or I'm a very good goalkeeper (with terrible positioning, no height whatsoever and the agility of a small, pre-mutation turtle). So although there is always room for error, it's rarely pronounced and doesn't really deserve an attribute (you'd never be able to measure it, for a start). A few degrees here or there, not much more.
So, positioning and diving. These two together would give a strong goalkeeping challenge although far from perfect. To add variation, you'd use the attributes - positioning, reflexes, agility and so forth to make slight tweaks to the goalkeepers and highlight their foibles. It'll make weaker goalkeepers easier to beat for readily understandable reasons. Keepers with duller reflex would find things more difficult as they can't cover as wide an area with their actions, whilst those with poor agility would suffer likewise but for different reasons.
Both of those are fairly easy to implement, I think. The more complex AI issues (which turn a competent goalkeeper into world class) involve decision making and, if you fancy, line of sight. The latter is a concern if you want your goalkeeper to be handicapped by having players in the way, blocking his view. It can add a touch of realism but it's something that's best added towards the end. Decisions are more important.
Decisions are about making the right choices and sticking to them. Knowing when to come for that cross, close the attacker, parry or catch. Being 5'8" I don't come for many crosses, but if there's a part of my game I enjoy the most it's marauding towards an onrushing striker with fire in my belly (it's the curry the night before) and the insatiable desire to slide into the ground and clutch the ball like it was a teddy bear.
I can't tell you if I'm doing it right, but it tends to work more often than not and seems logical. When faced with a one-on-one situation, I time my run with the attacker's dribbling. Because a player is typically moving fast after breaking free from a defender, he'll not have full control. If I make my run just after he takes another touch, I can hopefully get there (or at very least close the angle and put pressure on him) before he does and smother the ball.
I find that if I'm too slow (or just too far away and made the wrong decision to come out), then that ball is going to be nudged past me or I'll be made to look a fool otherwise. So timing that run is essential.
NSS3 has a "knock-on" control where you can nudge the ball ahead of you to run faster, except when your dribbling is at 100%. This is perfect - if you can get the keeper to time his run with your touch (and he also needs to actually judge the touch as well - if it's too heavy, he should be more likely to come. Too soft and he should rethink) then you'll have a tough opponent to beat. Of course, the goalie might be one of those who doesn't like to rush to feet, in which case you could always weight the decision-making process to make him less likely to rush unless it's a very heavy touch.
Other decisions need to be made, such as when to go to ground in a close-up situation, or the above example regarding where to stand in a certain situation (my answer would be that it depends on the attacker's body shape and position of the ball - if it's my left post and he's right footed, I'd be more inclined to guard the near post than if he was left footed).
These are important, but a lot harder to put into game terms - they're essentially modifiers on a situational basis as opposed to general rules. Not that my own rules should be taken as gospel, but they've tended to serve me well.
Now if only I could actually catch...
statto
08-09-2006, 10:56 PM
Agreed - I was taught with the semicircle and have basically learned by fire by baptism. Of course I'm even shorter than you, but I'm the only guy who shows up with goalkeeper gloves so they just give it to me regardless :)
Mad2Ad
08-10-2006, 12:26 PM
Im a keeper and i would say that Fry Croyola coments are about spot on yeah the semicircle is 1 of the best ways to cut down the angles. and i think that obviously the main problem with nss is that the keeper comes running off his line even if there are defenders in front of you where as this should only be when the player is throw on goal. The keeper should come out a little to cut down the angles when there are a few defenders round him and he should either come to the player throw on goal and make himself big and try to win the ball. The keepers never slide in nss whereas this is very common part of the goalkeeping everyday match.
Powered by vBulletin® Version 4.1.5 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.