Forum

> > CS2D > General > [RELEASE] Custom CS2D Server a0.1
Forums overviewCS2D overviewGeneral overviewLog in to reply

English [RELEASE] Custom CS2D Server a0.1

79 replies
Page
To the start Previous 1 2 3 4 Next To the start

old Re: [RELEASE] Custom CS2D Server a0.1

FlooD
GAME BANNED Off Offline

Quote
^^^the last time i compiled, no

about server fps...
1
2
3
4
timeout.tv_usec = 1000; //1ms
while (1)
{
	...
if i am reading the code correctly, this means the while(1) loop is supposed to be repeated every 1000microsecond i.e. 1000fps

when i throw
1
printf("%d\n",time(NULL));
into the while(1) loop,
i get around 480 outputs per second.
this probably isn't the best way to measure fps but it's the simplest one i can think of.

anyway i set tv_usec to 1000000, and as expected, the time was outputted once every second. however when the server received packets (such as when i joined the server), the number of time outputs (which is equal to cycles of the while loop) per second jumped up.

is it possible to make server fps independent of the packet somehow? i think that a constant fps would make implementing lag compensation (which i desperately want :D) much easier
edited 3×, last 28.10.10 06:40:51 am

old Re: [RELEASE] Custom CS2D Server a0.1

Jermuk
User Off Offline

Quote
FlooD has written
is it possible to make server fps independent of the packet somehow? i think that a constant fps would make implementing lag compensation (which i desperately want :D) much easier


Ok, the FPS can now be changed in the settings. It has a tolerance range from +-1ms per run. It comes with the next version.

EDIT: new version released with fps control.
EDIT2: again new version. now with kill message
edited 2×, last 28.10.10 08:23:49 pm

old Re: [RELEASE] Custom CS2D Server a0.1

FlooD
GAME BANNED Off Offline

Quote
awesome
i'm working on lag compensation right now
http://github.com/FloooD/custom_cs2dsrv/issues#issue/1

also workin on something that makes fps more stable..

random question: when the program is sleeping, what happens to any packets it receives???

note on Sleep(...)
the sleep function seems to be very unpredictable... sometimes it works in intervals of 15/16ms and other times it can go to like 1 ms...
so basically the fps goes up whenever i'm on cs2d or loading a webpage in my browser... WTF???

http://rabbit.eng.miami.edu/info/functions/dos.html
look at delay/sleep
http://msdn.microsoft.com/en-us/library/ms686298(VS.85).aspx
basically, windows = gay.
edited 6×, last 29.10.10 05:29:35 am

old Re: [RELEASE] Custom CS2D Server a0.1

Jermuk
User Off Offline

Quote
FlooD has written
awesome
i'm working on lag compensation right now


Some tips:
Don't use player[id].latency. It's too inaccurate. Better will be player[id].lastpacket. And the fps is accurate, but it don't fit with the FPS in the settings (always lower). Can you send me your messenger id/s, so we must not use this forum?

old Re: [RELEASE] Custom CS2D Server a0.1

FlooD
GAME BANNED Off Offline

Quote
kk
xfire: apersonn
msn: - Email address (only visible with login) - (i'm not on msn too much though)

btw my computer got about 400000 fps without the sleep LOL

update:
i got lag compensation XDDDDDDDDDDDDDDDDD

unfortunately it is impossible to test at the moment. a bug or something (NOT IN MY LAG COMP CODE) causes the server to lag horribly when two players are in the server and one shoots.

here's the list of the changes i made:
http://pastebin.com/pqJNmduE
(the line numbers may not match up perfectly)
edited 3×, last 30.10.10 03:05:36 am

old Re: [RELEASE] Custom CS2D Server a0.1

Jermuk
User Off Offline

Quote
kNedLiik has written
how to make server with it?


Compile the source? If you don't know how to do that, please don't post here again. It's one of the last mid-level discussion in this forum.

old Re: [RELEASE] Custom CS2D Server a0.1

FlooD
GAME BANNED Off Offline

Quote
Jermuk has written
kNedLiik has written
how to make server with it?


Compile the source? If you don't know how to do that, please don't post here again. It's one of the last mid-level discussion in this forum.


actually it took me a day to figure out how to compile
(i never did any c before this lol)

@kned: i'll post a package with the latest release + de_cs2d.map sometime soon so people can test

here's the latest version from jermuk's source
changes:
port to 36963
on respawn, you get 54321 money
fps to 50. (1000 is not stable)

http://www.mediafire.com/?3fikg6n2tjza55z <-- THIS FILE DOES NOT HAVE LAG COMPENSATION
--------------------------------------------------
LAG COMPENSATION WORKING
http://www.youtube.com/watch?v=dIK8yPJ0wX8
edited 3×, last 31.10.10 05:54:16 pm

old Re: [RELEASE] Custom CS2D Server a0.1

Jermuk
User Off Offline

Quote
Which files did you changed with adding lag compensation?
I can just see what is in your list, but where is the lag compensation? btw: using low fps is bad, THAT causes to lags.
edited 1×, last 31.10.10 12:18:00 pm

old Re: [RELEASE] Custom CS2D Server a0.1

CappaCappa
BANNED Off Offline

Quote
FlooD has written
Jermuk has written
kNedLiik has written
how to make server with it?


Compile the source? If you don't know how to do that, please don't post here again. It's one of the last mid-level discussion in this forum.


actually it took me a day to figure out how to compile
(i never did any c before this lol)

@kned: i'll post a package with the latest release + de_cs2d.map sometime soon so people can test

here's the latest version from jermuk's source
changes:
port to 36963
on respawn, you get 54321 money
fps to 50. (1000 is not stable)

http://www.mediafire.com/?3fikg6n2tjza55z

LAG COMPENSATION WORKING
http://www.youtube.com/watch?v=dIK8yPJ0wX8
WATCH


Nice, would be cool if you could simultaneously play the video of Skull, see if he really hits you. Anyway nice job, I think in the future this custom server will really be a substitute for the current cs2d_dedicated.exe.

old Re: [RELEASE] Custom CS2D Server a0.1

FlooD
GAME BANNED Off Offline

Quote
Jermuk has written
@All:

The source in his file is not the lag compensation! There are no really differences! So it cannot work!

i didn't upload the stuff yet...

old Re: [RELEASE] Custom CS2D Server a0.1

Torque
User Off Offline

Quote
Except noone will dare to host it uprate, because you've just said you'd found about 5000 exploiting possibilities in the code

Btw, there should be some documentation about how heavy the lag compensation is for the server and something like mp_lagcompensation in future versions. I wish I could help guys, but I'd probably just break stuff :S.
To the start Previous 1 2 3 4 Next To the start
Log in to replyGeneral overviewCS2D overviewForums overview