Forum

> > CS2D > General > Normal speed of a player
ForenübersichtCS2D-ÜbersichtGeneral-ÜbersichtEinloggen, um zu antworten

Englisch Normal speed of a player

17 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Normal speed of a player

JONY
User Off Offline

Zitieren
Hi, what's the normal speed of the player (pixels/second or pixels/millisecond). Speed as in change in x-axis and change in y axis (i assume they both are equal).

Does the speed also depend on lag and fps?

Regards,
J.

alt Re: Normal speed of a player

RAVENOUS
BANNED Off Offline

Zitieren
FN_Nemesis hat geschrieben
i think its 0...


Dark Byte hat geschrieben
it is 0


He don't meant the speedmod, he meant the normal movement a player takes in pps (pixels per second).

I think that he's moving with speedmod 0 isn't that informative.

alt Re: Normal speed of a player

JONY
User Off Offline

Zitieren
Tobey hat geschrieben
He don't meant the speedmod, he meant the normal movement a player takes in pps (pixels per second).

I think that he's moving with speedmod 0 isn't that informative.


Yes, I mean the normal speed of a player pixels per second (with speedmod 0).

alt Re: Normal speed of a player

JONY
User Off Offline

Zitieren
Flacko hat geschrieben
I think it's about 160 pixels per second with knife (5 tiles more or less)


about 160 pixels per second?
What's the highest possible (when lag is very low) ?

alt Re: Normal speed of a player

SQ
Moderator Off Offline

Zitieren
Use this script to get player speed in pixels:
1
2
3
4
5
6
7
8
9
10
11
local LastX = 0
local LastY = 0
addhook('ms100','SP')
function SP()
	local function P(X,Y) return(math.sqrt(X * X + Y * Y)) end
	local X = player(1,'x')
	local Y = player(1,'y')
	msg(P(LastX-X,LastY-Y))
	LastX = X
	LastY = Y
end

alt Re: Normal speed of a player

DC
Admin Off Offline

Zitieren
the speed is NOT influenced by the FPS or by the ping or lags.

however it is influenced by the weapon the player holds in his hands (like CS).

alt Re: Normal speed of a player

JONY
User Off Offline

Zitieren
DC hat geschrieben
the speed is NOT influenced by the FPS or by the ping or lags.

however it is influenced by the weapon the player holds in his hands (like CS).


So, what's the speed with the knife?

I tried testing with lua script to see what's the speed (pixels/(1/10) a second) with knife:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
xpos = {}

ypos = {}

addhook("ms100","check")

function check()

	for i=1,32 do

		if (player(i,"exists")) and (player(i,"health"))>0  then

			local dx = math.abs((player(i,"x"))-xpos[i])

			local dy = math.abs((player(i,"y"))-ypos[i])

			parse("hudtxt2 "..i..' 0 "©000255000dx '..dx..'" 40 415')
--check only change in x-axis
			xpos[i] = player(i,"x")

			ypos[i] = player(i,"y")

		end

	end

end

I was getting around 18-23 pixels per 1/10 of a second. No more than 23. But when i add some bots and add the following code, some of the bots were kicked:
1
2
3
4
5
if dx>25 or dy>25 then

	parse("kick "..i.." speed detected")

end
That's why I am not sure what is the highest possible speed with knife (and that's why i thought that it depends on ping/fps).
J.

alt Re: Normal speed of a player

DC
Admin Off Offline

Zitieren
speed per frame:

( 2.0 base speed
+ weapon speed modifier
(- 0.5 if player carries flag)
(+ speedmodvalue/10.0) )
* 1.2 (this is a constant adjustment value I used for dev)
(/2.0 if walking)
= movement speed

weapon speed modifiers range from -0.5 (M249/AWP) to 0.75 (Knife/Wrench). Pistols have 0.5, tmp and mac 0.35, most bigger guns have 0.0 or negative values.

the game runs with 50 fps (if not it will calculate a factor to compensate the difference) this means:

movement speed * 50 = pixels per second

example with knife:

2.0 + 0.75 = 2.75
2.75 * 1.2 = 3.3
3.3 * 50 = 165 pixels per second (= 16.5 per 1/10 sec)

alt Re: Normal speed of a player

JONY
User Off Offline

Zitieren
DC hat geschrieben
speed per frame:

( 2.0 base speed
+ weapon speed modifier
(- 0.5 if player carries flag)
(+ speedmodvalue/10.0) )
* 1.2 (this is a constant adjustment value I used for dev)
(/2.0 if walking)
= movement speed

weapon speed modifiers range from -0.5 (M249/AWP) to 0.75 (Knife/Wrench). Pistols have 0.5, tmp and mac 0.35, most bigger guns have 0.0 or negative values.

the game runs with 50 fps (if not it will calculate a factor to compensate the difference) this means:

movement speed * 50 = pixels per second

example with knife:

2.0 + 0.75 = 2.75
2.75 * 1.2 = 3.3
3.3 * 50 = 165 pixels per second (= 16.5 per 1/10 sec)


Wow.. Thanks a lot.
(still not sure why i was getting more than 20 pixel per 1/10 sec, but ok...)
J.

alt Re: Normal speed of a player

Torque
User Off Offline

Zitieren
@DC, I think lag can affect the speed of a player. Sometimes I see people walking extremely slowly (slower than crouching) and also reacting very late on events. I assumed their computer is very slow.

alt Re: Normal speed of a player

DC
Admin Off Offline

Zitieren
@Torque: lag (internet) can't affect your speed because the movement is calculated clientside (and only corrected by the server if necessary). of course it might look laggy and different to other players due to lag and packet loss.

lag caused by low fps will only affect movement speed if your FPS are really insanely low like 3 fps or something or if your PC completely freezes or crazy shit like that...

alt Re: Normal speed of a player

FlooD
GAME BANNED Off Offline

Zitieren
from my understanding of how the cs2d server works:
sometimes, a group of packets is delayed so according to the server, the player isn't moving at all. then when that group reaches the server, it's all processed at once and the player jumps.

of course the lagger himself doesn't see himself jump, because what he sees is calculated clientside
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antwortenGeneral-ÜbersichtCS2D-ÜbersichtForenübersicht