cpu hungry servers

Discussion in 'Game Play' started by Miss Mary, Jul 24, 2006.

  1. Krenzo

    Krenzo Administrator

    Messages:
    3,771
    Likes Received:
    0
    Trophy Points:
    0
    Entities are dynamic objects not apart of the map. Players are entities. Tanks are entities. Props in a level are not entities. Engineer buildable parts of levels are entities. Usually, entities get sent over the network to update their status with everyone else. The engine has to check each one per frame to see if it has changed and needs to be sent over the network. Regular source mods don't have very many other than the players. We have lots. I had a theory that it might be better to combine multiple entities into one.
     
  2. MOOtant

    MOOtant Member

    Messages:
    4,047
    Likes Received:
    0
    Trophy Points:
    0
    Not sure if it isn't done already: if we have lots of entities there should be a way not to send all updates to specific client (even if entities state changed) when entities aren't visible at all.

    NS doesn't have vehicles but they have lots of entities I think. Maybe they solved some of those problems.

    Valve & NS devs look like only people that might now something about it.
     
  3. Solokiller

    Solokiller Member

    Messages:
    4,861
    Likes Received:
    7
    Trophy Points:
    0
    VALVe only released the source engine source code to Garry from garry's mod, so unless this mod gets really good i'd doubt it if you would ever get your hands on the source code.
     
  4. BoF

    BoF Member

    Messages:
    72
    Likes Received:
    0
    Trophy Points:
    0
    Generally, even if you do run a highly optimized server hardware, you still would have to account for not just only the number of entities that are constantly spawned and moving at the same time in one big map game. The Source engine is still limited to allowing a megaverse size game online. Speculating purely, maps like Escort or District402 are pretty fine while running under all the connections that are constantly streaming into the server network. However, when we get to big maps like Isles or Valley; its pure tick chaos as the server machine has to keep record of everything while drawing everything in detail. Another thing is that HL2 was not intended to fully utilize daul-cores yet. Hopefully when Episode 2 comes out, Valve would be able to address that problem as the majority of time spent playing in those levels would be outside in open forests.
     
  5. Miss Mary

    Miss Mary Member

    Messages:
    98
    Likes Received:
    0
    Trophy Points:
    0
    the source code was released illegally over the net before the actual game was released, so i dunno where u heard that from
     
  6. MOOtant

    MOOtant Member

    Messages:
    4,047
    Likes Received:
    0
    Trophy Points:
    0
    I think that you try to say that completely random visleafs (made when using displacements) make server send everything to everything. Valve won't make server part multi-threaded just because of EP2. Especially when they DON'T need it for EP2. Maybe displacements will work as world brushes? No idea.

    Single player game != Multi player game.

    Miss_Mary: Garry's Mod has some kind of agreement with Valve (it will be distributed on steam). If code will be accessible to them then only legally. It's also not only about access to code but possibility to modify it, recompile and make your game use it.
     
  7. Krenzo

    Krenzo Administrator

    Messages:
    3,771
    Likes Received:
    0
    Trophy Points:
    0
    Oh I coded in extra stuff to not send you entity updates for stuff that isn't close to you on large maps. The problem is not the actual sending of network data. It appears to be just checking everything if it needs to be sent that takes awhile.

    I definitely need to do another round of testing on a decent server. Official starts to lag and skew the results before I even start placing lots of buildings when testing.
     
  8. Miss Mary

    Miss Mary Member

    Messages:
    98
    Likes Received:
    0
    Trophy Points:
    0
    your more than welcome to try ours
    you can spawn as many buildings vehicles as u want that doesnt lag the server
    it only lags when its full of players
    pm me and i can sort it for you
     
  9. =GK= Minako

    =GK= Minako Member

    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    0
    Lol I just sent a PM to him saying the exact same thing. It wasn't posted when I sent, and now poof it's here. Lal.
     
  10. Miss Mary

    Miss Mary Member

    Messages:
    98
    Likes Received:
    0
    Trophy Points:
    0
    great minds think alike stavvie
    but i was playing empires so...
     
  11. dumpster_fox

    dumpster_fox Member

    Messages:
    1,716
    Likes Received:
    0
    Trophy Points:
    0
    The Source code that was leaked is now completely out of date. It wouldn't really help Krenzo much at this point.

    Garry Newman has full access to the engine source code because Gmod is going to be sold on Steam. Normally, the licensing fee is something like 10k, but Valve just decided to give it to him. An additional thought is that in a normal deal, should a developer decide to use Steam as distribution and use the Source engine, all of the profit from sales on Steam goes straight into their pockets. I wonder if Garry is getting in on that deal.
     
  12. MOOtant

    MOOtant Member

    Messages:
    4,047
    Likes Received:
    0
    Trophy Points:
    0
    So the complexity is O(players*entities_count)? What do you mean by "checking everything if it needs to be sent"? The check is just measuring distance or something else/more? This needs testing on good hardware (thx GK :P)
     
  13. PJB

    PJB Member

    Messages:
    100
    Likes Received:
    0
    Trophy Points:
    0
    Garry is selling the next verstion of Gmod Via steam, for this reason he's technicaly developing a game FOR steam, and just like the ship (for example) he has acess to the engines sorce code due to the fact that he is a contact bound game developer. meanwhile mod teams are fexx0red as we arent...
    though i have to say, even in it's early stages empires looks more than good enough to be sold!
     
  14. Ancient Core Lobster

    Ancient Core Lobster Member

    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    0
    4000+ does not mean 4 GHz and two cores does not mean twice as fast.
     
  15. thaile

    thaile Member

    Messages:
    307
    Likes Received:
    0
    Trophy Points:
    0
    I think she means

    2ghz + 2ghz + 2ghz + 2ghz = 8ghz

    2 dual core 4000+ opterons.
     
  16. Niarbeht

    Niarbeht Member

    Messages:
    2,010
    Likes Received:
    0
    Trophy Points:
    0
    The speeds don't add.

    Nor do they multiply.

    They work in parallel, on different things. If you program a program to use them all, then it will, but otherwise it'll only use one.
     
  17. ViroMan

    ViroMan Black Hole (*sniff*) Bully

    Messages:
    8,382
    Likes Received:
    4
    Trophy Points:
    0
    Niarbeht is correct.

    Even if a program had multiple threads they would still run on one CPU unless directed to do otherwise by a thread handler that detects the fact that you have more then one CPU and can detect that the thread is "safe".

    ("Safe" meaning it has functions that lock portions of memory so that other threads from the same program don't modify data when that thread is trying to do the same thing. Meaning that the memory they need to access that is shared has to be locked for the time period that is needed to do what ever needs to be done then unlocked. while that memory is locked... anything that needs to access that memory is put on hold till it receives the unlocked signal.)

    ("thread" BTW is like a sub program in a program. It has its own sets of memory and code. They can share some memory with the "host" , "main thread", or with other threads. Each "thread" is treated as another program by a CPU that is multi tasking capable basically, anything above a 386 and even one more before that.[I think. My history is a bit rusty])

    Thread managing software or a function in a program would manage the threads by spreading them out to the other CPUs. Putting more threads on the CPUs with more free cycles. Of course there is some overhead as some cycles are lost in total do to the fact that threads must be constantly checked and moved from one CPU to another as demands vary but overall it its much faster. (think of it as 4 people mowing the same lawn. Gets done ALOT faster but there is some overhead as they will likely get in each others way and they need to know the status of the other persons where abouts)

    This does not mean that they add up. If I had 4 dual 1ghz CPUs that does not = 8ghz. As MOST programs may have threads they do NOT support multi CPUs and MOST are not safe(In the terms that are dictated under programing standards). Any program you start is likely to end up on the first CPU. Unless you use one of the CPU tools(I forget which one. Perhaps even they have made XP smart enough now to do so by itself.[wasn't originally])

    End rant on simple comment. :o
     
  18. MOOtant

    MOOtant Member

    Messages:
    4,047
    Likes Received:
    0
    Trophy Points:
    0
    You messed it up. Thread safe != thread that can be moved to other CPU.

    Thread is not a subprogram. It has it's own stack but not heap. Most of things are different depending on thread/fiber library/OS.
     
  19. ViroMan

    ViroMan Black Hole (*sniff*) Bully

    Messages:
    8,382
    Likes Received:
    4
    Trophy Points:
    0
    for clerification,
    I said it was "like" a subprogram... not "A" subprogram :p That was to put into there prospective what a thread is.

    And as for the thread safe aspect, you might be right.. its been a long time since the last time I made a threaded program from scratch. I just mostly use dlls now lol.
     
  20. [RTFM]Major_Tom_CosmicBlu

    [RTFM]Major_Tom_CosmicBlu Member

    Messages:
    320
    Likes Received:
    0
    Trophy Points:
    0
    Perhaps it helps to set down the maximum number of players.
     

Share This Page