Search the Community
Showing results for tags 'deterministic'.
Found 2 results
Hi, I'm using p2js for physics for my game. The issue is p2js is having different behaviors in the same situations. I'm adding 4 units with the following shape to the scene to the same x and y in a loop each time I click on the page. "shape": [ 10,0, -10,0, 0,-20 ] As you can see in the screenshot, the first and second group of 4 units have different alignments while they are being added with the same function with no difference. It seems that p2js is using a random function in some cases to determine how to move the objects. Is there any way to make p2js deterministic? Since I'm making a multiplayer online game, it is a critical factor for me. Thanks
Hi all! I'm coding a multiplayer game with server verification and the first thing you need when doing so, is a deterministic environment. And my issue is that velocity seems not to be even remotely reliable... I made a sandbox to illustrate my issue : http://phaser.io/sandbox/edit/vLcJZUDX You can see that from frame to frame, the delta x (in px/s) is really different. I could set the x and y myself (without using velocity), but then I would loose the collision detection, which I want to use, of course. Am I using velocity wrong? Is my sandbox poorly done? Thanks a lot guys!