Week 4: Developer journal


This week was purely focused on the development of the game.

This is a basic look of what the game currently looks like at the end of this week so far a player and enemy have begun being implemented (movement for both of them), a background and displaying the players health.
These are the contents of all the fundamental functions of games in phaser there isn’t much code there as I had decided to do a lot in separate JavaScript files over everything being in the HTML script. With each of the functions I have them directing to these other files for what to do. For example in preload directing to the player preload function in the player JS file along with the keyword this which is necessary to pass along the game instance to the function in the player JS.
This shows the variables associated with the player and the preloads and create of the player as referred to in the HTML. The player preload loads the sprite sheet of the player. The player create function creates the player in the scene, the collisions with the bounds of the scene so the player can’t leave the game scene, basics for keyboard input and the UI for showing the players health.
So far the player update function just controls the movement of the player.
This shows the variables associated with the enemy and the preload and create functions as referred to in the HTML. The enemy preload loads the sprite sheet of the enemy and the enemy create function creates the enemy in the scene.
So far the enemy update function just controls the movement of the enemy. This works through taking the current x and y position of the player and having the enemy move towards that position based of its current position.
The Trello board at the end of the week
This shows what the game/gameplay looks like so far that being the player and enemy movement mostly.

Links to assets used: