Staredit Network > Forums > SC1 UMS Theory and Ideas > Topic: New information revealed!
New information revealed!
Apr 29 2011, 5:21 pm
By: Heinermann  

May 26 2011, 5:10 pm Heinermann Post #21

SDE, BWAPI owner, hacker.

I don't understand what you mean by "wait period and execution of frame commands being parallel".
Starcraft is 100% linear. The only additional threads are created by external libraries.

I don't understand your question in EDIT2 either.




May 26 2011, 7:02 pm Wormer Post #22



Quote from Wormer
I wonder if there is the same bug feature when they count down milliseconds? Or is it a system call?
As you've said, there is a special behavior of a variable-- operator. I wonder how SC counts down milliseconds to have a delay between frames. If it's a call of a function, there might be the same behavior, so that instead of 42 milliseconds on fastest we get 43 and etc. But now as I think of it, because the number 42 is proven on practice everything should be okay.

Quote from Wormer
By the way I wonder if wait period and execution of frame commands are parallel. Because if they don't, there is no much reason to use prolongated hyper triggers to reduce trigger lag.
Quote from Heinermann
I don't understand what you mean by "wait period and execution of frame commands being parallel".
Starcraft is 100% linear. The only additional threads are created by external libraries.
Yeah I got it. So it takes the time to execute the current frame, and after that it waits frameRate milliseconds to execute the next frame again. Then I thought we don't really make the game run smoother if we execute triggers every 4th frame instead of every second for example, but it seems I was wrong here too.

Thanks. My questions are answered.



Some.

May 26 2011, 8:51 pm Heinermann Post #23

SDE, BWAPI owner, hacker.

Starcraft uses GetTickCount(). You can only determine the number of milliseconds that have passed through system function calls unless you have inline ASM and are using some kind of non-standard coding.




May 26 2011, 9:05 pm Wormer Post #24



Quote from Heinermann
Starcraft uses GetTickCount(). You can only determine the number of milliseconds that have passed through system function calls unless you have inline ASM and are using some kind of non-standard coding.
Oh, so it's a system call. But... does it start to count the next 42 milliseconds from the time when frame commands start to execute, or from the moment when they finished execution?

EDIT:
In other words is the delay between frames equal to max{frameExecutionTime, frameRate} or frameExecutionTime+frameRate, where frameExectuionTime is time which required to execute all commands of a frame (triggers included if triggers are being executed) and frameRate equals to 42 on fastest.



Some.

May 26 2011, 10:33 pm Heinermann Post #25

SDE, BWAPI owner, hacker.

Why would it be frameExecutionTime+frameRate? If that were the case then games with lag would be twice as bad.

(simplified as an example)
Code
DWORD thisTickCount = GetTickCount();
if ( thisTickCount - lastTickCount >= 42 )
{
 lastTickCount = thisTickCount;
 // Parse user input
 // Run game code
}
// Code to draw objects, mouse, and GUI to the screen (drawing when not in game loop, but always drawing even if there's lag)


This is also how Starcraft reaches (or used to reach) 100% CPU, 100% of which is drawing objects to the screen repetitively.




Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[10:53 pm]
Oh_Man -- https://youtu.be/MHOZptE-_-c are yall seeing this map? it's insane
[2024-5-04. : 1:05 am]
Vrael -- I won't stand for people going around saying things like im not a total madman
[2024-5-04. : 1:05 am]
Vrael -- that's better
[2024-5-04. : 12:39 am]
NudeRaider -- can confirm, Vrael is a total madman
[2024-5-03. : 10:18 pm]
Vrael -- who says I'm not a total madman?
[2024-5-03. : 2:26 pm]
UndeadStar -- Vrael, since the ad messages get removed, you look like a total madman for someone that come late
[2024-5-02. : 1:19 pm]
Vrael -- IM GONNA MANUFACTURE SOME SPORTBALL EQUIPMENT WHERE THE SUN DONT SHINE BOY
[2024-5-02. : 1:35 am]
Ultraviolet -- Vrael
Vrael shouted: NEED SOME SPORTBALL> WE GOT YOUR SPORTBALL EQUIPMENT MANUFACTURING
Gonna put deez sportballs in your mouth
[2024-5-01. : 1:24 pm]
Vrael -- NEED SOME SPORTBALL> WE GOT YOUR SPORTBALL EQUIPMENT MANUFACTURING
[2024-4-30. : 5:08 pm]
Oh_Man -- https://youtu.be/lGxUOgfmUCQ
Please log in to shout.


Members Online: jun3hong, Roy