Flayra: Server Optimization Trick...maybe.

Green_MeatGreen_Meat Join Date: 2002-11-06 Member: 7331Members
<div class="IPBDescription">Check me if I'm wrong....</div> It occured to me while building some DCs that they were all on their own cycles. They all pulse and give life at different times depending on when they were completed. The same goes for resource towers and sentry guns I think. What if you consolidated their cycles into one routine that would update them all at once, instead of tracking the process of each one. Could this possibly lighten the load on the servers a little? Is this already being done, and your master skills have made it seem otherwise?

*Disclaimer: I know absolutely jack-$hit about coding and to me you are a Tech God, so if you stike me down with a lightning bolt while laughing "HA HA HA! Puny mortal!" I'll completely understand.

If by some miracle, it IS a help, AND you haven't thought of it already, AND it isn't impossible to do without completely rebuilding the code (any Professional Vegas Gamblers out there?), then the backstory would be simple: The Hives pulse in unison and feed the bacteria out to the DCs in waves. Same could be said about RTs also. The Nanobots are created and released in batches, thus all of the RTs pulse in unison. The sentry guns aren't atonomous and rely on the Turret Factory which is plugged into the grid, so you say they are all linked into the nano-grid and thats why they are all syncronized.


One last comment:

BEST. GAME. EVER.

Big Thanks to you and your team for building a masterpice.
Gun_Sgt_Hartman

"'Bow, kneel, KNEEL!' It's all ever get from you people. You come to me with nothing, and I give you Superman." - Lex Luthor
"Why do you speak to me this way, when you know I will kill you for it?" - Gen. Zod

Comments

  • NecroNecro &lt;insert non-birthday-related title here&gt; Join Date: 2002-08-09 Member: 1118Members
    <!--QuoteBegin--Gun_Sgt_Hartman+Nov 14 2002, 11:23 PM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Gun_Sgt_Hartman @ Nov 14 2002, 11:23 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->

    *Disclaimer: I know absolutely jack-$hit about coding and to me you are a Tech God, so if you stike me down with a lightning bolt while laughing "HA HA HA! Puny mortal!" I'll completely understand.

    BEST. GAME. EVER.
    <!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
    amen. flay is god!

    i wonder what he has to say about this?
  • Green_MeatGreen_Meat Join Date: 2002-11-06 Member: 7331Members
    edited November 2002
    Actually, I'm more interested in what he has to say about the REST of my post <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html/emoticons/biggrin.gif' border='0' valign='absmiddle' alt='biggrin.gif'><!--endemo-->

    His status as a God is kind of a given at this point.

    GSH

    "Ray! If someone asks you if your a God, YOU SAY YES!" - Winston Zedimore
  • ComproxComprox *chortle* Canada Join Date: 2002-01-23 Member: 7Members, Super Administrators, Forum Admins, NS1 Playtester, NS2 Developer, Constellation, NS2 Playtester, Reinforced - Shadow, WC 2013 - Silver, Subnautica Developer, Subnautica Playtester, Pistachionauts
    I am 99% sure that the animations of the models are done client side. So once it is built, and your computer is told is hs been built,it chooses random animation times on the client side. to the guy net to you, the pulses may be happening at totally different times <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' valign='absmiddle' alt='smile.gif'><!--endemo-->
  • GoleXGoleX Join Date: 2002-11-07 Member: 7681Members
    Thats a little worrying to me, as I can see the oppurtunity for that to be hacked pretty easy client-side for uber healing def chambers etc.

    I am pretty sure the operation of the entities is server side, while the animation etc. is of course client side.
  • Green_MeatGreen_Meat Join Date: 2002-11-06 Member: 7331Members
    Yea, the actual effects of the entities would have to be server side, because their results are given to all clients, just like bullets, sounds, and stuff. Understood about the animations though.

    GSH

    "Now, don't you know that when a flashlight hits the ground, it makes a completely different sound than a revolver? Now, do exactly as I say, before I pull this trigger and change the way you feel about me." - Keith David
  • MerciorMercior Join Date: 2002-11-02 Member: 4019Members, Reinforced - Shadow
    Each chambers "pulse" will be controlled by the server, and from the way they work I'm guessing that each chamber has its own thread in code - so they all work independantly.

    Changing this to a system where they all pulse at the same time should be relatively easy but doesnt offer any particular performance gain unfortunately <!--emo&:(--><img src='http://www.unknownworlds.com/forums/html/emoticons/sad.gif' border='0' valign='absmiddle' alt='sad.gif'><!--endemo--> - it wont actually reduce the number of operations performed, just change it so they are all performed at the same time - presuming that it works how I think it does that is...
  • NecroNecro &lt;insert non-birthday-related title here&gt; Join Date: 2002-08-09 Member: 1118Members
    hmm, i doubt this really affects cpu usage...unless their entities and as flayra said, entities are whats causing it.
  • MerciorMercior Join Date: 2002-11-02 Member: 4019Members, Reinforced - Shadow
    Of course they're entities!

    The problem is that there is the potential for an almost unlimited amount of entities on each level - each building you make is a new entity with its own thread (A thread is code that will run for each instance of the object, independantly to the main code). This is why you may have noticed that pings get higher and higher through the game as more buildings are built.
  • NarfwakNarfwak Join Date: 2002-11-02 Member: 5258Members, Super Administrators, Forum Admins, NS1 Playtester, Playtest Lead, Forum Moderators, Constellation, NS2 Playtester, Squad Five Blue, Reinforced - Supporter, Reinforced - Silver, Reinforced - Gold, Reinforced - Diamond, Reinforced - Shadow, Subnautica PT Lead, NS2 Community Developer
    Heh, from what I know about coding (very, very little, I assure you), threading is a pain in the **obscenity**. Royally. But it is effective.

    So who knows if it is causing the CPU to be used more; I myself kinda doubt it.
  • LiquidFusionLiquidFusion Join Date: 2002-11-01 Member: 3139Members
    multi threading is a pain to code (this is why devlopers always complain about the pos2) Multi threading, i think, would have to be done at the engine level, which means thats up to valve. The real problem there is not many people here have dual cpus.
  • FlayraFlayra Game Director, Unknown Worlds Entertainment San Francisco Join Date: 2002-01-22 Member: 3Super Administrators, NS2 Developer, Subnautica Developer
    This could help, but it's probably not as important as some other CPU issues right now. I could revisit this later if I found it to be a bottleneck though.
  • cracker_jackmaccracker_jackmac Join Date: 2002-11-04 Member: 6891Members, Constellation, Reinforced - Shadow
    <!--QuoteBegin--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->The real problem there is not many people here have dual cpus.<!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->

    HLDS and HLDS_l don't support SMP
  • Green_MeatGreen_Meat Join Date: 2002-11-06 Member: 7331Members
    Roger That! Moving to waypoint!

    GSH

    "Dude, it's just a game." - Anonimous NS_Player
    "I know, people keep telling me that." - Me


    "Don't just stand there gawking like you ain't ever seen the hand of God before!" - Sgt. Major (Monty Pythons - The Meaning of Life)
  • NecroNecro &lt;insert non-birthday-related title here&gt; Join Date: 2002-08-09 Member: 1118Members
    <!--QuoteBegin--Flayra+Nov 15 2002, 02:50 PM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Flayra @ Nov 15 2002, 02:50 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->This could help, but it's probably not as important as some other CPU issues right now. I could revisit this later if I found it to be a bottleneck though.<!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
    yay, but if u say it's not a big thing, we trust yooooooo!
Sign In or Register to comment.