I like to know how to create a Break-out clone type game.
This should be a nice beginner project and quite easy to make.
- Create a playfield by placing bars (sprites) on the left and right side of the screen.
- When the ball collides with the left or right wall set the balls movementspeed on the x-axis to a negative value (speed = speed *-1) and repeat it for the left wall.
- Set the paddles x position to that of the mouse pointer for movement
- Limit the x-position so that it stays inside the game window (0 < paddle position < window width)
- If the ball collides with the paddle negate it’s y-speed
- If a brick collides with the ball - destroy the brick and negate the balls movement speed
- Move it in a random direction
- If it hits an obstacle change the direction as described above
- If it’s position is out of screen (there is a behaviour for that) the player lost
Sounds great. I can’t wait to get started. Thank you for helping me.