Peaceful Zombies

Finished lots of optimizations today, but you can’t really see any of those in the screen shots.  Other than a small improvement on town and building placements.  Towns are now able to organically grow during the world building step, and they connect correctly with roads now, without drawing too many roads (lots of 2D sorting went into getting that to work correctly).  

But I promised characters and… look!  There are some zombies in there.  They render correctly now, they collide with walls (well, they avoid walls at least) and there’s also a rudimentary (I use that word too much) AI and goal system implemented for all characters in the game.  More after the lovely peaceful zombie screenshot:

ScreenShot 2

Side note, if anyone wants to create some low-res pixel art, let me know.  I need all sorts of 8×8 tiles for decorations (rocks, better trees, debris, etc).  The screenshot above also appears to have one of the old tire decorations lying on the road.  I don’t see any of the animal skulls I made though, but they do spawn fairly infrequently.

Anyway, back to the AI system.

The current design is fairly simple, and I’ll extend it as needed, but for most of the upcoming features it should work fine.  Characters have a list of goals that they’ll try to achieve / carry out.  Most goals are simple, but some goals do encapsulate other goals as well.  For example, the SearchForX goal is the same as a Wandering goal, except it can be interrupted at any point if the character finds or observes the thing it was looking for.  This can be anything that has been defined in the world.  Food, items, zombies, friends, enemies, buildings, roads, water… you get the picture.

The goals that are available right now are:

  • Wander: Used by the zombies mostly to shamble around, it’s basically a local area search with no end conditions.
  • WalkTo: Uses an A* search to calculate a valid route from one point to another.  This will be used by characters to “find home” or move to the “last known location” of something important (missing people, lost items, etc).
  • Idle: Characters following this goal basically just wait for a broadcast to give them a new goal.
  • SearchForX: Character wanders in a location until it finds the thing it’s looking for, or time runs out.

Still on the short list are goals like: Escort, Alert, Train, Repair… most of the other goals I have in mind are based on character skills, so I’ll have to start working on that system next to take full advantage of more advanced goals.

Both path queuing and goal queuing can be interrupted by “emergencies” as well.  Those are currently not implemented but it was an easy addition and should come in handy in the future.

Up next on the list, 1 collectible item (I’m thinking it will be… money just to make things easy for now) and then I’ll work on the in-game UI.  This might take a little while for me to design correctly, I need to make decent use of the realestate and figure out just how the context menus will work, without being completely overwhelming.  I want everything to be fairly intuitive to control.

2 Responses to Peaceful Zombies

  1. Those zombies are looking good… but clearly there needs to be a “search for BRAINS option….

    Also… this comment system is terribad. I felt like I was applying for a new passport with so many fields!

    • brian

      Thanks. The code for the zombie goals actually does mention “brains”… you just aren’t likely to see it as the player.

      Also, only people with valid passports should be allowed to comment anyway, so it’s good practice for you. If I removed any of those fields, I’d have to spend all day deleting spam comments.

Leave a Reply

Your email address will not be published. Required fields are marked *


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>