Navigation

    Colyseus
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Users
    1. Home
    2. menguzar
    menguzar

    menguzar

    @menguzar

    Chat Follow Unfollow
    0
    Reputation
    1
    Posts
    55
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    • Profile
    • More
      • Continue chat with menguzar
      • Flag Profile
      • Following
      • Followers
      • Topics
      • Posts
      • Best
      • Groups
    menguzar Follow

    Posts made by menguzar

    How to synchronize interactions with game objects?

    Hello,
    I'm developing a game with babylon + colyseus. I'm in the process of implementing interactions with room objects (think of chests, machines, etc.)

    When a player interacts with an object, that interaction should be synchronized and visible by other players in the room.

    I'm familiar with photon PUN and I used to use RPCs to do this kind of stuff. Is there an equivalent system in colyseus?

    If not, then I assume I would have to do this by sending a message to the server. The way I want to do this is to create a generic ObjectInteraction message, which takes the unique object name and a boolean (isActivated), and sets the boolean on the server for that object, so that it can be synchronized in the game.

    However, I'm stumped as to how to do this. For the moment I'm only accessing a Player schema through client.sessionID.

    I feel like I should create a dynamic list of all interactable objects, and setting their isActivated booleans to the relevant values. But I have no idea on how to achieve this.

    Any pointers would be appreciated, thanks!

    posted in Questions & Help •