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. TreantBG
TreantBG

TreantBG

@TreantBG

Chat Follow Unfollow
0
Reputation
2
Posts
912
Profile views
0
Followers
0
Following
Joined 5 Feb 2019, 19:43 Last Online 9 Sept 2021, 16:16

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

Posts made by TreantBG

Scheme Map listeners for object array change

Hello all,

I want to create a battleship game and i have the player SchemeMap and inside the player there is the board SchemeArray with the coordinates
How can i listen for change.
The whole object players is not updated and sent to the clients when i change field inside board and this syntax i think is old and doesn't work

his.room.listen("players/:id/:attribute", function (change: ObjectState) {
            if(change.path["attribute"] == "direction"){
                callback(change, thisScene);
            }
        });

how should i sent updates to the client regarding the board ?

posted in Questions & Help • 24 Aug 2021, 12:06
How "fog of war" would be implemented with rooms?

Hello,

As i understand if you connect to a room that contains entities (players) each player receives updates to the other player.
How would one implement some deliberate hiding of information from certain clients?

I suppose it will be easy to create something like maphack if you receive the position of all the opponents.

Not that is going to happen on a indie javascript game made for fun, but still i'm thinking like a developer and its interesting to me if it is possible with this network engine.

posted in Questions & Help • 5 Feb 2019, 19:55

© 2023 Endel Dreyer