Git Product home page Git Product logo

Comments (3)

mrh0 avatar mrh0 commented on August 25, 2024

Yeah, I Agree, the reason the multimeter prints in chat and why the Goggles don't show charge is because of network syncing and limitations of the Goggles. The Goggles isn't coded to sync every tick, it just reads whatever data is already on the client. This means that the server would need to figure out when a player is looking at a block then sync that data.

from createaddition.

T3sT3ro avatar T3sT3ro commented on August 25, 2024

I think that it could be made using simple probing mechanism on the client - for example every x ticks/seconds, whenever player is looking at a block that has FE support he sends a probe to the server requesting measurement start. He will send those requests in some specified intervals for example once every half a second.

On the other side whenever server receives a request to measure specific block, it creates a Measurement object and stores it's value in some map with <block coords, Measurement> (block cords or some other method of identification). Measurement could be a simple object containing last reading, watchdog timer and a list of subscribers to notify. Each time a request for block measurement comes, a watchdog is reset and current measurement is returned. When watchdog reaches 0 the <block, measurement> pair is removed from map. Watchdog should have bigger timeout than frequency of client sending probes, to prevent constant allocations in realistic scenario. From the rough sketch of that it's easy to see, that measurements map could be shared globally among players and reused - the only thing that changes dynamically is a subscriber list for measurement.

Additionally if by any chance googles could utilize the animation from "ponder" mechanic (with the bar filling up), we could play this animation with frequency of player's probing.

from createaddition.

mrh0 avatar mrh0 commented on August 25, 2024

The goggles now do this in 20210625a.

from createaddition.

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.