Devlog Week 20

This week’s devlog is a bit short, I got busy with some personal stuff IRL and had to push some tasks to the next week.

Interaction System (Continued)

I continued working more on the NPC interaction system, I did some performance tests and added some features. Here’s a short list of what I did :

  • Added a “relative” option to “Set Friendliness”. If the value starts with a “+” or a “-“, then instead of overwriting the existing value, it gets added to it. This will be used for small tasks and interactions that earn you gratitude toward a certain NPC.
  • Added an option to check the friendliness of another NPC instead of the current one. Not sure yet what I’ll need it for, but it might come in handy.
  • Added the option to cancel an interaction. This will not progress to the next line, the interaction will restart again from the current line.
  • Did some performance tests on the steamdeck and on my workstation. The first test was to see if having 1500 interactive objects has any impact on performance (other than graphical processing). There was no measurable change in FPS except when I got too close and was within the interaction radius of several hundreds of interactive objects/NPCs, FPS dropped from 160-ish to 40 on the steamdeck. That’s not an issue though, because I can’t imagine a scenario in which you’re within the interaction radius of more than 10 objects/NPCs at once.
  • The second performance test was about a thousand “go to” statements. The idea was to make an extreme scenario, just to make the performance impact large enough to be measurable more accurately. Unfortunately it seems like there’s a recursion limit, and I can’t do more than 25 go to statements at once. So I tried to spam the interaction button repeatedly, and it doesn’t seem like there is any performance impact whatsoever doing 25 interactions at once, several times a second. I think it’s safe to say the dialog/interaction system has little to no impact on performance.
  • The third test was to use a data table containing about 1000 lines in it, to see if large data tables slow things down. Once again I couldn’t make any kind of impact on the FPS and frame times. So I’m very happy about this, I was worried that maybe there was a performance hog in the system design I wouldn’t know about.

Robot Head Design

I am finally happy with a robot head design. This is the 5th iteration, and I’m very satisfied with it.
I had a few challenges with form, function, expressiveness, and also with fitting within an alternative 80’s timeline. Especially form vs function, I needed the robot to be able to drink and eat, because it’s an important aspect of human social life, which they’re imitating, more or less. But I couldn’t find a design for a mouth that didn’t ruin the facial expression and look. I settled with a mouth design that’s mostly “seamless”, used only for eating and drinking, but not for speaking or facial expressions.

I had to compensate for the diminished expression range with a more expressive eye and also ear antennae that can move up and down, similar to the way a dog’s ears perk up for example when excited, or go down when scared or threatened. I made a test expression sheet, and I think it’s expressive enough for what it is, especially when complimenting actual dialog lines.

Expression sheet

The default eye mode is fully procedural, but I also used custom animated icons for different moods, expressions and activities. The animation is a sheet of 16 4-frame icon sets, with a parameter in the shader to pick which one to show. They are hard-coded to 32x32px and move at 2FPS for now, but that can change in the future.

Custom Eye Animations.
Custom Eye Animations

This is just a “proof of concept”, it will definitely look better with animations and actual dialog, once I put everything together.


I got myself a pack of high quality 3D environments and models by Leartes Studios to study, and I also downloaded a new version of The Grove 3D to experiment a bit with tree generation, it looks promising.

Some of the tasks I pushed to next week are :

  • Basic Save/Load system
  • set and get global flags for world progression
  • Robot Body Sketches
  • House blockouts
  • Animation tests
  • “Pitch Modifier” interaction type, to increase or decrease the pitch of the NPC interaction sounds

That’s all for this week. Thanks for reading, I hope to see you all next week

One thought on “Devlog Week 20

Leave a Reply

Your email address will not be published. Required fields are marked *