Reputation: 475
I try to add Raknet to Cocos2d-x game engine for android games but I don't know how . I couldn't find good tutorial about this integration . I can compile and run both of them separately as well , the problem is integration of them . I think that I should change my Android.mk . I see these links and some more but I couldn't find them useful :
my cocos2d-x version: 3.2, raknet : 4.x, ndk : r9d
Upvotes: 1
Views: 722
Reputation: 475
I use Visual Studio and a document about compiler setup in RakNet tutorials. I followed this doc and finally created a DLL form the Raknet sources, put it next to the my game's .exe file, and it worked well.
You should also add Raknet sources to included header files of Visual Studio.
Update:
RakNet is not the best way; try another way like WebSocket or Socket.io. Socket.io is highly recommended and is already used in cocos2d-x sources, but it's not compatible with socket.io 1.X. You can make some changes to Socketio.h and Socketio.cpp to use it with socket.io version 1.X. Also, cocos2d-x says they will consider this issue in the next releases.
Upvotes: 0