Jump to content

Need Help about Multiplayer 8 ball of Pool Game in Interphase


dualfantasy
 Share

Recommended Posts

To make it multiplayer,what params do I need to send to the other player? My code below is not working.

In the original takeShot method, I changed a little bit to send the params(px,py,cueball.x,cueball.y) to the server. 

內置圖片 4
 
When the player1 hit the cue ball,the server will call updateHit method to update player2's pool.(I just simply call the applyImpluse method)
內置圖片 1
 
but it will mess around and not synchronous, like the pictures below.
 
內置圖片 2
內置圖片 3
 
When I only make two balls in the pool, first or second hit,their position are the same at two players pool,but after serval times hit, two balls position will be slightly different.(look at those x,y,rx,ry param). I wonder why this could happen,because I defintely send the same hit params. 
 
 
內置圖片 1內置圖片 2
 
Is there anything I miss to fix the problem? 
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...