heroiclabs / nakama-cocos2d-x Goto Github PK
View Code? Open in Web Editor NEWCocos2d-x client for Nakama server.
License: Apache License 2.0
Cocos2d-x client for Nakama server.
License: Apache License 2.0
Hi,
Can you add support for Axmol? This is the main cocos2d-x fork today.
https://github.com/axmolengine/axmol
Thanks.
This work needs to be submitted against the nakama-docs repository so we can publish it directly on the website.
Follow this guide format: https://github.com/heroiclabs/nakama-docs/blob/master/docs/android-java-client-guide.md
This should be considered separate additional documentation to Cocos2d-x JS docs.
Hi,
Im reading CMake file here and i see that you use framework for iOS and AAR for Android.
I really need this or i can use only C++ nakama client code (https://github.com/heroiclabs/nakama-cpp).
Thanks.
Cocos2d-x websockets uses openSSL and it's not compatible with boringSSL which gRPC uses.
Currently the client is compatible with Nakama 1.4.x. We should update the client to use Nakama 2 and use Nakama C++ Client as much as possible to minimise code duplication.
The client should work on Desktop, iOS, Android and as many other target outputs as possible. This client library is the sibling library to Nakama Cocos2d-x Javascript (which is already compatible with Nakama 2).
I am unable to send a NMatchDataSendMessage in the cocos2dx SDK, looking at the Unreal SDK it seems there is a missing function in NClient:
void NClient::Send(INUncollatedMessage& message, std::function<void(NError)> errback)
I can't find any other way to send an 'INUncollatedMessage' message..
From the server documentation (and the wording of the function) it seems that HasExpired should return true when ‘time’ is greater than or equal to ‘expiresAt’.
Currently it returns true if time is less than or equal to expiresAt in both cocos2dx & unreal SDKs:
bool NSession::HasExpired(milliseconds time)
{
return time <= expiresAt;
}
Whereas the js and .net SDKs are consistent with the documentation:
isexpired(currenttime: number): boolean {
return (this.expires_at - currenttime) < 0;
}
public bool HasExpired(DateTime dateTime)
{
var expireDatetime = Epoch + TimeSpan.FromSeconds(ExpireTime);
return dateTime > expireDatetime;
}
When I'm trying to build using android studio im receiving this.
[x86] Compile++ : libmygame_shared <= NGroupKickUserMessage.cpp
[x86] Compile++ : libmygame_shared <= NStorageRemoveMessage.cpp
[x86] SharedLibrary : libmygame.so
/mygame_cpp/mygame/proj.android-studio/app/jni/../../../Classes/ThirdParty/include/google/protobuf/wire_format_lite.h:713: error: undefined reference to 'google::protobuf::internal::WireFormatLite::ReadBytes(google::protobuf::io::CodedInputStream*, std::string*)'
/mygame_cpp/mygame/proj.android-studio/app/jni/../../../Classes/Nakama/Private/NakamaSDK/api.pb.cc:565: error: undefined reference to 'google::protobuf::DescriptorPool::FindFileByName(std::string const&) const'
/mygame_cpp/mygame/proj.android-studio/app/jni/../../../Classes/Nakama/Private/NakamaSDK/api.pb.cc:3830: error: undefined reference to 'google::protobuf::MessageFactory::InternalRegisterGeneratedFile(char const*, void (*)(std::string const&))'
/mygame_cpp/mygame/proj.android-studio/app/jni/../../../Classes/Nakama/Private/NakamaSDK/api.pb.cc:4328: error: undefined reference to 'google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(int, std::string const&, google::protobuf::io::CodedOutputStream*)'
/mygame_cpp/mygame/proj.android-studio/app/jni/../../../Classes/ThirdParty/include/google/protobuf/wire_format_lite_inl.h:765: error: undefined reference to 'google::protobuf::io::CodedOutputStream::WriteStringWithSizeToArray(std::string const&, unsigned char*)'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.