Echolite - Update #9 - Introducing NPC's, Exploring Quests

Echolite - Update #9 - Introducing NPC's, Exploring Quests

Table of contents

No heading

No headings in the article.

We are back to our regularly scheduled program! After an exciting 2-part devlog setup to introduce machinery into the game, we are mixing up development again by introducing another core feature - NPCs and questing.

Initial Planning

NPCs should add some much needed life into the world, but the challenge is making them believable to the player. Similar to how we added resources, machines, and more, we tried to find ways to make them complex. This complexity should not represent difficulty though. Instead, complexity means that there is a certain amount of depth that supports multiple playstyles.

For NPCs, this means that both their personalities and functions should be multifaceted. It is better to have a limited number of NPCs with several interactions in the world than a large number that only serve a single purpose. Here are the ways we can achieve that:

  • NPCs have more than one job/function
  • NPCs move around the world
  • NPCs allow the player to choose how they respond
  • NPCs change the environment over time
  • NPCs have established relations with one another outside the player’s view

Some of these items (such as AI movement) will come later since this will require other features to be implemented first. With multiple functions, we can center this around our initial NPC designs.

NPC Designs

Thankfully, I did not have to look too far for some guidance with character creations! Thanks to Buch, who you may recognize from previous devlogs in inspiring the game’s UI, they have also designed various character portraits. This is the original state for reference:


These colors are quite vibrant however, in which a recolor is needed. The idea here is that similar to the UI being an “inner” HUD of the robot/player, the character portraits would be renderings of the people he interacts with. Given this logic, the characters can be reskinned using the UI color palette and then setting it behind gray backgrounds to help stand out. Here is the complete look (minus some characters not being used as they were not needed in-game):


Free starter assets can only get you so far though! I need to continue working on my art skills whenever possible, and floating character portraits in the world are not quite “believable.” With these portraits, I went through many failed attempts before nailing the desired look within the world. It likely still needs a lot of work, but here is how they look so far!


What helped the most in designing these figures was sticking to a basic colored outline of the head, torso, arms, and legs. This provided an easy model to try out different looks while keeping the figures consistent and scaled correctly in the world. Perhaps my favorite phrase (all indie game devs can relate), but in terms of animations, that will come later!

Quest Options

With NPCs in the world, we can finally dive into questing! We will tackle the initial setup here, and then (spoilers!), we will finish it in the next devlog. Questing is rather straightforward as many games approach it the same way. While we could deviate from standard design, staying true to certain proven subsystems is likely the route to take in this case. Essentially, we want the following to happen:

  1. Player approaches an NPC
  2. Within a certain radius, they can interact
  3. The NPC searches through available quests
  4. If any are found, pull them up in a panel to be selected

One small thing has been overlooked though…gasp....we haven’t added any quests! Like all other data in the game, we can create a QuestData JSON file. Here is how some of the starting data is structured for what we need right now:


Finally, we can get into the actual logic. Offering 100s of quests all at once to the player would be overwhelming so we need a few factors in place that determine when a quest can be selected. As usual, another fancy list (in no particular order)!

  • Pre-req quest completed?
  • Correct player level?
  • Talking to the right NPC?
  • Is the quest already selected?
  • Is the quest already completed?

For player levels, we can set some basic numbers for testing until questing is completed, as that will reward XP to level up. For checking the status of each quest, this will be handled by the one and only…arrays! If a quest is already completed, then there is no reason to display it again. If a previous quest that is required however shows up in this completed array, then that should allow us to continue. Furthermore, if a quest is already an active quest, then we can simply ignore it. This is regardless of its status, since active quests could have just been picked up or are ready to be completed by the NPC. For now, we leave a fun little comment in the code to add this next time.

The minimal GUI artwork here is not too wild compared to previous work, so you can just enjoy the magic now! Just excuse the placeholder location - a proper housing update will come :D


What’s Next?

The momentum thus far with questing will continue into the next devlog. When the player selects a quest, they will finally be able to complete it! This does mean that multiple different quest types will be added in order to provide some variety in the gameplay. The NPCs have also been rather quiet - that will change soon through a formal dialogue system.

As always, thank you for the support! <3