2.2.1 Cycle 1 - Player and Boundaries
Last updated
Last updated
In the first cycle, my objectives are to create the html webpage and then to add the layers and sprites. Completing the steps in this order should lay out a strong, progressive structure for my game. The layers don't need to be too detailed at this point, graphics quality improvements can be adjusted later on.
Contrasting colours will be used to show clear boundaries and will help me to split the development into specific sections as discussed in .
Boundaries will be used to prevent the player from falling out of the map. This should allow the user to focus on the game objective and not have to worry about accidental movements.
setGravity
Defines the value for gravity used.
bulletSpeed
Defines the value for player bullet speed.
I now have a functioning boundary around the edge of the screen, the code for this can be viewed below:
Some challenges I faced during this cycle:
Implementing the boundaries at different orientations.
Assigning the common key bindings to the movement actions.
Tests performed in this cycle are evidenced below, they were a crucial aspect of my development.
1
Run code.
The game to start, boundaries rendered, player placed.
As expected
Pass
2
Watch Player.
The player is pulled downwards due to artificial gravity.
As expected
Pass
The screenshot below shows the rendered sprite and boundaries around the edges of the screen, it completes the following tasks for this cycle: