Hi guys! Welcome to Tennis Duel! In this game you play as the red person at the bottom of the screen. They can only move left and right, and follow your mouses x coordinates. In simpler terms, move the mouse (or finger on a screen) to move the player.They'll automatically hit the ball if it comes near you. The opponent is controlled by code, so it will move on its own. The speed variable controls how fast you hit the ball, and the slider at the top right alters difficulty. You can also see the difficulty level in the bottom right corner. To tell the ball where to go after you hit it, you click where you want the ball the go. A red mark will move here, and this is where the ball will go after your next hit. This can be changed mid-rally. If you or the opponent hits the ball in a way that it leaves the court without passing the service line (the line at closest to the net) it will be out, and whoever made the error will lose the point. If the ball goes past the opponent and they can't hit it, you win the point; and vice versa. First to ten points wins! I hope you enjoy playing Tennis Duel!
NOTE: You will automatically lose the point if you stand to close to the edge of the screen before serving! This is because the code doesn't recognise what side you are standing on, and will always put the ball to your right. I could try and fix this, but I already messed up the code once trying to change stuff and i only recently realised what went wrong and fixed it!