Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Solved
  • Unsolved
  • Users
Skins
  • Light
  • Brite
  • 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
  1. Home
  2. General
  3. Best Practices - Level Completion and Rewards

Best Practices - Level Completion and Rewards

Scheduled Pinned Locked Moved General
6 Posts 2 Posters 1.7k Views 2 Watching
  • 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.
  • C Offline
    C Offline
    chuck
    wrote on last edited by
    #1

    We are setting up our server storage and would like to use BreainCloud's built-in tools as much as possible to avoid recreating the wheel.

    Our game will have levels you must complete to advance to the next. You can go back and replay those levels for smaller rewards.

    Milestones look like a good option for handling the items/currency/xp you get for finishing a level but all of these appear to be tied into stats. What is best practice for these? Do we need to set up a stat (0 to 1) for each of these as they are earned to trigger milestones and rewards or should we roll our own approach for this? Ideally we'd like to have a way in the UI to configure a milestone for each board (named by the board id) and assign what they get in each milestone. Then as they complete we have them trigger, but I can't seem to find a way to do this directly and making a stat for each board seems overly convoluted. Am I missing something that would be better/easier?

    Thanks for any pointers.

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

      Hi Chuck,

      Milestones are normally used for triggering things like achievements - and yes, the generally trigger across common stats like levelsCompleted, civiliansSaved, gamesWon - that sort of thing. Keeping track of each level passed as a separate stat is probably annoying and wasteful.

      As for keeping track of level completion - one would normally just use a User Entity - probably via the Singleton API (though that is up to you).

      And as for awarding certain amounts of currency, items, etc. of level completion - you could set up:

      • a Global Entity type of "Levels" for that sort of thing - each level entry could contain those rewards
      • or Unowned Custom Entity <- same idea

      And then have a cloud code data handle the reward calculations server-side...

      Anyway - hope that helps!

      Paul.

      1 Reply Last reply
      0
      • C Offline
        C Offline
        chuck
        wrote on last edited by
        #3

        Ok that makes sense. For the items and rewards, would that just be keys/values we set or is there a way to have a custom global entity reference ids of other entities via the interface?

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

          Currently when created via the portal - rewards are limited to XP, currencies and statistics. The SYS APIs allow you to attached "extraData" JSON though - which you could use for anything.

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

            My bad - the UI does support extra data - though as you indicate - it's limited to key + value pairs.

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

              That said - any system you want can be constructed with cloud code.

              Hope that helps!

              1 Reply Last reply
              0

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

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