Assignment 1 Devlog
Sources:
Title Background Image Source: https://creazilla.com/nodes/35514-blackboard-in-a-school-classroom-clipart
All other art assets created by me in paint.
Features (other than the basic requirements):
- When the ball is lost, it resets at the centre of the screen and starts moving in a random direction (either left or right angles can happen) at a set speed. This speed is always the same at reset no matter what direction.
- The paddles cannot go past the top or bottom walls, and they never move sideways, rotate or get stuck.
-Scores are shown at the top of the screen, and are correctly calculated and updated as play progresses.
- Game proceeds until one player gets 10 points, at which point the ball disappears completely (does not reset at centre) and a message displays the winner.
-Upon gameplay ceasing, two buttons appear for the player to either go back to the menu or play again. If 'play again' is selected, the game restarts with scores, paddle and ball reset.
- The ball increases its speed by 2% every time it is hit. This value can be changed in the inspector in Unity. The speed is reset back down to the default value when the ball is reset.
Bugs / Things to Improve:
- Need to limit the angle that the ball can start moving in when the game starts or when the ball is reset. Currently the random direction is calculated by taking a random value for degrees between 0 and 360. This means that the ball can potentially start at 90 degrees and only move up and down. When this happens the ball cannot reach either paddle and the game needs to be reset. Limiting the angles that the random values can be set to would solve this.
- Need to limit the max speed that the ball can travel. This build currently causes the ball to increase its speed by 2% on each hit. However when it reaches a high enough speed it clips through the top/bottom walls and disappears. This error means needing to reset the game completely. This error can be fixed by stopping the speed increase on collision once the ball reaches a certain speed.
- A reset button could be implemented in case one of these game breaking issues occur, that just resets the ball in centre but without adding any score. This would mean that play can continue instead of having to reset the entire game (and lose the scores in the process).
Leave a comment
Log in with itch.io to leave a comment.