Server Help

Bot Questions - n/m (ignore)

Underlord - Sat Dec 11, 2004 6:12 pm
Post subject: n/m (ignore)
was having trouble with flying mervbot around using positionhook, but figured it out within few mins of posting, need a delete thread option :/

wasn't updating me->vel.x correctly

thx 50%
50% Packetloss - Sat Dec 11, 2004 6:31 pm
Post subject:
Usually jumping around is caused by the velocity not being high enough. Maybe set it to 600 or 1000 and see what it looks like. Also if you want the bot to move then do tell(makeSendPosition(true)); instead of sending that function false. I havent done too much movement type bots so I never figured out the proper corrilation between the velocity and position variables.
Mine GO BOOM - Sat Dec 11, 2004 7:36 pm
Post subject: Re: n/m (ignore)
Underlord wrote:
need a delete thread option

The idea is that even if you figured it out yourself, it would still be archived for someone else who may have somewhat of a similar problem, and searched and found your thread. This same logic is also why you cannot close threads, as if that person who found the thread has a similar question, can bump the old thread and be able to continue from where the original poster left off.
50% Packetloss wrote:
the proper corrilation between the velocity and position variables.

Pixels per 10 seconds. So if you set it to 1000, you'll move 100 pixels per second. I figured that one out a long, long time ago.

Tiles are 16 pixels long, with 1024 tiles in a map. Set a portal at a very edge, set max speed to 16384, accelerate really fast, hit the portal and a stop watch at the same time. Ten seconds later, at the other edge of the map. This method is also how I remember it, since I remember setting max speed to the length of a map, and it taking only 10 seconds.
Dr Brain - Sat Dec 11, 2004 9:45 pm
Post subject:
That doesn't make any sense. I've timed myself from one side of the map to the other in something like 6-7 seconds.
D1st0rt - Sun Dec 12, 2004 4:40 am
Post subject:
Hypertunnels don't count
Dr Brain - Sun Dec 12, 2004 8:32 am
Post subject:
Actually, it does make sense. The max isn't 16384.
Underlord - Sun Dec 12, 2004 1:25 pm
Post subject:
map = 1024 tiles * 16 pixels long = 16384 pixels wide
(warpto = tiles, position packets = pixels)

smallest relevent time unit in ss for speed/position/acceleration is 10ms

thrust (constant acceleration per 10ms)= 19 (example svs warbird) = 19 constant acceleration every 10ms = 190 in 100ms = 1900 in 1s

speed (pixels per 10s) = 3250 = travel 3.250 pixels every 10ms = 32.5 pixels 100ms = 325.0 pixels 1s = 3250 pixels 10s

position: increases/decreases by speed (+- thrust if acceleration) / 1000 pixels. the x,y position and velocity x,y are computed using sin/cos and a right triangle

results (svs wb settings)
from full stop to full speed is 3250/1900 = 1.71 seconds
distance traveled during that acceleration (same = ut + 1/2at^2 = 0 + 0.5 * 190.0 * 1.71 * 1.71 = 276.1 pixels
time to travel map length at full speed = 16384 pixels / 325 pixels/s = 50.4 seconds
if speed was 16384, time = 16384 pixels / 1638.4 pixels/s = 10 s (remember that speed from settings is a 10s measurement)
D1st0rt - Tue Dec 14, 2004 1:07 am
Post subject:
With a speed of 32767, it works out to 5.0002 seconds. This isn't starting from rest, but can easily be achieved with a portal
Dr Brain - Tue Dec 14, 2004 7:15 am
Post subject:
It turns out that 32767 isn't the maximum speed internally. Though it is the max in the packet. So you see someone going really fast, then they start to shudder because they're over the max and their velocity no longer syncs up with the distance between packet sends.
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group