Jump to content
  • Advertisement
  • entries
  • comments
  • views

The brains were inside you all along

Sign in to follow this  


I've been working on the first inklings of AI for the zombie hordes in Afterglow. One of the things that you'll see improved over Glow is that different AI classes will act differently; in Glow, every AI character had the exact same behavior.

Afterglow implements its "AI" in the same way that Novarunner did: through pluggable "brains" which control the linked actor during an update (and also when receiving various stimuli: pain, enemy locality, etc). I have a basic skeleton framework of stimulus response and idle updates, and a sample "brain" which doesn't really do anything except run on the spot. As development progresses, I'll update the sample brain to use more of its facilities, then begin implementing the subclass brains for each enemy type.

One of the big problems I've been dreading is tackling pathfinding. While I had a reasonable A* implementation going in Glow (albeit with a sloppy tendency to cut corners), I will have to spend some actual time thinking about the problem in order to provide pathfinding through my extremely sparse, convex levels. One thing I've thought of is explicitly placing waypoints for the AI to follow to get from point to point, but this might be prone to failure and will mean more fiddly "content maintenance" than I really should be doing. We'll see how it goes.

I've also been helping Trent a little bit with his first attempts at iPhone development. Soon, he (like all others) will be unable to resist the lure of the Apple Macintosh, at which point I will cackle maniacally and move back to the Amiga because the Mac is too popular.
Sign in to follow this  


Recommended Comments

I, for one, look forward to Amiga Glow.

The pathfinding problem is certainly a nasty one. I haven't tacked it yet (my "Pathfinding" mode just uses direct line), but my current plan is to break the world into a series of edge connected quads (or possibly even polygons) and then A* plan my way through the polygons. Once I have a path through the polygons, I'll choose the best line through the connected edges (checking off to the side to see if the adjacent edge is open to know whether I cut across the vertex, or just the edge).

The thing I'm totally clueless on is how to handle dynamic entities that can interact/interfere with navigable paths. So, how does opening/closing a door change the paths enemies will take? How can an AI entity see that a certain path is chock full of other dudes, so he won't be able to go that way. And if all those dudes moved, how can he re-plan.

Share this comment

Link to comment
My current assumption is that they'll use the path points for most of their navigation, but at a high level ("go from the living room to the dining room") and then resort to their usual retard behavior when they have found the approximate right location (zombies: "idle until you see the player, then chase after him in a straight line until you lose sight"). A* is easy to apply there since I have a connected bidirectional node graph with costs.

I don't have any dynamic entities which should influence pathing behaviour (other than sentry guns, but they don't know that you control those now - mwa ha ha). I'm hoping that this rough approach should work well enough.

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 GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net 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!