• 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

List active tournaments

Scheduled Pinned Locked Moved Unsolved APIs
7 Posts 2 Posters 64 Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    richard
    wrote last edited by
    #1

    In the context of https://help.getbraincloud.com/en/articles/3248895-introduction-to-braincloud-global-tournaments and especially in the situation "If you implement concurrent tournaments, offer a means to cycle between them", how can I programatically query the current active tournaments?

    1 Reply Last reply
    0
  • R Offline
    R Offline
    richard
    wrote last edited by
    #2

    I should add, this is part of our evaluation of Braincloud as a potential BaaS for our game, so I'm trying to map our requirements onto Braincloud features.

    1 Reply Last reply
    0
  • Paul WinterhalderP Offline
    Paul WinterhalderP Offline
    Paul Winterhalder brainCloudAdmin
    wrote last edited by
    #3

    Hi @richard,

    Thats a good question. Often devs set up a set schedule for their tournaments - so the list of tournaments that could be active at any time is just "known".

    [And to clarify - I assume that you are asking how you would know the active tournaments across all leaderboards. To get the state of tournaments on a specific leaderbord, you would use the GetTournamentStatus() call].

    For more dynamic games - where the tournaments may be created dynamically (and programmatically) for liveops-related events - I don't think we have an API that easily lists them right now.

    That said, we are looking into the best way to do this - because we'd actually like to add that sort of information to the new Calendar View (as introduced in 5.8). And of course, the use case you suggest is important too.

    So we're actively looking at the best way to represent and query this - and will ensure there is API support for this as well.

    So - rest assured - direct support for this use case is coming soon. We'll keep you posted!

    Paul.

    1 Reply Last reply
    0
  • R Offline
    R Offline
    richard
    wrote last edited by
    #4

    If runtime discovery is difficult, then I could use a fixed leaderboardId such as "monthly_event"

    I experimented with that, and when a tournament is over I can call:
    TournamentService.ViewReward("monthly_event", -1) and in the response see that tClaimedAt is 0

    but to actually claim the reward with ClaimTournamentReward I have to pass a specific versionId - how can I figure out which versions of the leaderboard the user has unclaimed rewards for? That's particularly difficult if a new iteration of the monthly event has already started.

    More generally, we're evaluating switching from Firebase for a music game with thousands of songs. In the Firestore database it's easy to have leaderboards with secondary indexes for player country/region. I don't think Braincloud supports that so we're going to need tens of thousands of leaderboards with IDs such as "song_456_US" and "song_1234_CA". For that reason, I need to avoid any situation where I have to list and filter all leaderboards because it will be (I expect) too expensive ($) and/or too slow.

    1 Reply Last reply
    0
  • R Offline
    R Offline
    richard
    wrote last edited by
    #5

    A little more progress - although passing a version ID of -1 to GetTournamentStatus() produces an error if a no tournament is running, I can instead call GetGlobalLeaderboardVersions() and then call GetTournamentStatus() individually for each returned version.

    1 Reply Last reply
    0
  • R Offline
    R Offline
    richard
    wrote last edited by
    #6

    I'd also like to take advantage of the tournament's Custom JSON to store the file ID of a JPG image to be displayed in the game UI to promote the tournament (example: in December we'd ask users to play a Christmas-themed tournament and the image would be snowy) but I don't see how to edit the Custom JSON through the portal - is that only possible through with Cloud Code?

    1 Reply Last reply
    0
  • Paul WinterhalderP Offline
    Paul WinterhalderP Offline
    Paul Winterhalder brainCloudAdmin
    wrote last edited by
    #7

    Hi @richard,

    Hmm - yeah - I don't think that JSON is currently editable in the portal.

    Paul.

    1 Reply Last reply
    0

  • Login

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