How NPC Directions Work in UNPAINTED.
by Vicente C.
Published |
23
Share
In UNPAINTED, players can ask NPCs for directions. Here is how the system uses each character's knowledge to guide them.
Amr from Moths Games recently shared the NPC direction system he built for UNPAINTED. Players can ask characters where they need to go for a current objective, but the answer depends on who they speak to.

The first NPC in the scene does not know where Sir Reynald is, so he points the player toward the nearby village of Coastenveil. Once there, the villagers can give a more precise direction.
Amr wants getting lost to be part of the adventure. Players create their own map through a cartography system, while the level design and a first-person Memoirs log provide other ways to navigate. NPC directions were added later to give players another source of information.

Every active objective is connected to a location. A Travel objective points directly to its destination. A Talk objective points to where the target NPC can be found. Each NPC also has a Location Knowledge list containing the destinations they know.

When the player selects Ask for directions, the game checks the locations needed for those objectives against the NPC's list. Only the matches appear as dialogue choices. If the NPC does not know the exact destination but knows the larger area around it, they point the player there.

If they know neither, the question stays out of the menu. This keeps it from filling with repeated “I don't know” answers.
After the player picks a destination, the NPC points straight toward it and gives a short hint about the distance. The game does not calculate a route around walls or other obstacles.

Getting that list into the conversation was the trickiest part. The dialogue system only supported choices set by hand in the editor. Amr changed it so choices could be generated at runtime, using the current objectives and the NPC's knowledge to build the menu each time the player asks.
Since the quest and location systems were already in place, this new feature just took around two days to add.

Amr is also considering more personal answers. Some NPCs may send the player the wrong way or ask for something in return. His favorite case is simpler: villagers making fun of the player for asking where their own home is.

UNPAINTED is still in development. You can follow Moths Games and find the original post below:

Interested in learning more?
If you’re interested in the technical side of Unity? The Unity Dev Bundle brings together six books covering shaders, math, procedural shapes, editor tools, and character customization.
Jettelly wishes you success in your professional career! Did you find an error? No worries! Write to us at [email protected], and we'll fix it!

Subscribe to our newsletter to stay up to date with our latest offers

© 2026 Jettelly Inc. All rights reserved. Made with ❤️ in Toronto, Canada