More NPC stuff…

Posted in Characters, Zombox on March 10th, 2012 by Tyson Ibele

This week I’ve been working on getting a wider variety of NPCs into the game world. The main type players will come across are “generic” NPCs (shown in the last post). Those are the ones that can offer general information/help/etc.

Other types will be hostile NPCs, NPCs who only want to trade (and who will carry special goods), depressed NPCs, crazy NPCs, etc.

Here’s an example of an encounter with a depressed NPC:

NPCs….

Posted in Characters, Zombox on March 3rd, 2012 by Tyson Ibele

This week I worked on NPCs (non-playable characters). They are basically the other survivors in the city.

NPC AI is based on zombie AI. It runs in a modular behavioral hierarchy. Right now NPCs can perform many different actions. They can wander, give the player attention, attack the player, attack zombies, flee, talk, etc.

If they’re near the player, they can shout phrases in small, floating speech bubbles. These phrases can be greetings, cries for help, taunts, etc.

You can initiate a full chat with an NPC, by walking close to it and pressing the chat icon that pops up in the top right of the screen. In these full chats you can respond to what the NPC says and essentially have a little conversation with them. Certain responses you give will trigger a positive reaction in the NPC, other responses will trigger a negative one. You can also ask the NPC to follow you, or trade with you. If you anger the NPC too much while talking to him, he will attack you.

NPCs will also attack you if you purposely attack them, and if nearby NPCs see this altercation, they will gang up attack you as well.

The full NPC chat system is based on a dialog tree editor that I wrote, which uses Helium for its schematic view. Here is a scaled-down image of a complex dialog tree created for generic NPCs found outside of the sewers:

The blue boxes are branch nodes that are seed-locked to each NPC, so NPCs will “respond” to a player’s dialog choice predictable at that point in the tree. The rest of the branches are chosen at random to keep conversations unique. Green lines represent conversational choices that trigger a positive reaction in the NPC. Red lines represent negative reactions. If you insult/threaten an NPC too much during a conversation, he will attack you.

 

Sewers…

Posted in Procedural world, Zombox on February 18th, 2012 by Tyson Ibele

So these last couple of weeks I’ve been working on the overworld and underground sewer system.

The layout of the overworld has been changed to sync up with the overall storyline of the game, which will involve traveling across three large islands to…well, I don’t want to give too much away right now 🙂

Each island features a sewer system, which is where most of the NPCs live, since they’re the only places free from zombies. The sewers will get progressively larger as you visit larger islands, and each one contains various shops, medic stations, eating rooms, etc. The largest sewer system even contains a derelict gambling room, where you’ll be able to play on old slot machines to try and earn some extra money.

Here’s an image showing the layout of the sewer systems. Note: the largest sewer isn’t finished yet, and is missing many props/decorations.

Here’s a sped-up animation showing the player entering, exploring and exiting a sewer:

Interview on A.D.D Gamers

Posted in Press, Zombox on February 13th, 2012 by Tyson Ibele

A.D.D. Gamers just published on article on Zombox.

Click here to read it!

Fire, explosions, crafting, barricading and food…

Posted in Items, Zombox on February 4th, 2012 by Tyson Ibele

Lots of updates to Zombox this week!

I worked on creating some weapons that allow the player to use fire and explosive power against the zombie hordes. All of these new weapons must be crafted from various supplies.

(all of the following .gifs depict sped-up gameplay footage)

The molotov (click here to view example .gif) is made from a bottle, a lighter and some cloth. Tossing it towards a group of zombies will quickly light them all on fire.

The fire bow (click here to view example .gif) is made from a crossbow, a lighter and some duct tape. It turns normal crossbow projectiles into flaming spears, capable of piercing through zombie flesh while dealing extra fire damage afterwards.

The pipe bomb (click here to view example .gif) is made from a pipe, a lighter and some gunpowder. Great for blowing up zombies, buildings, and anything else in the game.

The boom bow (click here to view example .gif) is made from a crossbow, a lighter, some gunpowder and duct tape. It turns normal crossbow projectiles into explosive darts, which detonate on contact.

I also added the ability for the player to barricade doors with the construction mallet. Doing so will add extra HP to the door, making it harder for zombies to knock it down. Here’s a .gif showing off this new feature.

Finally, I added a food system that requires the player to eat food at regular intervals. If the player doesn’t eat when the food icon pops up next to the player icon in the top right of the screen, after a while the player will lose health and eventually die from starvation. Here’s an image showing how the bubble icon looks onscreen when the player gets hungry:

Collecting supplies and crafting weapons…

Posted in Items, Zombox on January 28th, 2012 by Tyson Ibele

This week in development I worked on getting the weapon crafting system working, as well as giving the player the ability to collect supplies which can be used to construct walls and doorways. Last week’s update showed the ability to construct those building elements, but there was no way to actually gather the raw materials necessary for them. Now, every time you destroy an object in the game, there’s a chance it may drop some useful raw materials that can be picked up.

New weapons can also be crafted now, by combining various pieces together in the crafting window. For example, you can combine a box of nails and a baseball bat to create a nail bat, or a pool cue, some duct tape and a knife to create a lance. Right now there are about ten craftable weapons that I’ve added to the game, but in the future there will be many more.

Also, the construction mallet shown in last week’s update has been given two modes: repair and destroy. Using it to repair an object costs money, and in destruction mode it can damage solid objects faster than most other weapon types.

Finally, new particle systems have been implemented, which generate debris every time an object is damaged. The type of particle emitted depends on the substance of the object being hit. A door will emit shards of wood, a wall will emit chunks of concrete, etc.

Here’s a video demonstrating all of the above features!

 

 

Building and repairing…

Posted in Items, Procedural world, Zombox on January 21st, 2012 by Tyson Ibele

Hey everyone,

First, I apologize for the lack of updates the last couple of weeks. Some extra work was occupying my free time and I couldn’t work on Zombox as much as I wanted.

Regardless, I’ve got quite a big update this week, because Zombox now features a construction system! You can use it to build your own custom buildings and shelters. Once a wall or doorway is built, it only has partial HP, so a player must use the “Construction Mallet” (a new item) to repair it to full health. The “Construction Mallet” can be used to repair any object in the game world. The mallet is currently unbalanced, so there’s no penalty for using it to repair something, but eventually I plan to integrate it into the ammo system, or have it drain the player’s money during repairs, or something else in order to persuade the player to use it wisely.

I’ve also modified the inventory UI a bit to make way for the upcoming crafting system, as well as the supply system. Because it doesn’t make sense for a player to be able to build walls and doorways without the proper supplies, eventually you’ll need to collect scrap metal/wood/concrete before being able to build things. While this system isn’t yet integrated fully, the UI has three new item slots in the bottom left to keep track of the amount of building supplies the player is carrying. Also, in the bottom right of the new UI are three new tabs, which the user can click on to quickly switch between the examination window, the crafting window, and the settings window.

During my work on Zombox in the last weeks, I also implemented Jump Point Searching into the pathfinding algorithm. However, even though JPS performed better than vanilla A* on full paths, the current pathfinding system in Zombox is highly optimized towards returning partial paths, and JPS doesn’t return very good partial paths due to the way it expands nodes. So I ended up reverting back to my old pathfinding system. I worked on optimizing it further too, so it now performs about 40% faster.

Here are some images and animations demonstrating the changes listed above!

 

Zombie AI…

Posted in AI, Zombox on January 1st, 2012 by Tyson Ibele

So, over the last two weeks I’ve been updating the zombie AI.

The old AI system had many problems, was hard to update, and lacked many important features. So I started from scratch and implemented a behavior hierarchy, similar to the one described in this book.

Here are some key features of the new system:

  • zombie AI is now sight/sound based. Zombies will tend to wander around aimlessly, until they see/hear something that catches their attention. Things like the sound of the player hitting an object with a blunt weapon, or firing a gun will attract zombies, but they won’t automatically know what caused the sound. This means that zombies can be distracted with sounds while the player heads in the opposite direction. It also means that it’s now possible to sneak up on zombies from behind.
  • zombies now flock more realistically. No longer will they randomly intersect walls, or the player, or each other. When attacking, they’ll also try to surround their target.
  • zombies will try to break down the doors of buildings, if they see a human/hear a noise inside.

I’ve also improved several other aspects of gameplay. Items that require ammo now display their ammo counter inside their icon, when assigned to any of the active item slots. Also, zombies and props can no longer be hit through walls or other solid surfaces.

Here are some screens showing the debug info I use to help me visualize the new AI system. White lines show new A* paths that are calculated. Green lines point to the next node on a zombie’s path when the zombies is following a sound. Magenta/Cyan lines point to a zombie’s active target (cyan = close, magenta = far). Red lines show the next node on a zombie’s path when the zombie is chasing a target (although zombies are allowed to veer off their path when the target is directly in range). Yellow lines point to a new sound that a zombie has heard.

Screenshot1, Screenshot2, Screenshot3, Screenshot4, Screenshot5

Here are some .gif animations showing various new features listed above.

This animated .gif shows some zombies chasing a player into a building, and trying to break the door down:

This is another animated .gif showing zombies breaking a door down to get to the player:

This is an animated .gif showing some of the new swarming behaviour (sped up 200%):

This is an animated .gif showing how the active item ammo counters look:

 

 

XP, medkits, ammo and more…

Posted in GUI, Items, Zombox on December 17th, 2011 by Tyson Ibele

This week I added several new things to Zombox:

  • it now has an XP system, that allows the player to upgrade his/her character. XP is earned by killing zombies.
  • it now has various healing items that can be collected. Pills, medkits, syringes, bandaids, etc.
  • the inventory GUI has been updated to display ammo counters for the five types of collectible ammo in the game.
  • ammo items can be collected from around the world, each containing various amounts of ammo for a particular ammo type
  • swinging doors will now knock clumsy zombies out of the way

Here are some .gif animations showcasing the leveling system and healing abilities, and an image showing the new inventory GUI layout:

Inventory, hp and other stuff…

Posted in Items, Procedural world, Zombox on December 10th, 2011 by Tyson Ibele

So I wasn’t able to post an update last week due to a busy schedule, but I’m back on track this week.

I’ve fixed lots of bugs and tweaked lots of minor things in the game in the past few days, and many new features have been added:

  • the environment now features broken bridges, dead ends, and various fences placed between buildings to block travel
  • many new scavengable items have been added to the world, including rotten/fresh food types and ripped/clean clothing types. Both clothing and food will offer the player different stat perks and bonuses
  • To feed your character, you just have to drag food/drink over to him in the inventory panel. Animations have been added so that the character eats/drinks what you give him
  • stats are now displayed numerically in the inventory window
  • the hit points of all props in the world have been better adjusted, so things don’t break as easily
  • the remaining hit points of props and zombies are now displayed momentarily in-game after they receive damage
  • when the player is hurt, his icon in the top right corner of the screen gets bloody, and so does his in-game body

Here are some images illustrating the features mentioned above: