Tuesday, 19 April 2011

TnF: APA Pre-Alpha Work #9

Hey, I'm back with another update.
This blog update is similar to the last.  I'll take a minute to explain my progress on what NPCs can now do within the world of Train n' Fight.

Hungry NPCs check their inventory for food.  If there is no food, they go to the store and try to buy food.
If the shop owner isn't there, or they have no money, or there is no food for sale, they go out of town and forage/fish/etc.
Afterwards they sell their excess haul to the general store.  The next hungry NPC who goes to the store buys what they just sold to the store.

The world map is generated randomly, I told it to only generate one town in the world to test the NPC behaviour.  Here's some screenshots of part of the world map (the NPCs are the magenta squares (big so you can see them clearly)):

Group of NPCs heading into town.

  NPCs at the shop trying to buy food.

 No food in any shops yet, NPCs head out to find food.

 NPCs head back to buy/sell at shops.

NPCs harvesting.

2 comments:

  1. I assume that there'll be some sort of minimap or worldmap thing so we can see where we're going? Or will it be entirely scavenging, at least until there's a compass item or something of that sort.

    And the white squares are the buildings, yeah? It looks like it's coming along well. Can't wait to see a video of the AI in action.

    ReplyDelete
  2. @GianniRocco
    Yep, white dots are the buildings. When all the NPCs are huddling around them, that's when they're buying supplies.

    As for a minimap or similar, I prefer to try keep things as in-game as possible. So if there is a minimap, or a full size map, no doubt it will have to be created(or bought) in-game before you can use it. Also I think it would be fun to have a tracking spell, so that the target of the spell will show up on a magic map, I'm sure you know the kind of thing.
    At the start though I am probably going to show the map, like how Dwarf Fortress shows you the map it's created. So players can decide if it is(has generated) the sort of world they would like to play in.

    ReplyDelete