How to code on server side?

0 votes
I used Cocos2d-x 3.7 and port for flatform Android use language C++.

How to code to calculating on serverside when get move direction from client and then send back new position from move direction with old position.

Where i have to code on serverside?

EX: Update move from server as game Slither.io on Android.

Thanks!
asked Jun 11, 2016 in Cocos2D-X by Loi Nguyen (10 points)

1 Answer

0 votes

Hi Nguyen,

If you want to write your own custom business logic on server in AppWarp.You need to use AppWarpS2 where you can override existing AppWarp functionality and write own game busniess logic. You can go through with AppWarpS2 API Documentation.

You can write own game logic either of following based on requirements.

  1. Using Room RPC : You can define your own function on server side at RoomAdapter and call this form client side using invokeRoomRPC API
  2. By overriding handleMoveRequest : You can also override it you using sendMove from client side.

Let me know if more queries are concern.

Thanks

Vishnu Garg

answered Jun 11, 2016 by Vishnu Garg (674 points)
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...