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. Cloud Code
  3. "Player Location" custom session/matchmaking id

"Player Location" custom session/matchmaking id

Scheduled Pinned Locked Moved Solved Cloud Code
4 Posts 2 Posters 1.9k 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.
  • devsleeperD Offline
    devsleeperD Offline
    devsleeper
    wrote on last edited by devsleeper
    #1

    Hello!

    I'm migrating my Mongo data and game service, and I'm hoping for the best BrainCloud (cloud api) recommendations/pointers in the right direction for the below situation:

    Players are assigned a session Id represented as a ship or location in-game. Players can connect if the player shares with them the session id. The session Id should be hidden from those it is not shared, hidden from matchmaking until requirements are met.

    Is this a case of simply using ProfileId as the session Id? It seems a little unsafe. Let's say we have a social hub, and you have access to other player's profile id to common shared things such as avatars nicknames etc- now you could potentially join anyone's session or location even if they haven't entered the matchmaking pool yet.

    Each "location"/session which persists also progresses along with the player, so in addition to a simple key-value Id ships/sessions get upgrades, so I guess this is the case for a player-owned entity?

    Location Ids (essentially a session/room at a given location, within the game server):

    Q: Where is this "location" (current per-player server) id best stored?

    • Can be shared with friends, and once shared the friend can re-join provided it's saved somewhere
    • Player can't modify it; only cloud api changes it
    • Tied to matchmaking if the player meets requirements (has no shield, is within the same region ie (CA/US) and meets the XP requirements) this id will be presented as a means to join (raid) the player's session.

    Thank you for your time!

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

      Hi @devsleeper ,

      I think I'd recommend you model "Location" as a Custom Entity collection. You can use the "entityId" as your shareable id... and include custom attributes in the "data" section of the object - like "data.includeInMatchmaking", etc...

      It would probably best be an "Owned" entity - so if the user account that owns it is deleted - it is deleted as well.

      I hope that helps!

      Paul.

      devsleeperD 1 Reply Last reply
      1
      • Paul WinterhalderP Paul Winterhalder

        Hi @devsleeper ,

        I think I'd recommend you model "Location" as a Custom Entity collection. You can use the "entityId" as your shareable id... and include custom attributes in the "data" section of the object - like "data.includeInMatchmaking", etc...

        It would probably best be an "Owned" entity - so if the user account that owns it is deleted - it is deleted as well.

        I hope that helps!

        Paul.

        devsleeperD Offline
        devsleeperD Offline
        devsleeper
        wrote on last edited by devsleeper
        #3

        @Paul-Winterhalder Thanks, I ended up going with Entities/Groups for character/location business.

        Since locations are player-owned and (which I forgot to mention) can have crew members/roles groups seemed to make the most sense with the builtin invites etc, using the group Id as the shareable Id as you mentioned for entities.

        For matchmaking I see we have GetRandomGroupsMatching so I think that works out great!

        1 Reply Last reply
        0
        • devsleeperD devsleeper has marked this topic as solved on
        • Paul WinterhalderP Offline
          Paul WinterhalderP Offline
          Paul Winterhalder
          brainCloudAdmin
          wrote on last edited by
          #4

          Ah - perfect. Yeah - that sounds like a better option given the full requirements.

          Glad you found it... and welcome to brainCloud!

          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