Global Entities What, when, where and how?

  • Hi, I developed a game on GameSparks last year for a former employee. However, I've been personally looking around at different BaaS that is friendly for living room one-man developer to publish something simple and cheap. BrainCloud looks interesting and very familiar, but I don't can't find any information on a global database... in fact, I can't find any information on any form of database in the portal or how to use any. All I can find is some existence of User Entities and Global Entities.

    What is BC database if it has one?
    When can I use it? can I use it as part of the development tier?
    Where is it in the portal? Does a db have a portal presence? I can't find anything regarding entities.
    How do I use it?

    My use case is that I want to run a similar game to Risk but on a larger player scale. Where players play a simple mini-game. If players "defend" the region the area sees an increase in soldiers. If the players "attack" a region, the regions numbers will go down. Then on a certain period of time say every 2 hours. The map processes a regional soldier comparison and adjusts the region team control and numbers accordingly. Players that participated get a reward for conquested territories they participated in.

    This means I need crossplayer data and documentation is pretty light on such information.

  • brainCloud

    Hi Jason,

    Thanks for checking out brainCloud.

    As you've ascertained, brainCloud organizes most data into Entities - of which there are multiple types - User Entities (each owned by a user), Global Entities (globally available to all users of a game/app), and Group Entities (owned by groups and accessible by their members).

    (Under the covers, brainCloud uses MongoDB - but devs don't access that directly - they do so via our Entity APIs).


    You can view and edit this data from various places in the portal:

    • Global Entities - via Monitoring | Global Monitoring | Global Entities
    • User Entities - via Monitoring | User Monitoring | User Entities
    • Group Entities - via Monitoring | Group Monitoring | Group Entities

    Sounds like it's primarily Global Entities that you'd want to represent your region data. You can find the APIs for them here. Note - you'll probably want to use a subset of Global Entities called System Entities. Every entity in brainCloud has an owner, and if that owner is deleted the entity is deleted... except System Entities, they don't have owners, and thus survive past the deletion of any specific player.

    As for calculating progress on the map every few hours, you'll want to use scheduled cloud code scripts for that. Certainly very doable.

    There's a bit more info on our data here:

    Oh - and one more thing, there's a new, more powerful type of entity coming soon called Custom Entities. They're like Global Entities, but support more indexing flexibility and will support much larger collections of entities (into the millions).

    Anyway, hope that gets you started!



  • Nice, thank you for the answer. BrainCloud has so far been the best feature offer for 1 person tinkering there own little mini-games that I have come across. I'm looking forward to digging in a little more and doing some tests.

    Another question. Is there a way to view the entities in the Portal. I'm new I'm having troubles finding my way around.

  • brainCloud

    We're glad you like it! brainCloud is good for big and small shops alike - we scale nicely that way 🙂

    And yes, you can view your entities...

    You can view Global Entities by going to Monitoring, then choosing Global Monitoring, and then Global Entities. From there you can search for and view/edit your entities.

    As you can see, when viewing an entity there is some metadata, and then the custom contents of the data section of the entity, shown in JSON.


    Group Entities are similar - you'll find them under Monitoring | Group Monitoring | Group Entities.

    To find User Entities you need to look under a User. So search for your user in the Monitoring | User Monitoring section, and then click on the User Entities page.

    Hope that helps!


  • Thank you, fantastic. I appreciate all the information you have given.

Log in to reply