GameSparks in cocos2d-x

GameSparks in cocos2d-x
0

#21

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


#22

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


#23

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:


#24

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


#25

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


#26

Already answered previously.


#27

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


#28

Actually I’m active on C++ for them

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

Answer:


#29

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


#30

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


#31

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


#32

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.


#33

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.


#34

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


#35

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

#36

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?


#37

I simply do:

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

}

Never had that crash.


#38

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/


#39

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