Giter Site home page Giter Site logo

Comments (9)

AeonLucid avatar AeonLucid commented on May 22, 2024 3

@Mm2PL this will lead to desync, it will only work for specific type of events like chatting. For cancelling other events (such as venting) we would need to send the inverse of that event (going out of the vent). Because client's do not verify their action with the server before doing it.

from impostor.

stale avatar stale commented on May 22, 2024 3

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

from impostor.

ErikDombi avatar ErikDombi commented on May 22, 2024 2

I don't think event cancelling should be limited to just chat events. Ideally all events would be cancellable.

from impostor.

danbudworthmead avatar danbudworthmead commented on May 22, 2024 2

@danbudworthmead I won't be merging that if you PR it. Reason for that is that there can be another GameData message after the GameData event you are canceling. You are returning, effectively canceling everything in that stream.

Aha dw not planning to PR. Just thought it might be useful in this thread if someone's looking to do something similar.

from impostor.

Mm2PL avatar Mm2PL commented on May 22, 2024

Due to how events work, this should be doable on every type of event.

I think
  1. Receive packet from client
  2. Decode packet
  3. Fire off appropriate events
  4. Forward packet to other clients

The fourth step can be ignored if the event was canceled, and other players won't see the thing happen.
E: not exactly true

from impostor.

ErikDombi avatar ErikDombi commented on May 22, 2024

Could this lead to possible desync?

from impostor.

Mm2PL avatar Mm2PL commented on May 22, 2024

Could this lead to possible desync?

🤔 Probably on some events.

from impostor.

danbudworthmead avatar danbudworthmead commented on May 22, 2024

I've been messing around with blocking packets.
Here's an example of blocking chat packets beginning with "/"

danbudworthmead@e032c0d

from impostor.

AeonLucid avatar AeonLucid commented on May 22, 2024

@danbudworthmead I won't be merging that if you PR it. Reason for that is that there can be another GameData message after the GameData event you are canceling. You are returning, effectively canceling everything in that stream.

from impostor.

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.