fabin Posted October 22 Share Posted October 22 sorry if this has been asked one starvillion times, but what's the deal with attacking with no lag comp? i can usually play fine with the 0.1ms movement delay or whatever, but what really pisses me off is when my character decides to take an eternity (half a second) to ponder whether they should attack the target that i'm trying to attack, to then me getting my ass kicked because just now i started walking torwards the target i was trying to attack. i just kinda resorted to spamming my attack key to sort of force my character to attack stuff what's the technical limitation here that causes this, if there is any? could it be fixed in the coming months/years? this stuff is so weird 3 Link to comment Share on other sites More sharing options...
mykenception Posted October 22 Share Posted October 22 5 hours ago, fabin said: sorry if this has been asked one starvillion times, but what's the deal with attacking with no lag comp? i can usually play fine with the 0.1ms movement delay or whatever, but what really pisses me off is when my character decides to take an eternity (half a second) to ponder whether they should attack the target that i'm trying to attack, to then me getting my ass kicked because just now i started walking torwards the target i was trying to attack. i just kinda resorted to spamming my attack key to sort of force my character to attack stuff what's the technical limitation here that causes this, if there is any? could it be fixed in the coming months/years? this stuff is so weird turning lag compensation off shows the real movement and response of your character to your inputs, if its super wonky then your ping on that server must be bad or your device is old can can't handle DST anymore. If you turn on lag comp on it'll make your character's movement feel smoother but its just a visual thing, your character is still rubberbanding to your past inputs I suggest trying to connect on a server with better ping, tho you can never remove input delay if you're not the host. Or try Don't Starve Alone mod when youre playing solo. Sure it has it's own bugs but it really removes all the problems about input delays and makes your solo gameplay so much better 1 Link to comment Share on other sites More sharing options...
grm9 Posted October 23 Share Posted October 23 7 hours ago, mykenception said: if its super wonky then your ping on that server must be bad I've had the character walk up to the enemy and just stay in place for half a second instead of attacking when reaching it even on servers with <100 ping. The walkup was caused by pressing the attack key and the character walking up on it's own without movement keys, so there shouldn't have been as much delay and it only happens occasionally. 8 hours ago, mykenception said: your device is old can can't handle DST anymore That's the least likely scenario because even a 10 years old PC can run DST in 50-60 fps depending on how much stuff is on the screen when playing with Don't Starve Alone or on someone else's server. Link to comment Share on other sites More sharing options...
maradyne Posted October 23 Share Posted October 23 (edited) Simplifying heavily. First: server-side (real) player positioning is based on signals sent from the Client (your game) to the Server (the host machine). Lag Comp Off shows you what the Server sees, and takes as long as the two-way connection takes to catch up. Lag Comp On shows you what your inputs 'should' do according to what you see and what you pressed, and then the game will try and correct your 'actual' movement and other stuff to match. Emphasis on try. There are limits on what the server considers 'legal' movements or actions. Most multiplayer games have some version of this Lag Compensation and verification of allowed actions built in. Actions like attacking often have a range at which they can be attempted (by the client), and another, slightly longer range at which they can succeed (on the server). Example: Lag Comp On, you attempt to act on the thing you're standing next to, so your client sends the attempt to the server. Server-side, your character is a bit farther away...but still within the success range, so you succeed! Or you're just barely out of success range, your character swings, but doesn't hit, but your movement is freed up so it doesn't matter that much. Sometimes you'll also swing an attack while standing right next to the enemy, but not hit, because server side you weren't actually next to the enemy yet. But with Lag Comp Off and the slightest amount of lag, in that same scenario, by the time you're in range to input the attack, the target has moved just slightly, so you're no longer in range to even 'attempt', so your character jitters along because attacking something you're not in range to attack sends a movement command to just barely inside of the attack range. Repeat jitter until you're actually in range. That's all to say that, basically, if you turn off Lag Compensation...the game no longer compensates for lag! If you need to play with it turned off for some reason, get slightly farther in-range before trying to attack anything. That gives an extra moment for your input to go through. You can also do this with Lag Comp On to get less ghost swings. Edited October 23 by maradyne 1 2 Link to comment Share on other sites More sharing options...
prettynuggets Posted October 23 Share Posted October 23 1 hour ago, grm9 said: <100 ping the lag is not noticeable if u play 0 to ±30 ping but above that u might get some slight delayed action. even at 100 ping u have green connection bar but its still have noticeable delay. Link to comment Share on other sites More sharing options...
grm9 Posted October 23 Share Posted October 23 19 minutes ago, prettynuggets said: the lag is not noticeable if u play 0 to ±30 ping but above that u might get some slight delayed action. even at 100 ping u have green connection bar but its still have noticeable delay. I know, it just was weird that attacking sometimes simply didn't happen unlike walking, sometimes even on 70 ping iirc. Link to comment Share on other sites More sharing options...
Frosty_Mentos Posted October 23 Share Posted October 23 I assume that the actions you do with comp on are actions made in the future. Should perhaps mobs also lag and move with you? As an example Crypt of the necrodancer has now a multiplayer dlc and it has mobs that react to the closest player and their beat, every turn they do is a turn for that mob too. If another player gets close they take over or have to adjust to their movement and beat. Unless there's a limitation in the engine for it then I dunno. There's barely any solution to solve this problem. But this case with ND game could be a way to deal with it. Klei is publishing BYG right now so talks with ND Synchrony dlc team might be a big opportunity to check this out. Link to comment Share on other sites More sharing options...
maradyne Posted October 26 Share Posted October 26 (edited) On 10/23/2023 at 6:00 AM, Frosty_Mentos said: Unless there's a limitation in the engine for it then I dunno. There's barely any solution to solve this problem. It isn't...entirely an engine issue. You could quite easily increase success ranges, and otherwise make clients' actions further influence conditions on the server. (There was actually an 'infinite' range bug with a special attack recently in a certain mod because there just happened to not be a range check when pushing an attack via the code used for controllers.) The reason games don't always give clients control is because of...differing views on how host control vs client control should be handled, and how we know that goes based on gaming history. Halo Infinite makes a good example here: people get shot from around corners, when the attacker isn't even in line of sight, because on the attacker's end the defender was visible at the time they took the shot. Getting shot by someone you can't see doesn't feel good, but they decided that missing shots you know you hit felt worse. DST leaves most decisions in the hands of the host, leaving clients to just 'send their intent', in terms of how they want their representation on the server to act. This prevents players from doing wacky hacky stuff, unless the host is doing it, in which case...players can just leave. This approach...was the default approach for a long time. And still is in the case of player-hosted games. Most games now that allow more client 'influence' don't really. They tend to operate exclusively on official servers, where tons of server-side recording and verification can be done in the microseconds before an action is permitted without melting anyone's PC. Infinite and League come to mind; even with anticheat stuff in place, there's still a lot of work put into managing how clients can and can't interact with the server. Necrodancer apparently uses something that...has the same issues in a public server setting as chaotic as DST's is. DST, of course, is 99% a player-hosted game. Meaning...it's complicated, even if you're not considering the required dev-time for alternate solutions. A bunch of old RTS games had the option for hosts to turn on cheats. Sometimes people would try games like that for fun. Half of them would end within a few seconds with someone typing the 'instant win' cheat. If you were to allow clients more control in DST, public servers would likely go a similar direction, in proportion to how much control they're given. Add enough checks to prevent things like cross-map attacking or mob teleportation, while also allowing for attacks and teleportation in the right circumstances? Hardware requirements go up. A lot of DST hosts already melt as-is, so people would be unhappy. Klei already tried hosting people's playsession servers in the past with the Forge; they said it's not viable. Adding way more intensive software to that to make sure people are behaving...doubly so. Really...much as it pains me, I think DST's Lag Comp is the best solution we're going to get for this kind of game. The potential replacements have so much that can go wrong with them. That's not to say that it can't be improved. I'd like to see a bunch of small tweaks coupled with testing, and some more mod compat. Normally, this is where I might say that this would be a problem because of backwards compatibility with mods and the like, because tweaks to something so central are bound to break stuff... But to be frank, Lag Comp is already a roadblock for modding. Maybe uprooting what we've got and going forward with something better wouldn't be the worst thing. sorry for the text wall but i love thinking about the workings of stuff like this lol Edited October 26 by maradyne 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now