Hi,
has anyone using GameSparks? I’d say their documentation sucks. They’re not covering anything c++ related on the official page. I’ve only found a SDK on bitbucket with documentation, but this one is much shorter.
After struggling with the basic configuration / compilation, I’m stuck on the first thing I call. GameSparksAvailable or GameSparksAuthenticated events are never called. Because of this I cannot really continue.
I thought it’s a decent library. Previously I’ve tried AppWarp, which has a very easy to use API, but I’m encountering random crashes (in socket classes from AppWarp) on Android and it forced (with few other reasons) me to find something else.
@dimon4eg someone is talking to you. Defend your idea of using GameSparks hahaha. @piotrros in my case, i would like to try with AppWarp. It’s very easy to use the API and the cpp-tests worked for me (thanks to @dimon4eg).
But your “crash” problem worries me. Did you try to talk with the official support?
I sent an email to support [@] shephertz [.] com and they answered me.
I’m thinking of coming back to AppWarp or to find something else.
Maybe they can help me with the crash, but there are other issues I had as well:
you can only send 512 long message to the other players. I had about 1500 bytes long string and this caused a lot of trouble (I wanted to send it only once, next messages were very small). In the end I had to change the data structure to shorten the string, but still I had about 700 bytes. Finally, I’ve found I could send data instead of chat message, which has limit of 1024 bytes, so not much more. But this is rather strange to me (I get the limits, but 512 bytes in 2019 is a joke) and it can be a real hassle in the future.
second thing, it just refuses to connect with error 4 (if I remember correctly). I have to restart the app in order to fix it.
third thing is the crash.
And by the way the ninja-thing example project is written very poorly and uses a lot of deprecated apis. All these things made me to believe I’d like to find something more professional. I’ve found GameSparks. First impression was good, but then well… it may be great for Unity, but c++ support is bad.
I can’t give you my opinion because i only compiled the Ninja test. It worked for me and my idea was to use this API in the future. But your words worries me
Plz share your final decision as soon as possible…
I also evaluated another APIs but i didn’t find a better api for use…
Last time when I tried GameSparks C++ SDK worked fine for me.
What problem do you have?
P.S. I switched to open source solution: nakama
It’s works nice with cocos2d-js.
C++ version works with nakama 1.4.
C++ version for nakama 2.x will be in month (I’m doing this).
They even have a damn documentation! Though it’s strange they use windows in the example, but whatever, cocos2d-x itself is not a problem. I’m hesitating to give it a try. And that’s because pricing is pretty ridiculous.
$0.008 per MAU seems nice, especially compared to the other SDKs. But other SDKs often have a free limit and you only pay after that limit. What’s more there’s dirty catch: $299 monthly minimum. 299$ divided by 0.008$ gives 37375 users. But we estimate to have much less users, when the game starts (about 5k), so we’d have to pay much more and I’m not sure if we can still be indie, but that’s still 99$ Ofc It won’t be bad as you have a lot of users and revenue from the app. But we make only single player games for now.
edit:
my bad, it seems you can use free account as well. But I have to check the limits
define GS_USE_STD_FUNCTION before include GS.h to use bind
class GS_API GS // this naming should be discussed, it was chosen because we need the static object with the name "GS"
{
public:
#if defined(GS_USE_STD_FUNCTION)
typedef gsstl::function<void(GS&, bool)> t_AvailableCallback;
#else
typedef void(*t_AvailableCallback)(GS&, bool);
#endif /* GS_USE_STD_FUNCTION */
/// Callback which is triggered whenever the service becomes available or the connection to the service is lost.
t_AvailableCallback GameSparksAvailable;
And I think I’m automatically joined. But now the thing is, when I close the game and go back, I cannot join this room, because I’m probably automatically joined, but now the game doesn’t know to which one. And I should be kicked out of the room after closing the same. Also I shouldn’t be able to join multiple rooms at the same time, because it doesn’t make much sense.
I also can get list of rooms, which I do just after successful authentication:
void GameScene::AuthenticationRequest_Response(GameSparks::Core::GS&, const GameSparks::Api::Responses::AuthenticationResponse& response)
{
CCLOG("AuthenticationRequest_Response");
if (response.GetHasErrors()) {
string error = response.GetErrors().GetValue().GetJSON();
CCLOG("something went wrong during the authentication: %s", error.c_str());
txtGameMaster->setString("Auth error: " + error);
} else {
string displayName = response.GetBaseData().GetString("displayName").GetValue();
CCLOG("you successfully authenticated to GameSparks with your credentials");
CCLOG("your displayname is %s", displayName.c_str());
txtGameMaster->setString("Authenticated");
ListChallengeRequest request(gs);
request.SetEntryCount(50);
request.SetOffset(0);
request.SetShortCode("room");
request.SetState("ISSUED");
request.Send(std::bind(&GameScene::ListChallengeRequest_Response, this, std::placeholders::_1, std::placeholders::_2));
}
}
I’m getting the list, but with the ones that current player created. Second player just gets an empty list (no errors, just empty list).