Navigation

  • Recent
  • Tags
  • Users
  • Search
  • Login
Colyseus
  • Login
  • Search
  • Recent
  • Tags
  • Users

Documentation GitHub

We're migrating to GitHub Discussions. This forum does not accept new registrations since April 6, 2023.
  1. Home
  2. KiloGram
K

KiloGram

@KiloGram

Chat Follow Unfollow
2
Reputation
5
Posts
1.6k
Profile views
0
Followers
0
Following
Joined 10 Mar 2019, 18:48 Last Online 20 May 2020, 11:15

  • 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 • 25 Nov 2019, 21:00
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 • 16 Sept 2019, 19:57
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 • 14 Jun 2019, 14:41
RE: Colyseus.js "Cannot read property '_schema' of undefined".

Thank you so much! That actually worked!

posted in Questions & Help • 9 Apr 2019, 18:24
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 • 9 Apr 2019, 07:02

© 2023 Endel Dreyer