Forum Games can i make a pool game with playerio

Discussion relating to game development with Flash

can i make a pool game with playerio

Postby vishnu_ajit » September 2nd, 2010, 2:29 pm

I have made a single player version of a pool game in flash using box2d. It works perfectly fine. So I've been thinking of making it a multiplayer version. Having searched the internet almost thoroughly for flash multiplayer game servers, I have reached here, PLAYERIO. Well, I have visual studio 2010 , flash cs4 and flash develop as per the requirements. But the problem is I do not have any idea how to get started. That is , how to "mix" code into my already made pool game so that it connects with a C# server and responds to the second client properly.Also , I know how to program in C# too, so I don't think I have technical difficulties. But as I told you, I do not know how to start now with my single player code.

I have also read the tutorial on multiplayer games provided in the playerio site.But I just got idea of the theory, not on how to start implementing my game.

Thank you in advance.
vishnu_ajit
 
Posts: 2
Joined: September 2nd, 2010, 2:21 pm

Re: can i make a pool game with playerio

Postby azuanagames » September 16th, 2010, 12:57 pm

Look at the example games provided by player io. They provide examples for both the client and server side.

Then, start thinking about your data. What is it your going to want to transmit to both clients. Also you want to move code from the client into the server.

You probably want to send the move you just made (angle of cue, strength of hit, position, etc.) to the server, you should also display that to the player right away but don't trust it. Compute the move on the server, relay the move to the other player, then relay the final position of the balls on the table. Let the client you didn't trust update those balls (in case they are trying to cheat or that the math on the server comes out slightly different).

The reason for the above is that there is latency and you want the clients to both display the exact same thing. Not to mention there are folks that may try to cheat.

Hope that helped.
azuanagames
 
Posts: 149
Joined: April 29th, 2010, 10:59 pm


Return to Games