Forum

> > CS2D > General > LUA Lag Compensation
Forums overviewCS2D overviewGeneral overviewLog in to reply

English LUA Lag Compensation

45 replies
Page
To the start Previous 1 2 3 Next To the start

old closed LUA Lag Compensation

FlooD
GAME BANNED Off Offline

Quote
----description:
lag compensation eliminates the need of players with high latencies to "lead shots" (a.k.a. "do ping calculations") to consistently hit enemies. this allows for significantly fairer gameplay for players with moderate (100ms - 300ms) latencies.

according to the documentation of cs2d 0118, lag compensation is supposed to be implemented. however, for unknown reasons, it does not work at all. therefore, i have created this script so that cs2d can have working lag compensation.

how it works -
1. store every player's position over the previous 25 frames in a buffer.
2. disable cs2d's hit detection for almost all weapons. (HEs are processed normally)
3. for every attack, calculate hits using locations from a previous frame (which is determined by latency) to determine whether a hit should count. (i.e. lag compensation)

by modifying this script, it is possible to do things such as larger/smaller hitboxes, "headshots" (higher damage if bullet hits a small head hitbox), circular "hitboxes," etc...

from what i know, for general usage such as in public servers, the script does not have any noticeable effects on performance. deathmatch with 32 bots locked to one tile using m249s and with mp_damagefactor set to 0 would be interesting to try sometime.

analysis of the effects of lag compensation:
More >


----download:
version 0.6 (view online)<< latest stable

previous versions:


----servers with lag comp:
[Fl@me] Aim: 206.217.212.32:36963
[Fl@me] Mix: 206.217.212.32:36962 (password - match)
all Die Kebäbse servers

----changelog:

version 0.6
-fixed friendlyfire issues
-ping spikes smoothed out for the amount of time compensated.
-press f2 to get your current "smoothed" ping.
-press f3 to disable/enable lag compensation for yourself only. (if your own lag comp is disabled, hit sounds should work.)
-bomb explosions, slaps, etc... take effect now.
-lame attempt at organizing code

More >

----todo list:
-[hard/impossible] get hit sounds to work somehow.

-[medium] single/double bullet bursts from glock/famas. though this sounds simple, i cannot think of any efficient method to doing it. if only there were player(id, "ammo")...
edited 26×, last 02.12.10 02:23:13 am

old Re: LUA Lag Compensation

DannyDeth
User Off Offline

Quote
Ok, this is pretty cool
Only one thing which I need to moan about: It's Lua, not LUA. Lua is a spanish word meaning 'moon', it is not an abreviation of anything. So you only capitalise the first letter. Other than that everything looks cool, adding headshots will sure make a lot of campers happy

old Re: LUA Lag Compensation

Crazyx
User Off Offline

Quote
DannyDeth has written
Ok, this is pretty cool
Only one thing which I need to moan about: It's Lua, not LUA. Lua is a spanish word meaning 'moon', it is not an abreviation of anything. So you only capitalise the first letter. Other than that everything looks cool, adding headshots will sure make a lot of campers happy

Lua is Portuguese, not Spanish.
In Spanish I think it is 'Luna'.

old Re: LUA Lag Compensation

RAVENOUS
BANNED Off Offline

Quote
Fuck about LUA, Lua, lua or luna, who the fuck cares!?

b2t: Well, it feels like unreal gameplay, I really don't like it... ;/

old Re: LUA Lag Compensation

united
User Off Offline

Quote
At least it makes it fair for similar pings which are still different, for example 20 ping against 90-170.
Good job, it seems to be working fine in the server.

---

Crazyx is right.

old Re: LUA Lag Compensation

kNedLiik
User Off Offline

Quote
I don't see the difference . I played that server with this lag comp but it is more laggy than normal servers for me.sorry.

old Re: LUA Lag Compensation

J4x
User Off Offline

Quote
offtopic

Dany death lua its not a word in spanish the correct word is Luna... ( im from panama here we talk spanish)

ontopic

i never understand whats the function of lag compensation can someone explain me please?

old Re: LUA Lag Compensation

Relapse
User Off Offline

Quote
DannyDeth has written
Ok, this is pretty cool
Only one thing which I need to moan about: It's Lua, not LUA. Lua is a spanish word meaning 'moon', it is not an abreviation of anything. So you only capitalise the first letter. Other than that everything looks cool, adding headshots will sure make a lot of campers happy


I think he capitalized lua to emphasize that this was a scripted lag compensation.

further on, I think this does work in 90 ping.
kNedLink, it does work, you're obviously just blind.

old Re: LUA Lag Compensation

FlooD
GAME BANNED Off Offline

Quote
i have 90-100 ping in that server
and it feels like 0 (i.e. new game)

edit: new version!
edited 1×, last 19.11.10 03:00:50 am

old Re: LUA Lag Compensation

-Skull_
User Off Offline

Quote
Nice job, really really nice.

@FN_Nemesis
The function of lag compensation is that, balance the gameplay. So no more "Ping calculation"

old Re: LUA Lag Compensation

Jermuk
User Off Offline

Quote
Well, I tested it on a m3 map. (On a normal server )
Something is with m3 wrong, because i hitted the others many many times and they still have 100hp.
Did you implemented shotguns?

old Re: LUA Lag Compensation

