Due to me not doing enough work last week, this week I have been having to work overtime to make sure that I finish this project on time for play testing next week. I started the week off by making the enemy follow the player, this was easier said than done as I found that when the zombies are spawning in , they spawn in the air as intended but as they are falling they are moving towards the player, making it appear that they are flying. I resolved this issue by creating a boolean to see if they have landed on the ground, and when the walk to function is called in the update function, it checks if the “grounded” boolean is true or not, if it is true then the enemy will start moving towards the player.
My next step of my project was to create a function for when the zombie and player overlap, this was fairly easy to do as I just had to create a physics collider for when it happens. In the function , I made it so the player loses 25 from their original 100 health, a bug popped up where the zombie would deal damage super quickly, making the player die instantly. I resolved this issue by creating a “canTakeDamage” variable in the player’s class. And having it so when the player gets hit they can’t take damage and then 0.25 of a second later they are able to take damage again. This was a key stage in my project because it means there is finally a way for the player to lose the game.
I also began looking into creating and applying a tile map for my project. I started off by finding some assets on Itch.io, after finding a suitable tileset I imported them into Tiled where I would draw out a tile map and apply collision to the walls , floors and ceilings. Once applied to my project, I played around with setting its scale as It wasnt fitting the map as I liked. It was interesting learning how tile maps are created using phaser, as I am used to making them Unreal which is more of a simple process, In Unreal it does most of the work for you when it comes to spawning in the correct layers at the right time. In Phaser you have to create each layer based on what layer they are on in Tiled.
I finished the week off by creating an object that the player can interact with which will change their weapon. I started this by creating a class for a weapon, giving it variables such as Automatic? , fire rate and damage. I would then (when the conditions are met) change the weapon variable in the player to the new variables and then it would affect if the player’s weapon was automatic / the weapons damage etc. this worked almost flawlessly the first time, with only a few, small bugs which were easily fixed.
As I was now confident that my game was ready to be play tested, I ended off the week by creating a questionnaire for testers to fill out after they were finished playing my game, the questionnaire consisted of a series of different closed and opened questions.
My goals for next week are to test my project and to make adjustments according on feedback given (granted there is enough time). As well as finishing off my fundamental tasks and 1000 word report.