Server Help

ASSS Questions - How to make server check spec coordinates more often?

gilder - Tue Dec 19, 2006 12:31 pm
Post subject: How to make server check spec coordinates more often?
I am making spec controlled strategy game and player.pos.x refresh rate is about 2 seconds. If i want to send a fake where i am, i have to wait 2 seconds before i can send the command.

How can i change the refresh rate?
Dr Brain - Tue Dec 19, 2006 3:29 pm
Post subject:
I think that it comes down to lag. If your ping is 2000ms, then you've found your issue.
gilder - Tue Dec 19, 2006 3:36 pm
Post subject:
I run it in my own computer, so the average ping is 8ms.
BDwinsAlt - Tue Dec 19, 2006 8:28 pm
Post subject:
A ghetto way you shouldn't do it is by timers that keep repeating at rates like 100 ms or so.

Hehe. Just do w/e you need to get it done, i usually don't care if people don't like my methods, as long as it works.
Dr Brain - Tue Dec 19, 2006 9:26 pm
Post subject:
Ah, is this when you're in spectator mode? Because Cont only sends position updates every so often when speccing. There may be a setting that controls that, but I don't recall seeing one.
Muskrat - Wed Dec 20, 2006 2:03 am
Post subject:
And if that's true, BD may have posted something useful..... maybe.....
Bak - Wed Dec 20, 2006 3:59 am
Post subject:
no, his way wouldn't work if brain is right. The server can't get more data than what it's sent.
gilder - Wed Dec 20, 2006 10:32 am
Post subject:
Dr Brain wrote:
Ah, is this when you're in spectator mode?

Yes.

BDwinsAlt, what i need to do in that timer function? Because i got already a timer function that is called many times in a sec.
BDwinsAlt - Wed Dec 20, 2006 12:33 pm
Post subject:
Is this python or C? I don't really know much about fake players since I never use them. Smong will probably know more about this though. If you need to know anything simple, it's probably on the ASSS guide, but fake players... I've never really messed with it.

C: http://wiki.minegoboom.com/index.php/Writing_Modules_In_C
Python: http://wiki.minegoboom.com/index.php/Writing_Modules_In_Python
gilder - Thu Dec 21, 2006 2:06 am
Post subject:
C. I understood your message wrong...

I got an idea how to make this problem littlebit smaller. I think the delay is more near to one second. If the module takes player coordinates 0.5s after the command is done, the difference between real coords and those what module will get is smaller. Same thing that when you add 0.5 to float number before you make it integer.
Smong - Thu Dec 21, 2006 3:04 pm
Post subject:
Well in C you can just watch the position packet directly, in python (I assume this is what bd was talking about), you need a timer to check the position periodically.

Anyway it looks like you are checking the position when a command is given so it doesn't matter.

Finally, yes in cont spec sends positions once every second no matter what the Misc:SendPositionDelay setting is. This is most likely done to save bandwidth.

What you can try is use x-radar as a command toggle for spectators. Toggling x-radar may force the client to send its position immediately instead of waiting up to a second. Additionally the player doesn't have to type anything.
gilder - Thu Dec 21, 2006 5:11 pm
Post subject:
Then you can't choose what unit you are moving, but i'll test it. It might be useful, if i'll find a way...
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group