Navigation

    Colyseus
    • Login
    • Search
    • Recent
    • Tags
    • Users
    1. Home
    2. KiloGram
    K

    KiloGram

    @KiloGram

    Chat Follow Unfollow
    2
    Reputation
    5
    Posts
    1608
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

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

    Posts made by KiloGram

    Organizing message sending/calling room methods.

    Hi everyone!

    I often have to send messages to the client from some part of the state - usually someplace in the player logic (eg. when the player gets hit). To do this I must pass the room object to the state object which then passes it to the player objects which can then call the room's methods. This always feels a bit hack-ish as I am calling methods from places where they shouldn't be. Is there a way that I can organize things a bit more elegantly or is this the intended way for messages to be sent?

    Thanks in advance.

    posted in General Discussion •
    RE: How do I get the user's IP address?

    I know this is old, but maybe you still need an answer - it can be found here in the docs. Essentially the onAuth(client, options, request) function takes a third parameter request which you can then use to get the IP with request.connection.remoteAddress.

    posted in Questions & Help •
    2d array in ArraySchema.

    I created an ArraySchema and filled it with arrays to simulate a tiled map. I would like to listen for changes in the 2d array and also I don't know how to do the type() thing on it so that it syncs the elements in it properly. Any help with this would be great. Thanks in advance.

    posted in Questions & Help •
    RE: Colyseus.js "Cannot read property '_schema' of undefined".

    Thank you so much! That actually worked!

    posted in Questions & Help •
    Colyseus.js "Cannot read property '_schema' of undefined".

    Hi,

    I am getting this error in Chrome. I am not asking for help with my specific problem but I just want to know what this error entails and what the cause of it may be. Any pointers?
    0_1554793243063_Screenshot 2019-04-09 at 10.00.23 AM.png

    posted in Questions & Help •