FlooD
GAME BANNED Off Offline

Quote
LOL nah shotguns don't work as they're supposed to right now

currently shotgun=1 bullet with 26 dmg
(same with glock burst/famas)

old Re: LUA Lag Compensation

FlooD
GAME BANNED Off Offline

Quote
version. 0.5 out

imo this version is ready for usage in standard public servers.

all (buyable) weapons work as expected... except for glock/famas when they're doing single/double bullet bursts.

btw fuck i just realized i should have done
sx, sy, ex, ey = ex, ey, sx,sy
instead of recursion in my intersect function...

oh well... not a significant performance factor since the conditions for that statement are rarely acheived.
edited 5×, last 21.11.10 07:05:47 am

old Re: LUA Lag Compensation

Spyware
Super User Off Offline

Quote
I do not recommend PUBLIC use of this. With lag compensation, the solid strategy is a numbers game: Who has more - Wins.

Secondly, low pingers will probably whine. Sure, it's great that they finally feel what we feel, the vulnerability, the pathetic futility of trying to go against someone of the same skill but of low ping...

But the vast majority of CS:2D players are babies who GO LONE WOLF... They're all like "I'M SO FUCKING PRO, MAN! NO ONE CAN KILL ME!" and the basic tactics they do is rush, rush all the time.

"HOLY SHIT, I GOT KILLED! I'M SO GOOD, I CAN'T DIE... HE MUST HAX!"

And when they encounter a streak of deaths, they whine and whine and whine.

"LAGS! HAX! LAGS! HAX!"

And everyone... Everyone always picks up an M4... What the fuck, man... An M4... ALL THE FUCKING TIME.

And seriously, who the hell buys nightvision on DAY MAPS? They lack the discipline, these new kids with their buyscripts... M4, Deagle, NIGHTVISION.


The Desert Eagle and AWP combination is redundant...

---
I propose we keep it only at Clan Wars, Tournaments, One on ones...

Or else the mass of Noobdom will cry again and we shall endure the shit of the internet.

old Re: LUA Lag Compensation

-D1aMoNd_
User Off Offline

Quote
Spyware has written
Or else the mass of Noobdom will cry again and we shall endure the shit of the internet.


Let them cry.

old Re: LUA Lag Compensation

FlooD
GAME BANNED Off Offline

Quote
much better to have a numbers game (whatever the fuck that means) than a latency game.

lets look at the 4 groups of players and what would think:
experienced, low ping: a few less bullets required to kill people, which usually is not noticible. occasionally, some bullets from high ping players may hit around the corner.

noob, low ping: dont even notice a difference. seriously. i haven't seen any from this group complain/comment on how the server is different or anything...

experienced, high ping: YAY MY BULLETS ACTUALLY HIT NOW. they also notice that bullets go around the corner, but they are used to it since the effect is present for them without lag comp.

noob high ping: WHOA KOOL I HAVE A SCORE OF 7-5 RATHER THAN 1-13!!!

there actually is one more type of player:
Spoiler >


seriously though, spyware what do u mean my "who has more wins"??? more what?

old Re: LUA Lag Compensation

Spyware
Super User Off Offline

Quote
FlooD has written
seriously though, spyware what do u mean my "who has more wins"??? more what?

Manpower.

old Re: LUA Lag Compensation

DannyDeth
User Off Offline

Quote
Crazyx Advance has written
DannyDeth has written
Ok, this is pretty cool
Only one thing which I need to moan about: It's Lua, not LUA. Lua is a spanish word meaning 'moon', it is not an abreviation of anything. So you only capitalise the first letter. Other than that everything looks cool, adding headshots will sure make a lot of campers happy

Lua is Portuguese, not Spanish.
In Spanish I think it is 'Luna'.


Lua 'about' page has written
"Lua" (pronounced LOO-ah) means "Moon" in Portuguese. As such, it is neither an acronym nor an abbreviation, but a noun. More specifically, "Lua" is a name, the name of the Earth's moon and the name of the language. Like most names, it should be written in lower case with an initial capital, that is, "Lua". Please do not write it as "LUA", which is both ugly and confusing, because then it becomes an acronym with different meanings for different people. So, please, write "Lua" right!


I failed... *facepalm*
Must of forgotten it But bottom line is that it's Lua, NOT ( !!! ) LUA. I have been saying this to so many people it isn't funny anymore.

EDIT: @Spyware:
Most people who say that are actually hacking themselves. If you are say, aiming, it is nearly impossible to kill you. And btw isn't quite a shock when you realise that the person is actually hacking ( seeing the mouse jut around with no 'in-between-zone' ). I was playing on LaG Contruction the other day ( That place gets a fair view of script-kiddies ) and you could see that the one dude was aiming ( his mouse was following people perfectly non-stop ). I saw Yumi get killed by him and then I knew that he was definatly hacking. Yumi normally has a KpD of like 200-300 until he/she ( his sister was apparently playing for him or soemthing like that ) dies. And then he started speedhacking as well, so he was voted to spec-lock. Bottom-line is that when pro players do die and they thihnk that other people are hacking it is normally correct. But not the nub players who think they are pros. That never gets old
To the start Previous 1 2 3 Next To the start
Log in to replyGeneral overviewCS2D overviewForums overview