Log : 31st August 2017
Multiplayer Pong Game
Today, Started building Socket.io based Multiplayer Pong Game. Basic Table Hockey style where you can play against an opponent over the web.
Simplistic design using HTML5 canvas, and JavaScript for building the logic.
Update : Implemented the Movement of the bat, using Event Listeners for getting the mouse position as the mouse moves over the canvas.
Update : Implemented the bouncing effect on ball. Using setInterval for updating position of ball, and whenever the position gets par the threshold, update the ball velocity to being the negative of the current value (in x direction if hitting on right or left threshold and in y direction if hitting on top or bottom threshold).
Today, Started building Socket.io based Multiplayer Pong Game. Basic Table Hockey style where you can play against an opponent over the web.
Simplistic design using HTML5 canvas, and JavaScript for building the logic.
Update : Implemented the Movement of the bat, using Event Listeners for getting the mouse position as the mouse moves over the canvas.
Update : Implemented the bouncing effect on ball. Using setInterval for updating position of ball, and whenever the position gets par the threshold, update the ball velocity to being the negative of the current value (in x direction if hitting on right or left threshold and in y direction if hitting on top or bottom threshold).
Comments
Post a Comment