How to create real-time multiplayer game using Cocos Creator

How to create real-time multiplayer game using Cocos Creator
0.0 0

#1

Hi all,

I have recently got into development of game and had developed a simple game using Cocos Creator so to learn about how it worked.

Now I wanted to try make the game into multiplayer but I have no experience in this and I can’t find any tutorial in regards to multiplayer with Cocos Creator.

Forgot to mention, I am trying to make the game on multiple platform (IOS, Android and Web), which is the reason why I used Cocos Creator.

Any advice will be appreciated.

Thanks


#2

I’d use WebRTC https://caniuse.com/#search=WebRTC and have https://socket.io as a backend.


#3

Hi phero_constructs,

Thanks for the advice, I will start reading from there first.

Hopefully I can get some result.


#4

Also check https://gafferongames.com/categories/game-networking/ if you’re new to realtime networking. It’s not really the easiest thing to do.


#5

Yes, I am aware of the difficulties, but I am willing to give it a try in order to gain some experience.

Thanks for the extra tips.


#6

Hi everyone,

I am replying to this thread as I am having difficulties in trying to create a game server using cocos creator.

I am aware of socket.io and WebRTC as mentioned by phero_constructs, however I am not convinced if this worked in multi-platform environment.

In fact, I have tried to do a simple data sending which worked in browser but not on android device.

I am very new to networking development and in needs of correct research materials to get me started.

My objective now is to create the game server that are cross-platform, or rather a server-client network model which operating in multiple environment at the very least.

I wanted to create my own network engine rather on depending on other’s build, performance issue can be fine-tuned in the future as this is for learning purpose.

I have been researching on many documents for several weeks but unable to get the grasp or even to start on it.

Thanks in advance.