Last week, I created new player classes and updated my current player classes to clean up the code a bit. I was able to change a few things to make them easier to reference in other files. I also added a secondary NPC to provide some variety to the game. The two NPCs will look different so that it seems like multiple guests are visiting the restaurant. Below are the temporary assets for both guests, a yellow circle and a red circle.
Along with creating a new NPC, I added in the ability to create random numbers. I used this specifically to switch up which guest would spawn in the restaurant, and used it with the timer so that every time a new NPC was spawned, it was random whether the yellow or red guest would appear.
Finally, I added in a player id for the characters. I’m not too sure if it would be truly necessary in my main gameplay since the NPCs do not actively do anything to the main character. However, I thought it might be needed in my beginning cut scene since there will be a small battle between the main character and a monster.
The thing that challenged me the most last week was writing new player classes and updating the current ones to be cleaner. It is not always easy to decide how to clean up your code and see where you can make things smoother and less clunky. I learned, however, that it is important to go back and clean up code so that it is easier to read, easier to edit or add to, and is more efficient.
Leave a Reply