v0.8.0 It’s Alive!

Published by

on

Hi everyone,

Back again with another devblog. This update has a lot going on and I am really excited to share it all.

Before I dive into it, I want to extend the invite to all the readers here to the Discord server I’ve created for Flask & Barrel. You’ll see more regular updates and discussions about the game there, and I hope to make good use of it as time goes on.

Highlights

NPC Rework

If you’ve been following this project for a while, NPCs aren’t a new addition. In previous updates I added a clone of the player walking around randomly, and cycling through random lines of “dialogue”.

This update completely reworked that, and NPCs have a lot more going for them now. Let me start by introducing you to the first 4 NPCs available in the game. Left to right we have Finn, Rowan, Poppy, and Eloise.

Not only do they look pretty, but they can talk!

Dialogue

Each character has their own dialogue file, which is triggered by specific events going on in the game. Dialogue supports many in-lined commands that allow it to feel really dynamic. Characters can ask the player questions, and respond dynamically to their responses. They may comment about certain weather, or say different things depending on their location.

To go along with this, I’ve created portraits for the characters that appear while you’re in dialogue.

When you talk to NPCs, their dialogue appears on-screen word by word. You can skip through this by pressing the action button.

Pathfinding

Previous versions of NPCs would just wander aimlessly, with no regard to collisions. Now, NPCs use A* pathfinding to navigate through the map and around obstacles. With this, they can follow time-based schedules to move from place to place

Character Creation

For all my tilesets, I use Tiled, which allows me really granular control of each tileset, animations, and extra metadata. To accompany the new character system, I’ve also reworked character creation to be fully data driven.

When creating a character, I just need to create a character tileset. From there, I can populate the source image with the 8 basic animations (minimum, 4 walking, 4 idle), and the engine handles it from there.

This means I can now literally make characters as fast as I can draw them. To go along with this, you may have noticed the character has some updated sprites. I’ve also included a series of idle animations that play when you’re just standing around!

I’ve reduced the idle time here to show them off.

Monsters

The second big addition in this update is monsters! Monsters are an extension of Characters, so a lot of the juicy bits from the NPC section still apply. Monsters are really easy to add, and they are capable of pathfinding.

One thing that monsters do have that NPCs don’t, however, is AI models. In each monster tileset there is a field for AI model, and based on that data, the engine can assign a specific AI controller to that particular monster. This will allow each monster type to have unique attacks, abilities, and behaviors.

I currently only have one monster in the game, my little cubic slime. The AI model for this monster is quite basic. If the player wanders into its range, it locks onto the player and beelines straight for them. When in range, it triggers its attack!

Combat!

What good would monsters be with no ability to fight them? This update introduces the ability for the player to attack, and be attacked. Right now the player only has one attack. When hit, the player briefly flashes red and plays a hit animation, and the same happens when a monster is hit.

This combat system has support for knockback, alternate attack styles and much more.

Controller Support & Keybinding

As the game expands, I wanted to make sure that I support new and different styles of play, and the first step towards that is controller support and keybinding.

Before, every action was tied to a specific input type, which isn’t the best practice. Now, all actions correspond to a particular action input event. These events can be dynamically changed to be triggered by a variety of keys or controller buttons.

For example, right now movement can be accomplished with WASD, or with the left analog stick. You can attack with the A button, or by using the left mouse button.

There’s still a few more things to work on. I still need to figure out navigating inventory slots with a controller, and it would be nice if I had a menu to change the buttons in-game, rather than having to hard-set it in the code.

What’s Brewing?

The next thing I’ve got on my plate is implementing reworked brewing. Last time I talked about brewing was v0.5.0, and I wasn’t fully happy with it. Since then I’ve been doing a lot of thinking. Behind the scenes of this update I’ve been planning a rework to this system that I think will be really fun, and I’ve asked some friends to give me some feedback (Big thanks to dr.pinball, jaxper and Draygyen for all the help!) and I think I’ve got a good plan moving forward.

If you’d like to assist in the feedback process, join the Discord!

v0.9.0 will also focus on some expansion of the town and the surrounding area beyond the single slice that exists now. With all these things, I should be at a point where there’s actually something to do in the game, rather than spawn items in the console and wander aimlessly.

Thanks for reading!

– Nick

Create a website or blog at WordPress.com