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. bhenzo
B

bhenzo

@bhenzo

Chat Follow Unfollow
0
Reputation
1
Posts
625
Profile views
0
Followers
0
Following
Joined 29 Jan 2023, 15:14 Last Online 21 Feb 2023, 05:34

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

Posts made by bhenzo

Manual trigger update for schema

Hello! first of all, the classic: "Sorry for my english", now, the question:

I am trying to avoid as much as possible data updates from the server. In my game, I'd like to mark a field "position" of game entities in a manual way, some like "entity.pos.sendUpdate()". Because I don't need every position all the time, because th client can calculate by itself, but I need them to be present. Also, a nice feature also would be you can set a "patchRate" for a specifics schemas: Some examples I can think of

@type("number", patchRate= 500)
"updates this number every 500ms, or when you call sendUpdate() manually in the next inmediate main path upddte, and when the client first synchronization"

@type("number", pathRate: 0)
"only update manually and in the first state sync"

Sorry if there are sintax error, take that as a pseudocode, since Im currentry in the smartphone.

There might be a way to do that with the current version of colyseus, but I wasn't able to find it.

My best try was, to set 2 position attributes, one marked as "type" and not the other, so I can schedule manually the synchronization, but it becomes a mess quickly.

Some examples for games that don't need every update from the position of the player I can think of: Old School Runescape / Rucoy online (the server sends the calculated path but not every change of the player position) (well, I am almost sure)

Thanks in advance!

posted in Questions & Help • 29 Jan 2023, 15:32

© 2023 Endel Dreyer