Slumberland
About
Slumberland, our seventh game project at TGA, we had to make a third-person game this time. We made up our minds to underscope as much as possible so we made the smart decision not to have any enemies in our game and instead focus on pure fun platforming mechanics and NPC interaction. This time another member wanted to work on the player and me being a team player agreed. But it was fine since I got to work on other cool things, like NPCs, cinematics, and the most fun thing of them all, boids!
What is a boid?
A boid is a flocking behavior that combines three steering behaviors: cohesion, separation, and alignment. I never made them before but always wanted to make them so I was up for the challenge.
It was my suggestion to have boids in our game since we were required to have some sort of AI in our game and I thought it would fit in our dream-like world and make it feel more alive.
01
NPC/Dialogue system
To make the Npcs easy for other disciplines to add dialogue I structured a JSON file which I later imported for each corresponding Npc. The file was an array with the current dialogue text and emotion that the characters would display.
One unique NPC would display different dialogue depending on how many pickups the player had collected in the world and other factors. I solved this by implementing a behavior tree since it was required that we had one in this project and we didn’t want any enemies since we wanted to scope low for this project.
I’m not too happy about how I structured the Npc components in general since it ended up with a lot of lava flow since they got more complex over time. This was mostly due to us adding more features to the Npcs later in production. For example, the NPCs would react to being punched by the player, and later on, we needed an NPC to unlock an ability for the player after you talked to it.
If I were to rewrite this program again I would have made the code more readable by dividing more of the code into functions and perhaps commenting more.
Overall
I’m happy with how the project went, we scoped well with us having to work on the portfolio at the same time and everything just came along nicely. My absolute favorite game made so far.