Weekly Update - NPC Conversations, Stylized Text Rendering, Bug Fixes

This week I continued work on the NPC conversation system, stylized text rendering, and fixed some bugs that were in the way of the next test build.

Hi everyone! It's the start of a new year, and with that I've been mentally reviewing the previous year and planning for what I'd like to accomplish next. I've started working on a video update where I'll demonstrate the new stuff that was added in the second half of 2022, but in the meantime here's a summary of what I've been working on over the past couple weeks.

NPC Conversations

While the number of working and prototype gameplay systems in Antilia continues to grow, the game is still missing a core game loop. You can gather and fish, but there's still not enough reason to do so yet. To help with that a bit more and give the player some direction as to what they should do next I've been working on an NPC conversation system. It's still a work in progress, but is starting to become functional.



The NPC conversation system continues to improve.

The standout feature that was added since the last update is the stylized text rendering system. This system allows me to mix different fonts, text sizes, colors, and even animated effects in the NPCs lines of dialog. The addition of these styles and effects should help give the NPCs more personality.

Not to dive too deep into the technical details, but one really nice feature of this new system are named styles - something similar to HTML's Cascading Style Sheets. This system makes it possible to declare styles at the beginning of an NPC's conversation file such as "default", "angry", "surprised", "irritated", etc. Each style declaration can start by inheriting from another style, then modify it. By doing it this way, the default font and color for a character only needs to be specified in one place. Likewise to change the color and effects applied to "angry" text only one line has to be changed and that style will change everywhere in the conversation where the style is set to "angry".



A clearer view of some of the text effects.

I still have a few things yet to do on the conversation system. I'll re-iterate on this list I presented last week:

  • Text Styles - Having a system to render character dialog in different fonts, styles, and colors would give the characters a lot more personality.
  • Multiple Text "Pages" - You've seen this before in a number of games, where the game presents one line or "screen" of text at a time and waits until you press a button before proceeding to more dialog.
  • Playing Animations - Each page of text can play an animation on the character who is speaking.
  • Variables & Conditions - A system for setting variables, limiting response options based on conditions, and inserting variables into text. (Such as having the dialog include the player character's name or title.)
  • Lua Scripts & Quests - I'd like to be able to execute Lua scripts based on dialog selections, as well as add/remove items to a Quests list on the game menus.

After the last update I presented some ideas on Discord that were well received so I'd like to pursue them. For one, when the player responds to the character (or in the future if multiple NPCs are speaking with the player) I'd like the camera view to switch between the NPC and player when responding. I think it'd be neat if there was a generated voice effect that went along with the dialog, and I may experiment with over the next few weeks.

Alongside this I'm also designing a quest system, but that is still mostly on the whiteboard. I see two kinds of quests in initially - player quests and server quests. Player quests are between an NPC and a single player. Server quests on the other hand might be initiated by a single player (or other event), but once started all players would be allowed to participate in. For example helping Torliila acquire a new perfume might be a player quest, while planning and participating in a fishing contest would be a server quest that everyone can join in on. (We've also discussed quests or events that reset after a time, such as iichii attacks against villages, but we'll save that discussion for another time.)

Bug Fixes

A few of the changes and improvements I've made in the past month have been a case of two steps forward, one step back. For example while addressing the rendering bugs on AMD graphics cards I inadvertently broke a few of the shader programs.

This week I caught up fixing some of these new bugs so that our next test build will be a clear improvement over the last build (instead of trading one set of bugs for another).

  • FIXED: Eyes render white on Character Creation and Select Character screens.
  • FIXED: Objects being held by characters appear in the wrong place on the Select Character and Inventory screens.
  • FIXED: The Game Object Editor is generating misaligned icons for inventory items.

A few that still remain to address before the next test:

  • BUG: Text spacing in the chat window appears off. Sometimes words appear with two spaces between them. (This was caused by changing the default fonts while addressing a licensing issue.)
  • BUG: The NPC Conversation system has temporarily made the "Sell to Merchant" interface inaccessible. This can be fixed by implementing the "Shop" button on the new Conversation UI.

That's all for this week however. Thanks for reading!