Hey there,
Here is my rendition of the block breaker game. I went for a space theme:
It was uploaded to itch.io because I am currently having problems with GameBucket.
I added in a couple features and modified a couple of mechanics from the original videos:
- Life System: 3 lives to get through all 7 levels
- Play mode: players can choose to play with their mouse (default) or press K to play with the keyboard, where Space activates the ball and the ball is moved with the arrow keys.
- Velocity check system uses while loops to ensure the ball is always going at ~10 world units/s. It also checks for horizontal and vertical velocity and regulates these if they get too low.
- Destroying 3-hit blocks (red) spawns a new ball going the opposite direction of the ball. Lose condition only applies when both balls trigger the lose collider.
- Credits screen to attribute sounds and graphics.
Future ideas:
- Fix the autoPlay paddle so that it hits every ball and not only the first.
- Add in a UI to the game space that tells how many lives you have and how much time has been spent in-game. I was going to do this initially but ran into some issues with the game space size and text.
- Persistence of Play Mode between levels. In its current state, the player has to hit K at the beginning of every stage to activate keyboard mode.
- Slight rotation of paddle to allow for directional control of the ball.
- Fix a strange null reference exception that appears after the game is restarted. I have no idea why this happens. It seems to come from the LevelManager script but it doesn’t seem to affect gameplay.
Check it out, and let me know if you find any bugs! If anyone is interested I can post the link to my scripts to show how these work.