Giter VIP home page Giter VIP logo

Comments (7)

Keevle avatar Keevle commented on July 18, 2024 1

amazing

from thnk.

arthuro555 avatar arthuro555 commented on July 18, 2024 1

Quite true! It is already planned to add a special behavior that synchronizes the platformer/top down movement behavior, in a way that:

  • These conditions function
  • The client can make accurate movement predictions in frames where it does not get a server update
  • You can just use "simulate key press" on the client and it'll automatically send messages to the server to simulate these inputs correctly there, without writing any events on your side
  • Automatically restore the object to the position & configuration it was in the moment the player did a key press (to not cause an unfair behavior if e.g. a jump that was done just in time before falling in a hole is only received by the server after it is too late due to network latency) (this one is quite complex and might require some additional time before being implemented)

:)

Track progress for this at #6

from thnk.

Keevle avatar Keevle commented on July 18, 2024

This should not just be a "send all and done",I think the Sync should only sync variables if changes occurLike if a users moving constantly only Position and angle are more likely to change so no sense in also syncing opacity and scale etc

from thnk.

arthuro555 avatar arthuro555 commented on July 18, 2024

That's already the case :) A full snapshot is only being sent to a client when it first connects, but afterwards only diffs are sent which only contain values that have changed.

See: https://github.com/arthuro555/THNK/blob/master/code/server/ObjectDiffer.ts#L28-L83

from thnk.

MyNameIsRinax avatar MyNameIsRinax commented on July 18, 2024

You forgor to add object flip horizontally and vertically!!!

from thnk.

Entr0py404 avatar Entr0py404 commented on July 18, 2024

Object tint please ;)

from thnk.

Yggddrassill avatar Yggddrassill commented on July 18, 2024

The Player Behaviors (not really) but the "Is Jumping" "Is Falling" and such, it doesn't need to sync the action because the position is already on sync, but the notion of the action taking place, that would make it easier to animate using the spritesheet animation.

from thnk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.