• Announcements

    • Brentonator

      Forum Rules (Please Read)

      Hello everyone and welcome to the No More Room In Hell Forums! We greatly appreciate your interest and support. Please feel free to begin post and become a part of this community. But please make sure that you read and understand the following rules so things can stay as clean and as orderly as possible around here. These rules are expected to be follow by any and all members at all times. Disobeying these rules will result in disciplinary action by a moderator. #1. Off color remarks are acceptable but can be deemed inappropriate at the discretion of the moderators. #2. Flaming and disrespecting other members of this community or this mod is strictly prohibited. #3. Please do not post links relating to warez or illegal downloading. #4. No offensive content is to be posted (gore, dead babies, porn). #5. Please do not spam topics to increase your post count. #6. No excessively large signatures. Signatures that violate this will be modified. #7. Signatures are not to be used as a spamming tool. If your signature's sole purpose is to annoy or distract other members, it will be removed. #8. Please do your part to be as friendly, respectful, and helpful to anyone and everyone on this forum. #9. Your posts may be removed at any time at our sole discretion. #10. Remember the terms of your registration...a copy is posted below but may not represent the latest version of our terms of use. #11. No advertising other communities or products. Have fun.
Sign in to follow this  
Followers 0
backwards

NPC Lag Compensation

6 posts in this topic

Okay I've played this game throughout it's development and I've loved it. The only reason I take breaks is because there is no lag compensation on the zombies. You spend so much time collecting guns with little ammo but when you shoot all your bullets and hit them in the head every time and the zombie is still alive... it makes me just quit the game and uninstall. waiting to play again a month or 2 later looking for a lag compensation added to the game. I understand the reason why you say there is none but lets face it, it ruins the game for skill based players... I would suggest to add an option for server owners to enable lag compensation if they spend enough money on a powerful dedicated server that can handle it. The better idea in my honest opinion if lag compensation is taking too much resources, why not let the client submit that they've killed the npcs and send the data to the server to process. I know it's not the best idea only because of hackers, but since it's a co-op game i don't see a big issue with it. if there's a hacker there will be an anticheat to detect this kind of stuff and ban them after they kill 15 zombies within 2 seconds. I think this will increase the popularity of the game drastically. also i noticed all entities are rendered and sent to the clients even if they're not within your view and are way across the map behind 3 walls... This is really bad for clients fps and network usage.. I've had 10 years of experience developing for the source engine.. I would hope you would take this into consideration and set is as a high priority. Thanks for listening and great work on the game so far!!

Share this post


Link to post
Share on other sites

NPC network transfer in source is based on PVS (Potentially visible set) not whether it's actually visible. If the zombie is behind 3 walls but is not entirely separated (so if there's space above all 3 walls and no roof above the zombie) it'll still get networked.

As for lag compensation, it's really really expensive for the amount of zombies we have alive at once. We haven't really found a good way to do it yet but are definitely on the lookout for solutions.

Share this post


Link to post
Share on other sites

Yes PVS is the correct term for it my bad. I understand that it's expensive, I don't understand why though. Modern servers should be able to handle looping through 128 zombies or so within 1 tick, 33 or 66 ticks a second.. all you have to do is store them in an array of position/viewangles/animationframe for the highest players latency in ticks. When you receive a bullet_fired event then you'd go back X ticks (TIME_TO_TICKS(PlayerLatency)) to where all the npcs were. Based off the position/angles/animationFrame you can calculate where the hitboxs were to do collision with a raytrace system. Storing 2 3d Vectors and possibly 2 ints for 66 - 100 * buffer is nothing, and shouldn't be a hit on the servers performance at all.. You can even do a very basic occlusion system based off of the bounding boxs size. 3d distance check from the center to see if the raytrace point is close enough to the entity to even be within its bounding box before you worry about creating the hitboxs for these zombies, then you'd virtually only be drawing out maybe 5 - 10 hitboxs max per raytrace which happens once everytime someone fires a bullet. That simple check would increase the performance tremendously.. Yes I'm sorry for my grammar and inconsistent sentences. I've been up all night working. I think letting the clients register the hits to the server is the best idea since it's a co-op game though, would make the experience much more pleasant. thanks

Share this post


Link to post
Share on other sites

That's exactly how it's done in source.. And it's more expensive than you think. While it's tightly looping through every single zombie to back it up, retracing, and resetting every time a player fires a shot or does a frame of melee trace, it's not updating the clients at all causing a large amount of choking when trying to catch up. Believe me, we've tried, it's just too expensive to do it that way with the number of zombies we have alive at once

Share this post


Link to post
Share on other sites

you could spawn this process on a secondary thread and keep the clients updated on the rest of the games processing movements, the npc deaths would be slightly delayed but that's a small price to pay. What's wrong with letting the clients register the hits? They're already doing raytraces for blood decals if i remember correctly? Besides the cheaters, you could make a very basic anticheat to randomly do checks to see if the npc that was registered as a hit was even visible or some other basic stuff to see if the clients submitting bad hit registry's. which wouldn't matter too much anyhow since its co-op? Since it's all too expensive for the server to process i seriously would be looking into the client doing it.

Share this post


Link to post
Share on other sites

Keep in mind the SRCDS server software only runs on one core and a lot of people are still using older L5420s processors because they are cheap.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0