Week 3: Developer journal


This week was beginning to explore using phaser through the JavaScript demo and then beginning to plan out the 2D game.

This is what the demo initially looked liked.
This is what it looks like after my changes I added a high score, resetting after dying and another collectible.
 if (gameOver)
    {
        gameOver = false;
        this.scene.restart();

    }

This is what is used to reset the game after the player dies.

This is the function that controls the player getting hit what I added to it was changing the high score if it was higher then the high score it will update it. Then after this resetting the score to 0 so that when the game resets the score doesn’t start at what the player ended on. Finally setting gameOver to true to call the function from before to reset the scene.
highScoreText = this.add.text(500, 16, 'Highscore: ' + highscore, { fontSize: '32px', fill: '#000' });

This is for creating the highscore text on the scene this was using the same logic as the score text that was already present.

Adding the other collectible was just using the same logic as the star collectibles the only real difference is adding 20 to the score instead of 10.

Also this week was beginning to plan out the 2D game that I was going to be making. First thing I did was write a plan that goes as follows:

BSc1a 2D game idea/plan 

Wave based fighter game- Set number of waves. Gradually increased enemy difficulty. Boss wave/waves.  

Collectible(s) ideas:  

  1. Some drop from enemies that can be spent at the end of the wave to increase stats.  
  2. Throwing knives. 
  3. Powerups (Damage, health, maybe speed boost) either dropped from some enemies or spawned on the map. 
  4. Something to increase a score dropped by enemies. 
  5. Combine the idea of both powerups and a drop from enemies increasing score. 

I have multiple collectible(s) ideas wrote down as I was not certain on what I wanted to implement for collectibles so just made a list of what would work with the game. Currently I am thinking to do powerups and maybe something to increase score but not sure as sure on that.

Along with this plan I also created a Trello board to list out all of what I was going develop ready for development as as checklist of everything I wanted to do to follow.