Creating a game like Soccer stars

Hi, I want to create a simple game like Soccer stars ,I have’t any problem to create gameplay.
My problem is how to synchronizing the players view!!!
Also I know I should use web socket.
Thanks
https://play.google.com/store/apps/details?id=com.miniclip.soccerstars

I have very few knowledge about websocket/multiplayer setup. but i successfully integrated my game with AppWarp which is pretty easy to configure.

Thanks but I’m using cc as far as I know AppWrap has no extension for cc.
Indeed I need best mechanism for syncing clients.

According to box2d documents, if two worlds has been exactly as same as each other the physic for them would be deterministic and predictable .
So the only thing that needed is sending the velocity of moving object from playing client to viewing client.
By this way I created very simple demo like soccer star and worked fine.

1 Like

Hi @hossainiir that is a great tip. Thank you for sharing!
Im going to try and build a prototype like yours just for fun. :smiley: Thanks!!

You’r welcome!!

It is very simple to create and good luck!!

If I understand well, you also have a very basic websocket server that pairs the players right?

Yes you are right!!
The server is very simple less than 200 lines!!
And 7 events(“player-connect”,“new-game”,“select-bead”,“targeting”,“shoot”,“next-player”,“feedback”).

1 Like

Cool. Thanks!!

Cool, thanks!

hi,
I am trying to create a multiplayer game in creator with websockets but don’t know where to begin. Is the api for websockets already built-in in creator. If so, what file/s do I need to import into my networking file? also, do I establish the handshake in the onLoad function or some other function and if it is some other function then where and when do I call this function?
thank you,
Sameer