It’s been a while since my last devlog. I took 3 weeks of vacation. I visited Ankara and Istanbul in Turkey, spent a few days with parents, and took a few relaxed days too. I’ll be back to work at full capacity starting from this Monday.
In the meantime here’s a summary of what I did.
Marvelous Designer Trial
I am going to make a lot of clothing and textile simulations for the game, so I took the chance to learn Marvelous Designer in a relaxed manner after returning home. It’s a very intuitive software and the workflow is very fun, but most importantly very responsive. It can do high density cloth sims in real-time, and I really like how I can pinch and grab and move things while it simulates. The price tag is a bit high, but it’s worth it for the time saving and the tools offered. Here are a few screenshots
NPC AI
I reworked the AI and pathfinding of the NPCs, now it handles obstacles and uses navmeshes properly.
One issue I had was the NPCs clumping in groups when they walk into eachother. I made an extremely basic fix : if stuck for too long, attempt to move to a random location for a short time, then go back to normal navigation again.
The top is the result after I added it, the bottom is before. For a very naive fix, it seems to work really well! They still get stuck a little bit, but it looks like they’re just hanging around.
I also added an option to idle the NPC when they reach the last waypoint.
I added the option to control another NPC’s AI behavior. In this example the typewriter sets the AI behavior for 5 NPCs at once
And finally this is just an example I had fun with : a chain of NPCs, each one following the one ahead of it. The group just spins in circles in my test scene.
Chatter
Chatter is an important storytelling and world building mechanic, it’s any discussion between two NPCs that does not involve the player. For example you’re walking in the market and two NPCs are haggling about the price of an item, and that’s an interaction that does not need you to take place.
The text fades with distance, because it’s harder to hear someone when they’re far, and the text equivalent would be hard to read.
The player character canonically has a very good hearing, so they can overhear conversations. Usually it’s just day to day matters and small talk, but it can tell stories indirectly about the characters, the events, and even the player.
I reworked the chatter system. It’s now an actor you place in the scene and pick which NPCs it affects, instead of it being an actor component you attach to all NPCs. This makes working with multiple NPCs easier, especially if an NPC can have many possible chatter options. It uses data tables and an array of actors (the NPCs), and only triggers when they are within talking distance.
The “Chatter Party Index” is to select which NPC is talking, and after the line is properly said, the AI behavior can be set to idle, patrol, follow…Etc.
In this example, when the first NPC reaches talking distance, they stop and say “Hey there!” and talk a bit. After a while the conversation ends and they start walking away (line 7). After that a third NPC will start walking, talk, then follow the other NPC. The entire interaction below is controlled with the chatter system and the data table above.
Greetings
Another small “social” mechanic is the greeting. When an NPC is close to another NPC or the player they greet them. This only happens once with every character, so if you have been greeted before by an NPC they will not do it again (in the future this can be reset with certain conditions, such as a timer).
The greeting is picked randomly from a provided list of greetings, they can be polite, casual, rude…etc. The test fades the same way it does for the chatter
Camera Blending
I thought a bit more about the camera blending, because I felt like it can be dizzying when you spam the interaction button. I adjusted it to not have any smooth transition when you start an interaction, and only have a 0.25-0.5s blending when the interaction ends or when the camera changes from an angle to another withing the same interaction (eg. passing the interaction to another NPC/Object). My reasoning is that initially you know what object you’re interacting with, so it’s easy to locate yourself spacially. But if a camera changes, it can be a bit disorienting, so the smooth transition helps with it.
That’s all I have for now, thanks for reading!
2 thoughts on “Devlog Week 46-50”
I remember eyeing off Marvellous Designer but sadly could not justify the price tag x_x
Yeah the price isn’t easily justifiable unless it’s paid work