The deadline for our projects was this week, and seeing as I was unwell last week I really needed to get a move on with my code. This week I added many new features such as a camera overlay, shooting, a collectible key, an escape hatch and death for the player.
Starting out with making the player mortal, I gave them a health total where if it were to decrease past a certain point it would kill them.




Now that the player had their (in game) life on the line, I needed to create a way for the player to defend themselves while they search for a way to win. This led to me creating a weapon function;



Constructing the bullet class so that it can be called to in the players functions




After sending the game out to others for testing, it seems that I have overlooked the enemy speed mechanic, as the enemy’s speed will invert when it goes low enough making it run away from the player. This was an oversight in code and I can only learn from this mistake.
The player now needed a way to escape the level, so I create the key and escape hatch. The player could not leave through the escape hatch until they had the key;







End of project and future goals
Now that the project has come to an end, I have a few thoughts about how it went. Firstly JavaScript and Phaser can be annoying to work with at some times, main problem I had was the random collision feedback as two objects would collide but not do their designated functions. Secondly I think I spent too much time trying to fix problems myself when I should’ve asked other people more to get that second perspective on my code.
Over the coming weeks I think I may get a little head start on Unreal Engine 5, as I am not the biggest fan of Phaser and I think UE5 is a very promising game engine which will be used to make many of the upcoming game titles releasing in the coming years.
