Forum Multiplayer Multiplayer Physics

Discussion and help relating to the Player.IO Multiplayer API

Multiplayer Physics

Postby fire67 » February 3rd, 2012, 5:50 pm

Hi everybody !

I'm new to Player.IO but I find this system very good. I am currently developing a small 1vs1 2D game, you can think of blobby volley as an example.
But I have some questions.
First of all, for me, all the game physics need to be calculated by the server.
Let's take the example of the ball. Every move of the ball needs to be calculated server side because the ball is not "owned" by one of the two player. So the server calculate the position, rotation etc... and send the information to the clients who draw the result.
There are two clients, if they do the physic stuff how can they calculate the ball bounces etc...They will have always two value !!
If only one calculate the physic, it's a performance disadvantage.
The main problem is to use a physic library on the server (box2dx, farseer...), I saw different topics that say it's quite impossible... :cry:
I need some advices, how can I use a physic library on the server ? which one ? If not possible how can I do the physics (they are not advanced physics) ? Can I do them client side ? how (see example of the ball) ?
I hope you understood my problem.

Thanks for your help ! :)
MaT
fire67
 
Posts: 2
Joined: January 20th, 2012, 3:41 pm

Re: Multiplayer Physics

Postby Benjaminsen » February 3rd, 2012, 6:05 pm

As you found yourself, we do not allow physics libraries on the public multiplayer cluster. The reason for this is that physics libraries are extremely resource intensive and would make the service way to expensive to run.

You will have to integrate your own network physics, quite a large subject in on itself. I suggest you start here:
http://gafferongames.com/game-physics/n ... d-physics/
Have more questions? Join us at #player.io on the freenode irc network. Making something cool with Player.IO? I would love to talk! My Skype handle is q-rious
User avatar
Benjaminsen
.IO
 
Posts: 808
Joined: January 12th, 2010, 11:54 am
Location: Denmark

Re: Multiplayer Physics

Postby fire67 » February 3rd, 2012, 6:19 pm

Thank you for your reply, I'll integrate my own physics. It's going to be hard :D
fire67
 
Posts: 2
Joined: January 20th, 2012, 3:41 pm


Return to Multiplayer



cron