02-15-2025, 07:50 AM
(This post was last modified: 02-15-2025, 09:22 AM by stevantosic.)
Hi, I have been testing a time parameters (18, 1030 in this case) and it shows a good (although not 100% right) results (C#):
while(true)
{
string jsonMaze = SendWebRequest(urlGet); // getData
// Calculate action (AI) ...
SendWebRequest(urlSet + "&animate=" + dirs[moveDir]); // 0, 90, 180, 270
Timer.Sleep(18); // fetch (50-60fps) from web page should take action in this interval
SendWebRequest(urlSet + "&animate = -1"); // prevent additional fetch the same previous animation
Timer.Sleep(1030); // waiting end of animation
}
while(true)
{
string jsonMaze = SendWebRequest(urlGet); // getData
// Calculate action (AI) ...
SendWebRequest(urlSet + "&animate=" + dirs[moveDir]); // 0, 90, 180, 270
Timer.Sleep(18); // fetch (50-60fps) from web page should take action in this interval
SendWebRequest(urlSet + "&animate = -1"); // prevent additional fetch the same previous animation
Timer.Sleep(1030); // waiting end of animation
}