Multiplayer!

Hi,
do you have a suggest for a multiplayer library?

Regards!

Stefano

1 Like

any idea? :slight_smile:

Stefano Campodall’Orto wrote:

Hi,
do you have a suggest for a multiplayer library?
>
Regards!
>
>
Stefano

Hello. I make multiplayer with Game Center but it will work only on ios

GameCenterBridge attached

yep, thanks for informations!
I have seen RakNet, but is very very expensive!
And http://enet.bespin.org, but I don’t know if is for iOS/Android.

Thanks!

Ivan Fedorov wrote:

Hello. I make multiplayer with Game Center but it will work only on ios
>
GameCenterBridge attached

maybe more easy write own server

i also concern about multilplayer game and game online, anybody give the idead^^

If you are familiar with http servers (depending on the needs of your game, http is slower than tcp sockets) like Node.js you can write your own server for free and it will be really easy. The Node package manager has lots of things to make it even easier, like express.js, to abstract things away from you.Then abstract common functionality you use on your network in the app using the extension CCHttpClient as your base. This is a good approach for a non-realtime turn-based game, like a board game or something.

This method is platform agnostic. As long as the interface is the same on the server, you could make the same requests from any app or even on an html5 version of the game, and it will work as expected.

so how about game online on iphone?

yep! my own game i’m developing uses this method, and it handles connections on both iphone and android (because the cocos2d-x extension CCHttpRequest is cross-platform).

Using node.js as server, would it be possible to create a realtime multiplayer game with cocos2d-x? For example, to create a two-player coop game would curl + node.js server be enough or should I try to use platform-specific code to use sockets? Or, better yet, is there a way to use WebSockets under Cocos2d-X?
I know, and have seen, some examples of using websockets (html5) + node.js for realtime multiplayer (there’s a Firefox game using this: http://browserquest.mozilla.org/), but i don’t know of any WebSockets equivalent in Cocos2d-X.

1 Like

What type of mulitplayer game you want to develop?

If you just want to peer to peer connection and all business logic handle at client side then you can straight forward Photon Cloud Server. (I am using it for my game. See game link in my signature).
If you want multiplayer battle kind of thing where business logic maintains at both server and client end then you can use Photon Server. Modify the photon server business logic and host it in your own cloud.

Paras Mendiratta wrote:

What type of mulitplayer game you want to develop?
>
If you just want to peer to peer connection and all business logic handle at client side then you can straight forward Photon Cloud Server. (I am using it for my game. See game link in my signature).
If you want multiplayer battle kind of thing where business logic maintains at both server and client end then you can use Photon Server. Modify the photon server business logic and host it in your own cloud.

I would be a peer-to-peer coop game (two players), and I would just need a server to route packages (unless there’s a way of directly connecting both peers) and maintain room discovery and related stuff. I took a look at photon cloud server, but I can’t tell now how many messages per room would be sent as it will be an puzzle-adventure game, with both players being able to traverse rooms, so there will be many messages being exchanged to maintain sync between games (well, can’t be a huge load as the game would be unplayable, but I’m afraid a limit of 300msgs per room won’t suffice…)

I really don’t mind writing a small server using something as node.js, as i’ve already tried something similar in the past, but having an easier way would be nice :stuck_out_tongue:

Stefano Campodall’Orto wrote:

yep, thanks for informations!
I have seen RakNet, but is very very expensive!
And http://enet.bespin.org, but I don’t know if is for iOS/Android.
>
>
Thanks!
>
>
Ivan Fedorov wrote:
> Hello. I make multiplayer with Game Center but it will work only on ios
>
> GameCenterBridge attached

RakNet is a good choice I am using it .It is for both IOS and Android .

Guilherme Maia wrote:

I would be a peer-to-peer coop game (two players), and I would just need a server to route packages (unless there’s a way of directly connecting both peers) and maintain room discovery and related stuff. I took a look at photon cloud server, but I can’t tell now how many messages per room would be sent as it will be an puzzle-adventure game, with both players being able to traverse rooms, so there will be many messages being exchanged to maintain sync between games (well, can’t be a huge load as the game would be unplayable, but I’m afraid a limit of 300msgs per room won’t suffice…)

The 300msg per room limit of the indie subscriptions is per second! If you need to send around more than 300msg per second per room with just 2 players, then it’s almost certain that you are doing something wrong.

Photons Clouds msg limit can get tough when one wants to have lots of players inside the same room, who are sending messages to a lot of other players all the time, but usage that is producing enormous amounts of messages is also producing enormous amounts of traffic, which means higher hosting costs (both for you if you self host you game same as for Exit Games, which could not offer it’s cloud at the current prices anymore).

However if you really get into trouble with the message limit of the Photon cloud and don’t want to self host a Photon server, then just talk to us at Exit Games. There is always a solution.