Under what circumstances should it be switched on? It sounds pretty self explanatory but I never notice a difference when its on or off. What EXACTLY does it do?
Tell 'em Babs is 'ere...
DaVince This fool just HAD to have a custom rating
Registered 04/09/2004
Points 7998
22nd August, 2007 at 17:32:00 -
It skips frames when a computer can't handle things at 50 FPS. Some people say it's broken in MMF1.5, but I don't see how.
Basically, when the player's machine can't keep up, it drops the framerate but not the speed of the game. That's what it does. So you might want to use it if you have a CPU-heavy game, but still want the game to run normally on slow computers, at the cost of some FPS.
Machine Independent Speed is highly useful for something like an Online game, where you need to keep player positions and stuff, in-sync, regardless of the players computer speed. (Sorry, figured I'd add that in.)
I tried it with one of my old games on a very shit computer years ago.
If you have a timer based jump (which isn't a good idea anyway)
a slow pc will have the character jump lower than it should if it can't handle the pace. (because it's not moved far enough in the set time given to it)
however with machine independent speed turned on the character always reached the peak of the jump in time.
Yeah, adding to what Andy said, even a 0.1ms time can make a huge difference on slower computers.
A much better way to do it, set up a counter that's Always adding 1, then when it reaches 1, set it back to 0.
Now anytime that counter hits 0, will mark every other loop, so just use "Counter is 0"
Change the number it reaches, higher, and it will make the loop larger and take more time to complete it.
It's more reliable, but requires just a tad more work.
PS: If anyone else has any other ideas, by all means mention them. This is just the method I personally take.
If your always adding 1 to the counter, then setting it back to 0 when it reaches 1, then it's going to fire an event every other frame, which would be similar to the every 0.1 millisecond event.
Now if you change it back to 0 every time it reaches 5 rather then 0, it's going to take a little bit longer to reach 5, because it has to look 5 more times before it goes back to 0 and triggers the event.
DaVince This fool just HAD to have a custom rating
Registered 04/09/2004
Points 7998
25th August, 2007 at 16:10:00 -
Originally Posted by BrandonC If your always adding 1 to the counter, then setting it back to 0 when it reaches 1, then it's going to fire an event every other frame, which would be similar to the every 0.1 millisecond event.
1 frame = 1/50th of a second = 20 milliseconds
Every other frame = 2/50th of a second = 40 milliseconds
You can't use 10 millisecond / 0.01 second events unless you set the frame rate to 100.
The amount of time in milliseconds really isn't important in this case, we're just trying to avoid the in-game timer from jumping ahead of the game, because the game is moving slower. The idea is to make all the timers slow down at the same rate of the game, by making them rely on a constant loop in the game, as opposed to outside.
System time will not slow down, so it will desync when the game slows down. We all already know that. I'm just posting my personal solution to the issue, regardless if my math isn't exactly correct.
Edit: If you have a game running at 100fps on your computer, but that game slows down to 50fps on someone elses computer. The amount of time 1 loop takes to complete in milliseconds, is completely pointless to keep track of, because the goal is to avoid</> the actual time, and make the game more relied on a constant loop that actually slows down with the game.