• Categories
  • Recent
  • Tags
  • Popular
  • Solved
  • Unsolved
  • Users
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Darkly)
  • No Skin
Collapse
brainCloud Forums
    • All Time
    • Day
    • Week
    • Month
    • All Topics
    • New Topics
    • Watched Topics
    • Unreplied Topics
    • All categories
    • All tags
    Load new posts
Log in to post
  • A

    Cloud Api for Writing Global Properties

    Scheduled Pinned Locked Moved Suggestions admin global properties cloud code script
    3
    0 Votes
    3 Posts
    141 Views
    A

    Thanks @Paul-Winterhalder

  • C

    Matchmaking: Search Multiple Lobby Types

    Scheduled Pinned Locked Moved Suggestions matchmaking lobby
    3
    0 Votes
    3 Posts
    136 Views
    C

    @Paul-Winterhalder said in Matchmaking: Search Multiple Lobby Types:

    that

    Thanks Paul, I don't think I could do the different lobby info option as I would like the players to choose specifically which game mode and if I understand correctly, I can only do that by having the players search for a lobby of that game mode. It's not too much of an urgent issue, I just wanted to put it out there and see how realistic it was. I talked to Greg a bit and we discussed joining multiple lobby types at once. For now, I plan to search for multiple lobbies at once and cancel matchmaking for any possible 2nd joined lobbies.

  • H

    Recommended way to read Entity data? (Unity, C#)

    Scheduled Pinned Locked Moved APIs entity unity
    3
    0 Votes
    3 Posts
    195 Views
    T

    @Henry-Smith said in Recommended way to read Entity data? (Unity, C#):

    Sorry to bring back an old thread, but I'm just learning the platform and I thought I'd share my solution to this.

    First, define a generic class to handle the raw json response data:
    eg. my Tut1_AddTwoNumbers api returns:

    {"data":{"response":{"answer":24},"success":true},"status":200} public class Response<T> { public ResponseData<T> data; public int status; } public class ResponseData<T> { public T response; public bool success; }

    Then for each api call that you have, define a class that contains the fields that are custom to that response.

    public class Tut1_AddTwoNumbersResponse { public int answer; }

    Now, you call your function and handle the response like this:

    public void Tut1_AddTwoNumbers() { string scriptName = "Tut1_AddTwoNumbers"; // Anonymous object to supply the params. var data = new { num1 = 16, num2 = 8 }; var jsonScriptData = JsonWriter.Serialize(data); SuccessCallback successCallback = (response, userdata) => { var responseObject = JsonReader.Deserialize<Response<Tut1_AddTwoNumbersResponse>>(response); //var responseObject = JObject.Parse(response); Debug.Log($"Success The answer is '{responseObject.data.response.answer}' | raw_json={response}"); }; FailureCallback failureCallback = (status, code, error, userdata) => { Debug.Log(string.Format("Failed | {0} {1} {2}", status, code, error)); }; // Call the script _bc.ScriptService.RunScript(scriptName, jsonScriptData, successCallback, failureCallback); }

    this line is the important part:

    JsonReader.Deserialize<Response<Tut1_AddTwoNumbersResponse>>(response);

    Hope that helps someone!

  • G

    get custom entities associated to a player at login.

    Scheduled Pinned Locked Moved Cloud Code custom entities entity cloud code script
    3
    0 Votes
    3 Posts
    157 Views
    G

    Edit . you can get all custom entities for the current user with the query

    { "entityType": "[entitytype]", "ownerId": "[profileId]", "context": { "pagination": { "rowsPerPage": 50, "pageNumber": 1 }, "searchCriteria": { // other search criteria here }, "sortCriteria": { "createdAt": 1 } } }
  • C

    Server Monitor

    Scheduled Pinned Locked Moved Suggestions room server monitoring server
    3
    0 Votes
    3 Posts
    158 Views
    C

    @Paul-Winterhalder Thanks Paul, looking forward to any possible solutions.

  • M

    Getting client app version

    Scheduled Pinned Locked Moved Solved Cloud Code client app version gameversion
    3
    0 Votes
    3 Posts
    209 Views
    M

    Thank you for your answer. Yes, it will be nice to have a separate API but for now, the solution suggested by you works for us.

  • A

    Shared Modules - Ability to share code between cloud scripts

    Scheduled Pinned Locked Moved Suggestions suggestion cloudscript javascript
    3
    1 Votes
    3 Posts
    197 Views
    A

    Thank you very much 🙂

  • L

    is there automation scheduled events?

    Scheduled Pinned Locked Moved General event automation portal
    3
    0 Votes
    3 Posts
    123 Views
    Paul WinterhalderP

    Hi Lee,

    You can schedule jobs in brainCloud using the ScheduleRuleScriptMinutes() or ScheduleRunScriptMillisUTC() calls - http://getbraincloud.com/apidocs/apiref/#capi-script-schedulerunscriptminutes

    And those jobs can reschedule themselves to run again at another time.

    You can find an example scheduler script here: https://getbraincloud.com/apidocs/cloud-code-central/handy-cloud-code-scripts/scriptscheduler-script/

    Hope that helps!

    Paul.

  • Paul WinterhalderP

    brainCloud 4.2 is released!

    Scheduled Pinned Locked Moved General 4.2 release announcement
    3
    0 Votes
    3 Posts
    187 Views
    H

    +1 to updated roadmap. Also wishing you guys implement web payments soon (xsolla or any other)

  • C

    Mass delete of users.

    Scheduled Pinned Locked Moved General crud
    3
    0 Votes
    3 Posts
    192 Views
    C

    @Chris-Brown I see it now. Thank you!

  • C

    Getting names for request and invites to a group

    Scheduled Pinned Locked Moved Unsolved APIs group unity
    3
    0 Votes
    3 Posts
    213 Views
    JonathanJ

    As an interim solution, you can add a cloud code script or a post-hook to retrieve the missing data, using the profileIds found in the request.

    https://getbraincloud.com/apidocs/apiref/#capi-friend-getsummarydataforprofileid

    ... "pendingMembers": { "382eb04f-f80c-4bfc-9a12-fca508cad476": { // <- These profile ids "role": "MEMBER", "attributes": {}, "pendingReason": "ASKED_TO_JOIN" } } ...
  • A

    Support for Open Id so other backends can integrate with BrainCloud

    Scheduled Pinned Locked Moved Suggestions openid
    3
    0 Votes
    3 Posts
    260 Views
    A

    @Paul-Winterhalder Yes please, there are other gaming backends which only works with Open Id . I already shared one requirement with Jason. Implementing this will not just solve my edge case but open opportunities for lots of other backends to work well with BrainCloud

  • G

    Execute script when new user is registered

    Scheduled Pinned Locked Moved Cloud Code registration authentication cloud code script
    3
    0 Votes
    3 Posts
    224 Views
    G

    @JasonL Thanks, I ended up with this cloudCode:

    isForceCreate = String(data.callingMessage.forceCreate) == "true"; isNewUser = String(data.message.newUser) == "true"; var response = {}; response.status = 200; response.data = data.message; if (isForceCreate && isNewUser) { var min = 10000000, max = 999999999 prefix = ["player", "user", "member"] const num = Math.floor(Math.random() * (max - min + 1)) + min; const pre = prefix[Math.floor(Math.random() * prefix.length)]; var defaultPlayerName = pre + String(num); var playerStateProxy = bridge.getPlayerStateServiceProxy(); // We are changing the player name on the server. playerStateProxy.updatePlayerName(defaultPlayerName); // And in this API Call's return data. response.data.playerName = pre + String(num); } response; //return the object

    This works just the way I need

  • Kenneth LightnerK

    HTTP Client API - DELETE calls

    Scheduled Pinned Locked Moved Cloud Code cloudscript
    3
    0 Votes
    3 Posts
    146 Views
    Kenneth LightnerK

    Delete call update and everything is working now. Thanks!

  • Y

    Limiting number of async matches

    Scheduled Pinned Locked Moved APIs matchmaking async match
    3
    0 Votes
    3 Posts
    149 Views
    Y

    Thank you! I will try that out.

    Just for anyone else's future reference, I realized you can "log in" as another user using GetSessionForProfile(). So if the other user is offline, you will be able to modify their data (for example, to increment an attribute for number of matches they have).

    I believe this way, you can also do what JasonL said and TurnShieldOn() for the other user, stopping them from being able to match anymore.

    Correct me if I'm wrong.

  • D

    Few Questions Before Committing to This BaaS!

    Scheduled Pinned Locked Moved General question
    3
    0 Votes
    3 Posts
    52 Views
    D

    Update:

    Authentication seems to be going well. I can automatically sign user in using ANON, and attach an email and pass. I can also log a user in using existing email and pass and getAnonID and store it and proceed to use that AnonID to use AnonID on startup for silent authentication. However, if user selects anon account but then the user decides to log into an existing email and pass account, how would I go about deleting the new ANON account the user decides to "throw" away?
  • R

    Unique field for a Custom Entity

    Scheduled Pinned Locked Moved Cloud Code cus cloud code script cloud code
    3
    0 Votes
    3 Posts
    150 Views
    J

    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 name_123)

  • C

    Web client security

    Scheduled Pinned Locked Moved General security web
    3
    0 Votes
    3 Posts
    69 Views
    C

    @David-St-Louis-0
    On my last question, can you restrict API calls to only be from a specific web domain or mobile app is? Google Api's allowed to restrict calls to firebase to be specifically from an web domain, or the specific app ID's.
    Another way to ask it, is there any way to restrict API calls to from a specific location?
    Thanks again,
    -Chad

  • C

    RPG's on BrainCloud?

    Scheduled Pinned Locked Moved Solved General braincloud web rpg
    3
    0 Votes
    3 Posts
    88 Views
    J

    Hi Chad,

    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!

  • C

    Shared Scripts not working

    Scheduled Pinned Locked Moved Suggestions shared-scripts
    3
    0 Votes
    3 Posts
    154 Views
    C

    @JasonL
    I can confirm they are working despite a warning, in strict mode.
    Thanks!

  • Login

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • Solved
  • Unsolved
  • Users