GithubHelp home page GithubHelp logo

Comments (2)

BranDougherty avatar BranDougherty commented on July 30, 2024
  • Lobby registration is not working right now but the current design is to send a registration HTTP request every minute, based on tick counter. It can probably just be pulled out of the loop and ran based on GetTickCount64 calls.
  • Scripts would not be able to run any code for the whole time the server is idle, we should probably add an OnIdle event.
  • Most server owners will want this, so it should be default behavior. But maybe some people will get creative with scripts and want to keep the server running, it should be configurable.
  • Maybe the Steam RunManualCallbacks code needs to be pulled out as well? Would need to look into that.

In general supporting this feature in this way means:

  • Splitting out code which interacts with external systems in a time sensitive fashion
  • Being more thoughtful about how we measure time (seconds vs ticks).

So there is a decent amount to consider in supporting this feature, and implementing it would require some care around the way time is handled in the game. But right now those actually sound like good structural changes to make anyways, and of course it would be great for server owners. So +1 from me.

from opensoldat.

DeathByDenim avatar DeathByDenim commented on July 30, 2024
  • Oh, I see. The lobby update is in UpdateFrame. Right, so it seems to be only called when BulletTimeTimer < 1 which I guess is almost always true expect for a very short time after a Sprite dies? Like 30 ticks as far as I can tell. I'm guessing that's not too important for the lobby update and doing the Lobby update can be pulled out like you said.
  • True, scripts will pause as well which I figured was a good thing.
  • I definitely see your point though! Like you say, some people will get creative. Adding a new CVar like sv_pause_on_idle or something could be a new option to keep the server running without players. Would you still need that new OnIdle event in that case?
  • Yeah, I wasn't sure about Steam. It doesn't look like it needs to be called every tick at first glance except maybe SteamAPI_ManualDispatch_RunFrame, though from what little I could find about that from a quick search, it seems recommended run call this >10Hz to avoid delays with Steam notifications. Then again, how many notifications can there be for an idle server?

Anyway, I'll tinker some with that this weekend and see what else I can find.

from opensoldat.

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.