Author |
Message |
gilder Novice

Age:36 Gender: Joined: Sep 02 2006 Posts: 35 Location: Finland Offline
|
Posted: 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? _________________ Hockey Zone |
|
Back to top |
|
 |
Dr Brain Flip-flopping like a wind surfer

Age:39 Gender: Joined: Dec 01 2002 Posts: 3502 Location: Hyperspace Offline
|
Posted: 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. _________________ Hyperspace Owner
Smong> so long as 99% deaths feel lame it will always be hyperspace to me |
|
Back to top |
|
 |
gilder Novice

Age:36 Gender: Joined: Sep 02 2006 Posts: 35 Location: Finland Offline
|
Posted: Tue Dec 19, 2006 3:36 pm Post subject: |
 |
|
|
|
I run it in my own computer, so the average ping is 8ms. |
|
Back to top |
|
 |
BDwinsAlt Agurus's Posse

Age:34 Gender: Joined: Jun 16 2003 Posts: 1145 Location: Alabama Offline
|
Posted: 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. |
|
Back to top |
|
 |
Dr Brain Flip-flopping like a wind surfer

Age:39 Gender: Joined: Dec 01 2002 Posts: 3502 Location: Hyperspace Offline
|
Posted: 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. |
|
Back to top |
|
 |
Muskrat Server Help Squatter

Age:38 Joined: Aug 24 2004 Posts: 829 Location: Swamp Offline
|
Posted: Wed Dec 20, 2006 2:03 am Post subject: |
 |
|
|
|
And if that's true, BD may have posted something useful..... maybe..... |
|
Back to top |
|
 |
Bak ?ls -s 0 in

Age:26 Gender: Joined: Jun 11 2004 Posts: 1826 Location: USA Offline
|
|
Back to top |
|
 |
gilder Novice

Age:36 Gender: Joined: Sep 02 2006 Posts: 35 Location: Finland Offline
|
Posted: 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. |
|
Back to top |
|
 |
BDwinsAlt Agurus's Posse

Age:34 Gender: Joined: Jun 16 2003 Posts: 1145 Location: Alabama Offline
|
|
Back to top |
|
 |
gilder Novice

Age:36 Gender: Joined: Sep 02 2006 Posts: 35 Location: Finland Offline
|
Posted: 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. |
|
Back to top |
|
 |
Smong Server Help Squatter

Joined: 1043048991 Posts: 0x91E Offline
|
Posted: 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. _________________ ss news  |
|
Back to top |
|
 |
gilder Novice

Age:36 Gender: Joined: Sep 02 2006 Posts: 35 Location: Finland Offline
|
Posted: 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... |
|
Back to top |
|
 |
|