Budman: Thanks for that, very generous. However my framework customer tried that and it didn't improve the situation whereas boosting the priority does (the problem is all caused by a Yahoo weather widget, which, when closed, resolves the problem). Your theory sounded good but didn't work in practice :-( However, I might add your code anyway just because is cool :-D Thanks.
Toby: Well I'm only boosting the priority a tiny bit to a safe level so it won't cause any problems. As it's part of the framework, my framework users can choose if they want to apply it to their games or not. I may well add it to mine by default, sorry ;-p but you'll never notice except the game is moreorless guaranteed to run smoothly no matter what else the system is doing. You might choose to multi-task a game with some MPEG compression going on in the background or something, but most people won't, that's for sure. Most people have PCs filled with stupid applications and spyware consuming all the resources and I want the game to be able to run well on these systems.
Question about event-based polling: OK, fine I can react to events like keys, mouse, window events; I know this stuff well from my Delphi code. Thing is, say I have constantly moving enemies or scrolling, how can I do that with event-based coding. Do I have to set up a timer and use that? My logic runs at 200FPS, so I'd have to set up a 5ms timer and then every time it goes off, check that 5ms has truely passed and use delta time to move stuff an appropriate amount. If the timer doesn't go off due to a background task hogging resources or something, and say 10ms has passed, will the timer event occur twice in a row quickly (which is why I need to measure time between them) or just once? I'm a bit of noob with event-based in Max and scrolling etc, any advice is welcome, thanks :-)
Toby: Well I'm only boosting the priority a tiny bit to a safe level so it won't cause any problems. As it's part of the framework, my framework users can choose if they want to apply it to their games or not. I may well add it to mine by default, sorry ;-p but you'll never notice except the game is moreorless guaranteed to run smoothly no matter what else the system is doing. You might choose to multi-task a game with some MPEG compression going on in the background or something, but most people won't, that's for sure. Most people have PCs filled with stupid applications and spyware consuming all the resources and I want the game to be able to run well on these systems.
Question about event-based polling: OK, fine I can react to events like keys, mouse, window events; I know this stuff well from my Delphi code. Thing is, say I have constantly moving enemies or scrolling, how can I do that with event-based coding. Do I have to set up a timer and use that? My logic runs at 200FPS, so I'd have to set up a 5ms timer and then every time it goes off, check that 5ms has truely passed and use delta time to move stuff an appropriate amount. If the timer doesn't go off due to a background task hogging resources or something, and say 10ms has passed, will the timer event occur twice in a row quickly (which is why I need to measure time between them) or just once? I'm a bit of noob with event-based in Max and scrolling etc, any advice is welcome, thanks :-)