Conversation
create new RoundBall class node and add radius propertie
Remove the square ball and increase speed of players paddle
Add Net Node Class, create textsize varibles for main and second
Add Sound class and implement Game Music
Add bounce and point-score sound effects
Add background, remove body margin and adjust some of objects colors
When players hit the ball their speed also increase
|
|
||
| app.pause = function(){ | ||
| if(state == 'GAME'){ | ||
| music.pause() // Pause Game Music |
There was a problem hiding this comment.
music.pause() isn't descriptive enough so you added // Pause Game Music to make sure the code reader understands right? :D
There was a problem hiding this comment.
Hi, yes I define the "music" object and added some comments when I invoke the methods
|
|
||
| if(keyName == ' '){ | ||
| if(state == 'GAME' || state == 'PAUSE') | ||
| if(state == 'GAME' || state == 'PAUSE'){ |
There was a problem hiding this comment.
a typo and the game breaks
maybe you shouldn't use strings huh?
There was a problem hiding this comment.
Do you know how to use enum?
There was a problem hiding this comment.
Oh I see, I haven´t use enum before but I can change it and not use strings
public/js/modules/module.js
Outdated
| constructor(id,app,color,playerNum) { | ||
| this.initialY = app.height/2 | ||
| this.speed = 8 | ||
| this.speed = 10 |
There was a problem hiding this comment.
Ever heard of magic numbers?
You're a true magician putting magic all over the code :D
There was a problem hiding this comment.
You´re right, I should create some constants for those values to be easy to track.
|
Hi, I don´t have a linkedin account but I can tell you about myself.
Languages
´I have always adapted to the language that is require, is true that I´m missing on some of the good practices on coding and to be really honest this is the first time somene review my code, I´ve always reviewed someone else apps functionality and make some code adjustment because of the deadlines to the clients´ |
Introduction
In this update it has been created a more like Game enviroment to make it fun 🥇
Features
VideoDemo
Demo.mp4