GameSparks in cocos2d-x

I tried long time ago but I didn’t try to rejoin

Okay, again a rather big issue. I wanted to try what I’ve already done on Android. I’ve added the files in Android.mk, but I’m getting exactly the same error as here:

https://support.gamesparks.net/support/discussions/topics/1000090398

But I have no idea how to fix this issue. I don’t know how a certificate may fix a compilation problem. No clue.

Did you succeeded running the app on android?

edit: the guy which posted the issue helped me and it’s working now

But anyone willing to compile game sparks on android will have this issue. That’s stupid that they haven’t fixed it yet on the git repo.

edit2:

Damn, next problem again. I’m really starting to dislike GameSparks. The lack of the documentation is stunning.

I understand basic concepts until matchmaking in done. After that it should be quite simple - all players just needs to start their sessions and play (basically send and receive data), but I cannot find anything for c++, only some tutorials for Unity. I’ve only found this:

https://bitbucket.org/gamesparks/gamesparks-cpp-base/src/3ec9a1ed50f03671826384a9a0d5574989abc0d9/base/samples/sample07Realtime.cpp?at=master&fileviewer=file-view-default

This is my only source. And it’s not working. I’m extracting token, host and port from MatchFoundMessage object. Then, after clicking “Start game” button I start the session. But then every player has to click this button, but that’s fine for now.

However, starting a session simply gives me an error:

ERROR: Connect failed: NET - Failed to get an IP address for the given hostname

Main Thread(0x10e5d85c0) IRTSession:Not connected in time, retrying

I’ve tried to ping the host and I’m getting a request timeouts. What’s going on?

More detailed info here:
https://support.gamesparks.net/support/tickets/11935

Ask GameSparks or move to Nakama.
Nakama has very good support, you can chat with them via gitter and get response usually within a minute :+1:

But Nakama does not have active programmers for Nakama c ++, or yes? As I understood it, you ported Nakama to c ++. So, if we have a problem, who do we ask? as i understand, the official support does not give support for c++. Or yes?

And Nakama c++ has an old version (1.4). Are there plans to update nakama soon for c ++ to the latest versions? @mofirouz

@piotrros did you try to send an email to AppWarp support?

Already answered previously.

Yes i read the post :stuck_out_tongue:
but… That is not answering all my questions

Actually I’m active on C++ for them

They give support for all but for C++ I will help

Answer:

Nice!!
It’s very good to know this news. :smiley:
Then maybe i will try with Nakama :wink:

You can run their’s server locally and play with it.

Hey @tranthor,

I’d like to add to what @dimon4eg mentioned - We are actively working on updating our client libraries for cocos2d-x, Unreal4 and a generic C++ (for those using custom engines). As soon as we have something tangible that works well, we’ll open-source the repositories. In the meantime, feel free to ask questions here, or on the community Gitter channel.

Best,
Mo

2 Likes

Not yet.

About nakama - can it run on their server or I have to run my own? I’m newbie to multiplayer games so I’m looking for something as simple as possible - I don’t want to mess with setting up my own server - I’d rather use something, which is already working.

I think different. I would like to host my own server to have more control of everything. That’s possible @dimon4eg ? Also, hosting my own server i don’t need to think about max MAU, etc.

Yes @tranthor
And you can also use Nakama’s Cloud, so they will maintain and scale your server.
https://heroiclabs.com/managed-cloud/

If I’d know more than yes, for now I just want a quick start to make my game multiplayer.

Good news - I’ve managed to fix my issues and got my game working again. I’m now on the same level as with appwarp, but:

  • no random crashes on android
  • packets can be much bigger (from tests about 15KB)
  • small downside: no rooms, but I’ve got matchmaking (and it’s pretty nice) and still can implement friends so it should be enough for me

Have you run into this issue with the Gamesparks SDK, where if you launch the game with no internet connection that the main thread hangs when destructing ~_RealWebSocket()?

Should I be calling GameSparks’ Update in a different thread?

I simply do:

void GameScene::update(float delta){
    gs.Update(delta);
    
    if(session) {
        session->Update();
    }

}

Never had that crash.

Nakama open source version doesn’t allow you to scale even manually it’s very hard, unless if you are looking to distribute your back-end on one machine only then use Nakama.

Have a look at this : https://www.reddit.com/r/gamedev/comments/7wzmwd/nakama_not_an_opensource_distributed_server_for/

@sheshmoshen did you read the second post in your link?
To make a decision you have to listen to all versions, hehe.

1 Like

Okay, I came back to this project. Looks like GameSparks made a change in their Pricing. There’s no more Indie option - you have to pay 299$ right away and I think it’s not for Indie dev - we won’t have a lot of users from the start so the price is a problem (it’s just a waste). I looked back at AppWarp - they don’t seem to even update the sdks so I guess my problems won’t go away. So, I’ve become interested in Nakama.

As I’m a server-newbie I don’t want to waste a lot of time setting up a server - can you maybe give a hint where can I find develop-free cloud server for a quick start? I’d rather use my time to develop client code rather than fighting with server.