Page 3 of 3
Re: Info about the Jerky Camera (Low FPS) Problem
Posted: Fri Jul 03, 2009 11:12 am
by Avatara
Sorry to resurrect a dead topic, but I just wanna give an update:
I recently got a new PC, vastly superior to my old one in every way
. The thing is, I still got the problem I mention in this topic. There's one exception though: after patch 1.7, the camera works smoothly anytime, (which is no surprise considering you changed that part of the code), so thank you for fixing that. But the low fps for menus, projectiles, etc still happens and I have to resort to the Windows Media Player trick. And yes everything is up to date, no virus, spyware, etc... It's an specific Myth thing.
So, when you take the fact that I reproduced this problem in very different hardware and the only thing in common between the systems was the use of Windows XP...
I'm pretty sure Myth's code is faulty under Windows XP in some way or another or under specific configs. This is corroborated by the Windows Media Player fix, which shows it's a software thing. Maybe in Windows 7 it will work right, because I'm not using Vista, that's for sure.
Hey Myrd, maybe you can give me a special debug executable which generates tons of logs/info for you guys to analyze...
Re: Info about the Jerky Camera (Low FPS) Problem
Posted: Fri Jul 03, 2009 11:40 am
by Myrd
Out of curiosity, did you re-install the OS from scratch on the new PC or are you using the disk (or cloned it) from your previous one?
I ask because you're using XP, and I guess nowadays all computers come with Vista.
Re: Info about the Jerky Camera (Low FPS) Problem
Posted: Fri Jul 03, 2009 11:49 am
by Myrd
I did some searching around, and apparently the launching WMP helped some WoW players at one point. Apparently WMP changes some timing settings in Windows which can improve FPS. WoW eventually added an internal command to do the same thing as WMP does, see this thread:
http://www.mmo-champion.com/index.php?a ... ic=44047.0
Unfortunately, the specific details of what timing setting WoW is changing with that command are not mentioned.
Re: Info about the Jerky Camera (Low FPS) Problem
Posted: Fri Jul 03, 2009 11:59 am
by Myrd
Also, are you running Windows XP SP3? If not, try updating and see if it helps any.
Re: Info about the Jerky Camera (Low FPS) Problem
Posted: Fri Jul 03, 2009 2:35 pm
by Avatara
Thanks for the response Myrd!
My Windows XP was installed by scratch by the store guys where I bought it. I specifically asked for Windows XP because I'm not too confident in Vista. And yes, I'm using Service Pack 3 and it's the exactly same thing.
I took a look at the link you provided, and I guess that pretty nails the reason why the game works better with WMP on. I will try searching later if there's a way to set things so Windows XP always use a certain timing config.
Re: Info about the Jerky Camera (Low FPS) Problem
Posted: Fri Jul 03, 2009 2:50 pm
by Melekor
Here it is:
http://flux.io/2008/01/14/making-wow-run-faster/
http://msdn.microsoft.com/en-us/library ... S.85).aspx
The API call:
Code: Select all
timeBeginPeriod(1); // call once at startup
We should add this as a poweruser option (probably off by default because the docs say it can reduce performance and/or mess with power management).
Re: Info about the Jerky Camera (Low FPS) Problem
Posted: Fri Jul 03, 2009 3:01 pm
by GodzFire
I specifically asked for Windows XP because I'm not too confident in Vista.
I love this guy.
Re: Info about the Jerky Camera (Low FPS) Problem
Posted: Fri Jul 03, 2009 3:26 pm
by Avatara
GodzFire wrote:I specifically asked for Windows XP because I'm not too confident in Vista.
I love this guy.
Hey thanks! I love Godzilla too!
Thanks for the links Melekor. I found info about that exact command you posted.
I've been doing some research, and it seems that Windows Media Player uses some high precision timers and due to a bug (?) it helped other applications. (Seems to be related to this service, which uses high precision timers:
http://msdn.microsoft.com/en-us/library ... S.85).aspx).
I also found some quotes from a guy at WoW boards (though from 2007) who seems to know what he's talking about:
WoWDude wrote: The origin of this "performance boost" is quite simple. Almost all of the applications are using system timers in some of the ways. This is a natural way of telling the system "Hey! I wanna draw this thing in 5 milliseconds. Now I'm going to sleep, wake me up in 5ms!". Windows has a thing called multimedia timers. These are the only timers with a high precision and predictability (up to 1ms resolution). By default these timers run with a precision like 10ms. So if the application want to wait for something using a 3ms interval it will actually have to wait for 3-10 seconds. Windows Media Player is using documented Windows functions (timeBeginRange, timeEndRange) which allow the system to boost the timers precision up to 1ms. You may ask why Microsoft didn't set this by default for you, well... Increasing timers resolution will cause your CPU to handle more interrupts and it will cause greatly increased power consumption (especially in sleep modes). Usually most of the applications don't really need such precision. So it is recommended for the software developers to only use this function when they're have a lot of heavy multimedia processing in their code.
And
WoWDudeAgain wrote:Just try to create a simple application making timeBeginPeriod call and see the results. Don't forget that in real world of Windows multitasking you really need to take the kernel scheduler into account. Usually you can't do internal high-resolution time management all of the time just eating all of CPU cycles.
World of Warcraft's main thread (as far as i can see) spends most of the time doing system sleep() calls and calling WinMM time management functions. THAT'S why increasing the interrupt rate of the system timers leads us to the performance boost.
And a piece of code:
Code: Select all
#include <stdio.h>
#include <windows.h>
int main(void)
{
timeBeginPeriod(1);
printf("Press any key to restore normal timer frequency.\n");
getchar();
timeEndPeriod(1);
return 0;
}
Re: Info about the Jerky Camera (Low FPS) Problem
Posted: Tue Feb 23, 2010 8:39 pm
by Hooch
4 years later I saw the new demo up on another site, thought I'd give it a crack to see if the camera problem was still around, and lo and behold you've fixed it! Congratulations, well done on all the research in this thread too all.