You may write a pre-hook cloud code script with your validating logic and integrate it with
Best posts made by JasonL
Latest posts made by JasonL
RE: Using numbers as JSON key.
Here is the thing, the input parameter
datareturned from our service proxy is a Java Map object, which does NOT support a number value as key when accessing value using object[key] syntax.
data = JSON.parse(JSON.stringify(data));
RE: Tournament Questions
(Post the answer from brainCloud chat channel)
Actually, there is a workaround that you can perform the tournament rewards adjustments,
- Turn off the auto claim
- Add a post-hook to Authenticate instead <- where auto-claim would normally run
- And in the post-hook look to see if they have tournament rewards, and if they do, claim them there - performing any award adjustments that need to be made.
RE: Unique field for a Custom Entity
Hi Reza, a simple workaround I would recommend is using our atomic methods, such as IncrementGlobalStats, to form the field values with the returned value of that method and some other characters you selected. (defined a global statistic ahead of time, call IncrementGlobalStats() get the returned current value of the global statistic, e.g.
123, then combine with the name you selected to a unique name, such as
RE: RPG's on BrainCloud?
Sorry for the late reply.
- Yes, brainCloud can handle RPG style games well, it provides a rich set of features that benefits any type of game - includes very flexible multiplayer tech, Our built-in real-time multiplayer services are more based around the idea of shared game experiences that last a finite period of time (i.e. arena shooters, casual multiplayer, etc.). Our matchmaking, lobby services, room server system, etc are all geared toward making this sort of experience easy and inexpensive to build - but also can integrate with 3rd party or custom tech. brainCloud provides support for custom Room Servers that can support any type of custom or 3rd party multiplayer tech. For all these characters related data (user data), you can use User Entity or Custom Entity to store and trace them.
- The end-user profileId and anonymousId are stored securely in the client library wrapper on user devices.
- Users' IAP items and currency end up “unlocking” “awarding” these to the associated profileId, so that will never be lost.
- If a player is offline, you need to have some code on your side to handle this situation with the request callbacks, as long as “update()” is not called, it will not process sending packet bundles or process callbacks from the received packets. Shouldn't keep all calls for later. Instead, update player stats once connected, in 1 call.
Hope that helps!
RE: Shared Global Context for each CloudCode invocation?
Based on the description of your use case, I'd recommend you to use custom entities, which natively have the user access control (ACL) configured. And check out this article about some size limits on entities in case you haven't see it. http://help.getbraincloud.com/en/articles/3472603-what-are-the-size-limits-on-user-entities
RE: Pre Hook for Authenticate Or send Custom content
The authenticate API is not allowed a prehook, every API (including cloud code scripts) only can be called after the user authenticated.