Git Product home page Git Product logo

Comments (4)

grayside avatar grayside commented on September 4, 2024

Alternately, if the server says "p1 hit p2 for the nth time" then the client-side JS can use p1:p2:nth to determine the text. Dunno which is better, just saying.

from ninjanode.

techninja avatar techninja commented on September 4, 2024

That is actually how it works currently! A system message comes in and gives source, target type of events, also includes type of weapon involved. Client side then renders the message into text and posts it. The whole reason I would change this to serverside, is to keep it random, AND have a separation of the two systems. If random from the serverside, it would have to know how many different messages there were. If random from clientside, users might all see different messages. Kinda sounds like I need to make it rendered server side just to keep the division clean: clients simply output system messages as they come in.

from ninjanode.

grayside avatar grayside commented on September 4, 2024

Where that best fits I don't have an opinion. I'm just saying that you could have a simple rotation and just use a msgid to increment across it.

Serverside is good though because you could expose the play-by-play via a readonly client

from ninjanode.

techninja avatar techninja commented on September 4, 2024

Yep, agree there. I think the whole reason I moved it client-side was because It doesn't require a server restart to see changes ;)

from ninjanode.

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.