onedayitwillmake / RealtimeMultiplayerNodeJs

Realtime Mutliplayer Game Engine using Node.js / websockets for HTML5 that uses a client-server approach in which the clients send only sampled input to the server
548 stars 112 forks source link

CirclePackingJS outdated #5

Open becorey opened 12 years ago

becorey commented 12 years ago

I believe the js/lib/circlecollision is outdated from your CirclePackingJS repo. There it is fixed, but in this repo CircleManager.js should be

// Wrap X if(boundsRule & wrapXMask && xpos-diameter > this.bounds.width) { aCircle.position.x = this.bounds.x - radius; } else if(boundsRule & wrapXMask && xpos+diameter < this.bounds.x) { aCircle.position.x = this.bounds.width + radius; }

Currently they are both " - radius" so the circle will appear to jump on the right side when you navigate your player through the left boundary. I want to say thanks for releasing this its really great for getting started making a multiplayer game.