Appwarp S2 turn-based game, history limit

0 votes
The current limit of history is 5 which is not enough to my case.

I tried to record some recent moves in room properties when using Appwarp platform before,

but 2048 bytes limit still not really convenient to me.

 

If I changed to use S2, can I record each move without any limit?

there are 2 reasons here:

1. to recover for some players disconnected

2. the moves may need to be analyze some day so I need to record everything

 

Plz help me.

Thanks a lot!
asked Jun 6, 2015 in AppWarpS2 by joappdev (20 points)

1 Answer

0 votes

Hi,

With AppWarp S2, you have full control over the AppWarp Server and there you can store all the moves in a DB or locally as every move has to go through server.

One way of doing is using virtual user feature of AppWarp S2. You can create a virtual user who will join the room and sit in the room until game is running and save every move in a DB for that particular game.

Let me know if it helps.

Thanks.

answered Jun 7, 2015 by rajeev.etc (1,660 points)
I would like to put the server in GPaas, and I need to let users to retrieve the every move history later on.

Do you have any suggestion of the DB implementation?
Should I use App42 api to store it when each move happens? Just worry about the api request time which may effect the performance of S2 server.
Or should I save it locally and issue a schedule task to move the local history to App42?

It might be an useful feature of S2 server in the future.
Please give me some suggestions.
Yes, you can use App42 api. As App42 apis also support asynchronous requests so the response time of app42 call will not effect the performance of S2 server.
Let me know if it helps.
Thanks.
That's great!
Since I didn't write codes for Java server before,
Could you give me some local DB suggestion? I think it might be needed to save something if the App42 api not reachable. Or it's not gonna happen?
There are certainly some scenarios where you have to handle for network/server unavailability cases. You can create your own cache that can store the requests if they fail to store the data on App42.You can create a scheduler to check the cache and retry with failed requests if any.
I'm not familiar with Java environment,
so I think I might need some help for implementing what you mentioned.
That would be great if some links or sample code with this.
Thanks so much for your help!
I suggest you to save data in files, and retrieve it whenever required in application as per your use case in concern.
Hi,
You can put your code in a try catch block.When you get the exception, then retry it after some time of interval.
try{
// put your code here
}catch(Exception ex){
// write your retry   logic  
}
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
...