Scratch Level 3 - Pong




https://scratch.mit.edu/projects/189338253/


1. A difficulty I had with programming the game was that the bot was moving too quickly and this made it nearly impossible for the player to win. It turns out I made the bot move the same amount of steps as the player, so I cut the number of steps by half to fix the speed problem. Another problem was when the ball would move straight across the screen it would continuously bounce in the same direction back and forth until the player moves and allows the other one or the bot to score the point. To fix this I changed the code for the direction to be 1.05 * direction instead of 1. While this number doesn't greatly affect the direction the ball bounces off to, it's enough that when this problem happens, the ball will slowly start moving in a different direction to keep the game going.

2. Some changes I made to the tutorial game was that I made it playable for two players because I thought it would be more fun and challenging to play against a person instead of a bot. I was able to make the game playable by two people by copying the movement code from the first player and changed the keys when I added it for the second player as well as broadcasts so the game knows whether it'll be a one or two player game. Another change would obviously be my own graphics, I decided to go with a space theme and made the ball Earth and changed my backdrop to space.

Comments