Advertisement Jump to content
  • Advertisement
Sign in to follow this  
  • entries
  • comments
  • views


Sign in to follow this  


I have taken a break from figuring out the potential physics re-write for now.

Right now I am looking at using a system similar to oliii's cube3d demo, using SAT to find overlaps. I would need to change a couple of things in order to support spheres & ellipsoids with that system, but it shouldn't be too hard.

This morning I have started adjusting how A* is used by the AI. First I made it so that the A* will only take a certain # of maximum steps per Think(). This prevents the fps from diving when the players get somewhere the AI can't follow.

Next I need to change the way the A* is invoked, and it brings up some interesting gameplay choices.

We have a top-down view, and it's possible at times to see objects & enemies from this view that would otherwise not be visible from the player's perspective. This is generally a good thing, b/c it helps the player more effectively play tactically, and fight multiple enemies.

But, should the AI have the same ability to find the player?

One school of thought is that this is one of the player advantages over the AI, and that the AI should remember the last time it saw or thinks it heard the player, and use that as a general direction or destination for its path finding, but not omnisciently know where the player is at any given time.

Another way of looking at it is that the AI should be able to 'see' a player that is on screen from its POV. This would be a bit easier code-wise, but possibly too hard for the player.

We plan to have stealth in the game, so I'm leaning towards the first approach. It would add more suspense if the player were hiding in the shadows, hoping not to be seen by an enemy just around a corner.
Sign in to follow this  


Recommended Comments

I'd definitely go with keeping the AI "in the dark" and having to either remember where it last saw the player, or wait till it has LoS on the player.

For the simple reason that, whilst us players look at our ability to look round corners (or whatever) as fairly normal, if the AI were to do the same most players would probably scream "cheat!!1" [smile]

What you could do to make it interesting is raise the warning level when the AI is on screen... thus if it's just standing there/guarding it might well start looking around a bit more, or generally be a bit more alert. That way it has a similar sort of advantage to the player, without being quite as big.


Share this comment

Link to comment
Good points.

My thought was that the AI would respond to noise. If you were quiet enough, and the other enemies weren't shouting with pain or fear, you could probably sneak past.

So, I think just noise would be a good proxy for nearness to the player.

Share this comment

Link to comment

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
  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!