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

memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes

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

memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes

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

memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes memes

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.
[06:28 am]
NudeRaider -- EUD actions, specifically. The conditions remained. Today we can even have actions again, but they're all virtualized/whitelisted (not sure on the actual technical implementation) so you can only use them for specific intended purposed, not arbitrary code injections.
[06:26 am]
NudeRaider -- I mean yes, maps - through EUDs - were theoretically able to do that as well, but that was patched quickly.
[06:25 am]
NudeRaider -- Symmetry
Symmetry shouted: Ohhh imagine a SC map that could delete itself
not the map, the editor
[02:28 am]
Symmetry -- I vaguely remember Voy doing some ACE back in the day, but I had no idea EUDs could do that kind of shit. I am very much catching up on the technology
[02:28 am]
Symmetry -- Ohhh imagine a SC map that could delete itself
[2026-7-15. : 8:51 pm]
NudeRaider -- Symmetry
Symmetry shouted: NudeRaider Is EUD editor capable of writing shit onto the player's harddrive? That seems like it would be dangerous
yeah an editor that isn't allowed to write files sounds rather pointless, so I'd assume it can. Like most other programs too btw. and yes, obviously that's dangerous, but also kinda necessary. MS introduced that virtualization for exactly that reason.
[2026-7-15. : 4:10 am]
Ultraviolet -- I don't think so. I think they shut that shit down after 1.16, maybe even earlier
[2026-7-15. : 2:19 am]
Symmetry -- NudeRaider
NudeRaider shouted: Symmetry I can't tell if it's relevant. You provided literally no context so I was providing an equally generic answer.
Is EUD editor capable of writing shit onto the player's harddrive? That seems like it would be dangerous
[2026-7-14. : 11:43 pm]
Ultraviolet -- let's take each other's clothes off :teach:
[2026-7-14. : 11:03 pm]
Vrael -- :teach:
Please log in to shout.


Members Online: MarineElite, IlyaSnopchenko