Quantcast
Channel: SteelGolem's Ano Sekai » AI
Viewing all articles
Browse latest Browse all 7

More Prototype Progress

0
0

I’ve been working pretty much nonstop since that last post, with various successes and failures. Let’s start off with a screen, shall we?

A Healer heals a Warrior, while a Wanderer waits for an upgrade.

Noteable changes and additions:

  • Basic Item system
  • Basic Gambit system
  • New npc class: Healer
  • New item: Heal spell
  • New item: Pickaxe (used to remove blocks)

NPCs

When NPCs enter the world, they start as wanderers. They follow you to the town. Once near enough to the town crystal, you can assign them a useful class – Warrior or Healer. The Warrior gets a melee weapon and extra HP, while the Healer gets a heal spell. The gambits on the NPCs define how they act.

You can use the upgrade items on any NPC, and have any number of either class.

Gambits

Each NPC class has a default gambit setup that makes the class useful. The Warrior will “attack” “foe: nearest”, and if there are no foes in its range of sight, it “wander”s. The Healer will “heal” “ally: lowest hp” first, and if the target or action fail for some reason, it will “heal” “ally: hp < 100%”. If there’s nothing to heal, it wanders.

I tried to make each gambit target and action “smart”: There are certain conditions where it doesn’t make sense for a gambit to fire. For example, if some gambit’s action is “heal”, and its target is found to have all of its HP already, then the gambit fails and the game moves to the next gambit. It’s pointless to heal something that’s already full, right?

Both monsters and NPCs have gambit sets. This makes it easier to build new creatures, and check to see what might be failing in AI code. When I have a decent number of gambits to use, I’ll set it up so you can change the gambits around on NPCs in-game.

Items

So far only the player has an inventory, but it’s pretty straightforward for me to add inventories to the NPCs and monsters. I’ll be doing this in the very near future. I’ll also be adding an inventory trading mechanism so it’ll be easy to give NPCs items and let you choose what they have equipped. I’ll probably set it up so they automatically equip any stronger items you give them.

While I’ve made all the above progress, I was kind of stupid yesterday. I spent most of the day trying to figure out how to set up scripting. There isn’t enough here to bother with that! I don’t know what I was thinking, I had it on my mind and then I tried my hand at it. I was even ready to try building a roguelike that would do everything out of scripts! Then I came to my senses. I may still go to a scripting language eventually, but I want to develop my game as quickly as I can.

I have so many things I want to do, I don’t even know what to do next. I’m doing my best to stay focused on Keeping It Simple and driving my efforts to get One Of Everything in. The next goal right now should be to assign NPCs to/from the player’s party. After a bit of a break, I’ll try to start on that.

One of the guys that’s building Dwarf Fortress said that it’s not easy to balance the time put in to design and implementation. I’m starting to understand what he meant.



Viewing all articles
Browse latest Browse all 7

Latest Images

Trending Articles





Latest Images