Here are the simple steps that you need to overcome the 0.0625 timer in starcraft 2. A simple test will also be provided to prove the results.
1: Go to the data editor and go to Units: Marine and change his speed to 60 and max out his acceleration and turn rate.
2: Create a square region with sides one unit in length, call this region R.
3: Create two points P and Q. Let P be in the center of R and let Q be positioned 1 unit away from P horizontally (Q should be 0.5 units away from the edge R).
4: Place a marine on the map located exactly at point Q
5: Create a new trigger - event > map initialization - action > order Marine to patrol targeting point P.
6: Make 8 new triggers, have them initially off and number them 1, 2, 3 ... 8.
7: Go to trigger 1. Make this trigger initially on. Make the two following events: Any Unit Enters Region AND Any Unit Leaves Region
8: Copy and paste these two events to the other triggers.
9: Go back to trigger 1. Add the following two actions > Turn Trigger 2 AND turn current trigger off.
10: Now go to trigger 2 and add the following two actions > Turn Trigger 3 on and turn current trigger off
11: Repeat this for the other triggers until you get to trigger 8. Add these two actions to trigger 8 > Turn Trigger 1 on and turn current trigger off.
12: We're done, we now have made a trigger that can fire as many times per second as you want, all you need to do is adjust the movement speed of the marine to make it fire faster or slower.
HOW TO TEST THIS.
1) First go back to trigger 1. Add the following action Set Integer Z = Z + 1. Copy and paste this action to the other triggers.
2) We will also make another trigger for our experiment that turns trigger 1 on (thus trigger 1 is initially off). Make this a Keystroke event of your choice. Add the following actions > Turn trigger 1 on + Wait 10 game time second + Display text message [Convert Integer Z to text].
This test shows that the integer Z is being increased much faster than 16 times per second. Normally if we had a trigger operating every 0.0 real-time seconds that sets Z = Z + 1 you couldn't get Z past 640 in 10 seconds. However our example allows us to go past 1400 in 10 seconds.
Way to dramatically increase the rate of exeuction:
1) Make 4 points. Q1 Q2 Q3 and Q4. Make a marine at each Q with NO collision, Call these marines, Marine A, B, C, D. Have them patrol to P.
2) Go to trigger 1 and add the following conditions: Triggering Unit = A.
3) Copy and paste this to triggers 2 through 8.
4) Copy triggers 1 through 8 and paste them. Rename them as 11, 12, 13, 14, 15, 16, 17, 18
Change the conditions of triggers 11-18 to Triggering Unit = B
Now Copy triggers 11 - 18 and paste them and rename them 22, 23, 24...28
Change the conditions of triggers 21-28 to: Triggering Unit = C
One more time copy triggers 21-28 paste them and name 31, 32, 33...38
Change their conditions to: Trigger Unit = D
Now you can fire these triggers (all acting as one trigger) 5000+ times per second, or you could use these as four separate timers for different triggers.
So guess what? GO TO HELL BLIZZARD I OVERCAME YOUR ARTIFICAL LIMIT YOU SONS OF A BITCHES YEAH
Sorry but I'm going to have to shatter your enthusiasm. This does in fact not work. I tried something very similar myself months ago. Your integer Z is increased 1400 times in 10 seconds this way. However, it doesn't happen in the way you think. The unit enters region event only triggers at intervals of 0.0625, so you end up running it loads of times at that specific interval. That's why Z gets increased so much, because it increases in chunks every 0.0625 seconds. If you test with a timer instead of an integer you can confirm this yourself.
Sorry but I'm going to have to shatter your enthusiasm. This does in fact not work. I tried something very similar myself months ago. Your integer Z is increased 1400 times in 10 seconds this way. However, it doesn't happen in the way you think. The unit enters region event only triggers at intervals of 0.0625, so you end up running it loads of times at that specific interval. That's why Z gets increased so much, because it increases in chunks every 0.0625 seconds. If you test with a timer instead of an integer you can confirm this yourself.
2) Triggering a trigger 5000 times a second seems like it'd never be a good idea to me. What PC runs that?
This is more useful for data, like for example force effects that only increase in strength if you keep applying them over and over again as fast as possible, which is currently limited to 0.0625 seconds. If i could apply my forces faster than that, i could throw units away from me at a faster rate. (Or did they make force values actually have an impact past (-)1 now?)
Sorry but I'm going to have to shatter your enthusiasm. This does in fact not work. I tried something very similar myself months ago. Your integer Z is increased 1400 times in 10 seconds this way. However, it doesn't happen in the way you think. The unit enters region event only triggers at intervals of 0.0625, so you end up running it loads of times at that specific interval. That's why Z gets increased so much, because it increases in chunks every 0.0625 seconds. If you test with a timer instead of an integer you can confirm this yourself.
How about the alternate version though, where you are using 4 marines to apply the action with four different sets of triggers?
Also show me your tests that confirm the failure of the main proposal, I want to make sure we're doing the same test.
EDIT:
Wait, are you saying that the "global trigger event checking clock" (I don't know what to call it) is on a 0.0625 second timer?
I know that SC2 allows you to enter up to four decimal places when it comes to time, so I'm wondering how I can tap into this.
Never be discouraged, you can only succeed by failing a thousand times prior!
I know that SC2 allows you to enter up to four decimal places when it comes to time, so I'm wondering how I can tap into this.
That is only because they didn't bother specifying special rules for time. It'll just get rounded to the next possible time interval.
And yes, the "global trigger event checking clock" is most probably running in a 0.0625 interval.
I'm pretty sure the game only updates frames every 0.0625 seconds.
Negative. That is frame-rate dependend. If you're running the game on 16fps then it'll be updated every 0.0625. Mostly you're running on much higher speeds though.
If it was only 16fps then the game would look crappy. Animations were chunky, etc.
But you don't need to update the entire game with every "game tick". Things like Trigger-action system are only updated every 16th of a second because of performance reasons.
Graphics and physics usually run at speeds up to 60 times a second.
Negative. That is frame-rate dependend. If you're running the game on 16fps then it'll be updated every 0.0625. Mostly you're running on much higher speeds though.
If it was only 16fps then the game would look crappy. Animations were chunky, etc.
Are you sure? Most games I've heard of have a fixed-length physics step for stability. And there's no way that SC2's update step is frame-rate dependent in multiplayer, since it's entirely deterministic. For a game that runs in lockstep, I think a 62.5ms physics update step is entirely reasonable, especially without a gameplay-related physics simulation.
I did read somewhere that the whole SC2 engine updates at 32 FPS (0.03125) and all trigger or data events are checked every 2 intervals. The only thing, which can run faster than 16 FPS is actually a 0 wait, which runs at 32 FPS; at least a loop of 0 waits triggers twice each 0.0625 interval.
Visuals are another story, the actual framerate your PC renders the graphics is somewhat independent.
Might be that it is fixed, but the specific update speed doesn't really matter. As long as a certain action is processed in exactly the same time it doesn't matter in how many steps it is processed.
I don't think triggers have anything to do with the engine. The engine can update hundreds of FPS. Physics are local to each machine with no effect on gameplay.
Try hitting ctrl alt f. You'll see it can be 100+.
Triggers are essentially run in a VM. You can't make any assumption about how they work regardless of what you know about the SC2 engine.
I don't think triggers have anything to do with the engine. The engine can update hundreds of FPS. Physics are local to each machine with no effect on gameplay.
Um, yeah, no. Unless the only thing they're using physics for is the explosion parts from dead units flying away (and i have a strong suspicion that's not the case), then the physics MUST be perfectly synced to avoid any errors.
Physics have absolutely NO effect on the game itself.
Wreck parts can't hit other units and damage them, or anything like that. Physics are purely graphic eye candy (as Vexal said, single players can even have it turned off).
Thus physics can be asynchronous without problems.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Here are the simple steps that you need to overcome the 0.0625 timer in starcraft 2. A simple test will also be provided to prove the results.
1: Go to the data editor and go to Units: Marine and change his speed to 60 and max out his acceleration and turn rate.
2: Create a square region with sides one unit in length, call this region R.
3: Create two points P and Q. Let P be in the center of R and let Q be positioned 1 unit away from P horizontally (Q should be 0.5 units away from the edge R).
4: Place a marine on the map located exactly at point Q
5: Create a new trigger - event > map initialization - action > order Marine to patrol targeting point P.
6: Make 8 new triggers, have them initially off and number them 1, 2, 3 ... 8.
7: Go to trigger 1. Make this trigger initially on. Make the two following events: Any Unit Enters Region AND Any Unit Leaves Region
8: Copy and paste these two events to the other triggers.
9: Go back to trigger 1. Add the following two actions > Turn Trigger 2 AND turn current trigger off.
10: Now go to trigger 2 and add the following two actions > Turn Trigger 3 on and turn current trigger off
11: Repeat this for the other triggers until you get to trigger 8. Add these two actions to trigger 8 > Turn Trigger 1 on and turn current trigger off.
12: We're done, we now have made a trigger that can fire as many times per second as you want, all you need to do is adjust the movement speed of the marine to make it fire faster or slower.
HOW TO TEST THIS.
1) First go back to trigger 1. Add the following action Set Integer Z = Z + 1. Copy and paste this action to the other triggers.
2) We will also make another trigger for our experiment that turns trigger 1 on (thus trigger 1 is initially off). Make this a Keystroke event of your choice. Add the following actions > Turn trigger 1 on + Wait 10 game time second + Display text message [Convert Integer Z to text].
This test shows that the integer Z is being increased much faster than 16 times per second. Normally if we had a trigger operating every 0.0 real-time seconds that sets Z = Z + 1 you couldn't get Z past 640 in 10 seconds. However our example allows us to go past 1400 in 10 seconds.
Way to dramatically increase the rate of exeuction: 1) Make 4 points. Q1 Q2 Q3 and Q4. Make a marine at each Q with NO collision, Call these marines, Marine A, B, C, D. Have them patrol to P.
2) Go to trigger 1 and add the following conditions: Triggering Unit = A.
3) Copy and paste this to triggers 2 through 8.
4) Copy triggers 1 through 8 and paste them. Rename them as 11, 12, 13, 14, 15, 16, 17, 18
Change the conditions of triggers 11-18 to Triggering Unit = B
Now Copy triggers 11 - 18 and paste them and rename them 22, 23, 24...28
Change the conditions of triggers 21-28 to: Triggering Unit = C
One more time copy triggers 21-28 paste them and name 31, 32, 33...38
Change their conditions to: Trigger Unit = D
Now you can fire these triggers (all acting as one trigger) 5000+ times per second, or you could use these as four separate timers for different triggers.
So guess what? GO TO HELL BLIZZARD I OVERCAME YOUR ARTIFICAL LIMIT YOU SONS OF A BITCHES YEAH
Sorry but I'm going to have to shatter your enthusiasm. This does in fact not work. I tried something very similar myself months ago. Your integer Z is increased 1400 times in 10 seconds this way. However, it doesn't happen in the way you think. The unit enters region event only triggers at intervals of 0.0625, so you end up running it loads of times at that specific interval. That's why Z gets increased so much, because it increases in chunks every 0.0625 seconds. If you test with a timer instead of an integer you can confirm this yourself.
I can confirm this.
@Qancakes: Go
Oh man looks like he got counter-owned.
0.01 is a update rate for any game, what the hell are u talkin about.
Just two comments:
1) Why... ?
2) Triggering a trigger 5000 times a second seems like it'd never be a good idea to me. What PC runs that?
This is more useful for data, like for example force effects that only increase in strength if you keep applying them over and over again as fast as possible, which is currently limited to 0.0625 seconds. If i could apply my forces faster than that, i could throw units away from me at a faster rate. (Or did they make force values actually have an impact past (-)1 now?)
How about the alternate version though, where you are using 4 marines to apply the action with four different sets of triggers?
Also show me your tests that confirm the failure of the main proposal, I want to make sure we're doing the same test.
EDIT: Wait, are you saying that the "global trigger event checking clock" (I don't know what to call it) is on a 0.0625 second timer?
I know that SC2 allows you to enter up to four decimal places when it comes to time, so I'm wondering how I can tap into this.
Never be discouraged, you can only succeed by failing a thousand times prior!
Also it was 5000 times over 10 seconds, which equates to 500 times per second.
Almost every pc. 2 milliseconds is a long time for the CPU. Of course it also depends on the trigger.
No it isn't.
That is only because they didn't bother specifying special rules for time. It'll just get rounded to the next possible time interval.
And yes, the "global trigger event checking clock" is most probably running in a 0.0625 interval.
@EdwardSolomon: Go
I'm pretty sure the game only updates frames every 0.0625 seconds.
Negative. That is frame-rate dependend. If you're running the game on 16fps then it'll be updated every 0.0625. Mostly you're running on much higher speeds though.
If it was only 16fps then the game would look crappy. Animations were chunky, etc.
But you don't need to update the entire game with every "game tick". Things like Trigger-action system are only updated every 16th of a second because of performance reasons.
Graphics and physics usually run at speeds up to 60 times a second.
Are you sure? Most games I've heard of have a fixed-length physics step for stability. And there's no way that SC2's update step is frame-rate dependent in multiplayer, since it's entirely deterministic. For a game that runs in lockstep, I think a 62.5ms physics update step is entirely reasonable, especially without a gameplay-related physics simulation.
I did read somewhere that the whole SC2 engine updates at 32 FPS (0.03125) and all trigger or data events are checked every 2 intervals. The only thing, which can run faster than 16 FPS is actually a 0 wait, which runs at 32 FPS; at least a loop of 0 waits triggers twice each 0.0625 interval.
Visuals are another story, the actual framerate your PC renders the graphics is somewhat independent.
@Sublimity: Go
Might be that it is fixed, but the specific update speed doesn't really matter. As long as a certain action is processed in exactly the same time it doesn't matter in how many steps it is processed.
I don't think triggers have anything to do with the engine. The engine can update hundreds of FPS. Physics are local to each machine with no effect on gameplay.
Try hitting ctrl alt f. You'll see it can be 100+.
Triggers are essentially run in a VM. You can't make any assumption about how they work regardless of what you know about the SC2 engine.
It's not about the PC. It's about the Starcraft. Lots of triggers running per second = more likely you will get a weird bug on your map.
Um, yeah, no. Unless the only thing they're using physics for is the explosion parts from dead units flying away (and i have a strong suspicion that's not the case), then the physics MUST be perfectly synced to avoid any errors.
@RCIX:
It IS the only thing it's used for. Why do you think you can change the settings for physics?
Physics have absolutely NO effect on the game itself.
Wreck parts can't hit other units and damage them, or anything like that. Physics are purely graphic eye candy (as Vexal said, single players can even have it turned off).
Thus physics can be asynchronous without problems.