General

Discuss all the things!

107 Topics 332 Posts
  • Customizing your forum settings...

    Pinned Moved
    1
    1 Votes
    1 Posts
    338 Views
    No one has replied
  • Dedicated server getting all player's username

    Unsolved
    2
    0 Votes
    2 Posts
    37 Views

    That depends on how players will get matched and ultimately connect to your server. If you use our lobby-based matchmaking facilities, the sequence will go roughly like this:

    Players make a FIND_OR_CREATE_LOBBY call to the LobbyService. The lobby matchmaking process runs and a bunch of players get associated with a lobby instance. Once the launch conditions are satisfied, brainCloud will launch an instance of your dedicated server. The dedicated server will start and immediately make an S2S call to ask brainCloud for all the lobby instance details. These details will include each players name.

    If you don't use lobby matchmaking, you'll need to use the S2S api to query brainCloud for the player details manually.

  • latest braincloud xcode build error

    Unsolved
    4
    0 Votes
    4 Posts
    53 Views

    Okay, I built it using the commented out part above.

  • brainCloud 5.4 is on it's way!

    15
    2 Votes
    15 Posts
    221 Views

    Yup. We as devs often resist change. Hopefully you'll come to appreciate Portal-X as you use it more!

  • Don't reward quests + milestones automatically

    Unsolved
    3
    0 Votes
    3 Posts
    70 Views

    one workaround im thinking of doing is having a "fake" user stat. one that tracks the actually XP and another that's "unlocked XP". then just increase the unlocked XP whenever someone "claims" the milestone

  • Max number of keys on a user statistic?

    Solved
    3
    0 Votes
    3 Posts
    100 Views

    Update - we discussed it and we think you are good to go.

    A test of 1000 stats revealed that the resulting statistics object (that contains all values) was only about 64KB - which is smaller than I had feared. So it looks like 2000-2500 stats will come in less than 200KB.

    Note - that IS 200KB more data that will be returned during an Authenticate call - and during readUserState() - but it should work okay.

    I assume you'll be creating these stats dynamically. That is controlled via the setting on this page (you've probably already discovered it).

    2024-08-27_09-37-51.png

    One warning is that stats are case sensitive - so we'd definitely recommend that you standardize the creation/accessing of the stats - maybe do an uppercase() or lowercase() cast before creating / accessing them.

    I hope that helps. Good luck!

    Paul.

  • How to implement Scheduled Scripts

    Solved
    3
    0 Votes
    3 Posts
    91 Views

    Great. This perfectly answers my question. Thank you!

  • Can you reward items using when you achieve an XP level?

    Solved
    2
    0 Votes
    2 Posts
    86 Views

    Hmm - not currently - but it's coming...

    Unfortunately it didn't make it into 5.4 (which drops in a few weeks) - so that will end up in 5.5.

    Paul.

  • How to implement "loot boxes"

    Unsolved
    2
    0 Votes
    2 Posts
    81 Views

    brainCloud doesn't directly support loot boxes currently... Though of course the Item Catalog and User Items services give you the building blocks to construct your own system in cloud code.

    To implement such a system, you would:

    use Global Entities or Unowned Custom Entities to represent the collection of loot box templates construct your JSON with the rules (percentages, etc.) for constructing the loot box then write a cloud code script that when run - performs the work to award the user the relevant items

    Note - there are future plans to add such a feature to brainCloud - but it isn't scheduled yet. I'll add your +1 !

    Paul.

  • Best way to set default items

    Solved
    2
    0 Votes
    2 Posts
    70 Views

    Hi - normally what you'd do there is attach it as a reward to XP level 1. <- XP level 1 has a minimum XP of 0 - so users get it when the user account is created.

    I hope that helps!

  • Discord Server

    2
    1 Votes
    2 Posts
    156 Views

    If looking for a Discord to chat with other devs implementing BC, the "GBaaS" Discord server has an official ambassador inside (although mostly for use with a feedback bot to forward to themselves and unofficial dev chatter with other folks implementing BC). It's decently active in the #braincloud channel:

    https://i42.games/gbaas (disclaimer: I run this server, but it's been around since 2016)

  • 1 Votes
    9 Posts
    320 Views

    @Brad-Hester That bug has been fixes (and patched). Thanks for reporting it!

  • Cloud Code not loading in Console

    Solved
    2
    0 Votes
    2 Posts
    171 Views

    In case anyone else had a similar issue...

    There was a Cloudflare-related cert issue associated with a site called cdn.jsdelivr.net.

    As I understand it, the Monaco editor that Portal-X uses for editing source and JSON files (and many other common web-based components) makes use of that site.

    More details on the issue here: https://github.com/jsdelivr/jsdelivr/issues/18565

    The issue was temporary - and seems like it only affected only certain localized regions... (just a guess on my part there).

    Anyway - all good now - and nothing directly related to brainCloud.

    Paul.

  • Memcache in Braincloud

    Unsolved
    2
    0 Votes
    2 Posts
    279 Views

    Hi Nguyen,

    brainCloud makes use of both Memcached and Redis as part of it's architecture - but we do not directly expose these in our APIs.

    What was your use case?

    Paul.

  • Reconnect to room on a Relay Server

    Unsolved
    30
    0 Votes
    30 Posts
    956 Views

    Ciao @Greg-Moulds,
    you rock boy! 🙂
    I tried reducing the "early" launch setting as you suggested and in fact now the waiting time is very short. That was exactly the problem.

    Thanks!

  • How to export all user entities for all users of an app

    Solved
    7
    0 Votes
    7 Posts
    314 Views

    Thank you both for the helpful replies. I am educating myself further and exploring options. Depending on what I decide to pursue as the final option, I may be back 🙂

  • Tournament Rank Rule

    Solved
    3
    0 Votes
    3 Posts
    305 Views

    Hi Paul,

    Yes this answers my question. I guess since the percentage is based on the number of players, I could query the number by checking how many entries there are in a given division leaderboard?

    In any case I'll stick to absolute ranks for now as you suggest. I was looking into percentages to future-proof our client API.

    Thank you for the quick help!

  • 0 Votes
    5 Posts
    301 Views

    All very good points @Panagiotis-Milios !

  • Coming in brainCloud 5.2 - refactored Script Editor!

    Unsolved
    4
    1 Votes
    4 Posts
    291 Views

    Hi Panagiotis,

    Thanks for the feedback!

    That vertical icon bar on the far left is new in 5.2. It was key to allowing us to free up more space - moving the Debug + Log screens to their own pane. (i.e. now the screen is only ever split vertically in 2 - instead of sometimes split into 4 pains - 2 verticle and 2 horizontal).

    The font scale and tab size options were there before too - but are somewhat more discoverable now that we have that cog wheel.

    Glad you like the changes!

  • 0 Votes
    2 Posts
    261 Views

    Hi Kuabs, you can use brainCloud webhooks to achieve this feature, the steps are as follows.

    Create a cloud code script, in this example use the name "webhook_forgotPassword", and paste the following code into the script. "use strict"; function main() { var response = {}; bridge.logDebugJson("Script inputs", data); var userEmail = data.parameters.email; response.stringResponse = "webhook is processing user email reseting..." + data.parameters.email; // validating the user email if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(userEmail)) { // checking if the email is existed in brainCloud users var context = { "pagination": { "rowsPerPage": 20, "pageNumber": 1 }, "searchCriteria": { "emailAddress": userEmail }, "sortCriteria": { "playerName": 1 } }; var userProxy = bridge.getUserServiceProxy(); var postResult = userProxy.sysGetPage(context); if (postResult.data.results.count > 0) { var userProfileID = postResult.data.results.items[0].profileId; // sending password reset email postResult = userProxy.sysSendPasswordResetEmail(userProfileID); if (postResult.status == 200) { response.stringResponse = "password reset email has been sent to user's email:" + userEmail; } else { response.stringResponse = "system error with sending email..."; } } else { response.stringResponse = "user doesn't exist with the email you provided"; } } else { response.stringResponse = "user's email is invalid."; } return response; } main();

    Open Design | Cloud Code | WebHooks page, and create a WebHook link to the script you created from the previous step. Copy down the WebHook URL for the next step.73ee4986-3d38-4694-bac5-d7c4896c99ba-image.png

    Now, you have completed the work from brainCloud. Next, open your client app editor (if you are using Unity), define the WebHook URL as a variable, and link it to your forgotEmail object (could be a link or button in your app) onClick event, making it trigger this URL when the user clicks with Application.OpenURL command. Grab user inputted email and append it as an email parameter to the URL as follows:

    const string passwordResetWebhookUrl = "https://portal.braincloudservers.com/webhook/12832/forgotPassword/6dc675bb-f8b4-495f-ac5e-1f0658bfe09c"; Application.OpenURL(passwordResetWebhookUrl + "?email=" + userEmail);

    Run your app to test, you should get a similar pop-up window as follows once a user clicks the forgotEmail object,
    94dd0dae-7d6e-44c8-ab26-0d57a8544bb4-image.png

    Check the reset email in your test email account...25a6f240-5246-4ba2-a216-e978eaccee8c-image.png