Sometimes in scrolling games, the scrolling causes a slowdown from 50 fps to about 30 fps on my computer. How can I fix this?
Printable View
Sometimes in scrolling games, the scrolling causes a slowdown from 50 fps to about 30 fps on my computer. How can I fix this?
You mean if you're using parallax scrolling? That happens to me a lot, too... best I can suggest is to use HWA.
No, just regular built-in scrolling. What's parallax scrolling?
When you use different layers and have them all scroll with different coefficients - making a 'realistic' distance effect in your layers - the one furthest away scrolls much slower than one closer upQuote:
Originally Posted by Jaffob
In the game in which this is a major problem I have different layers, but they have the same coefficients. In another game I do use parallax scrolling, and it also slows down.
So how can I fix this?
I have 1 layer and scrolling slows down too when it did not in previous versions of MMF2.
Maybe try timed movement for the player if the screen is centered on the player?
Yes, I already do this. The problem is that the event loop is slowed down, which causes the gravity of my game to decrease power when scrolling.
Sorry about that Jaffob. I don't really have any other ideas, except maybe some kind of fast loop on the gravity? I use David N's fastloop platform with scrolling and haven't experienced slowdowns on the scrolling or gravity. Sorry I couldn't be more help.
Using any third party extensions? If you create a simple test frame with a backdrop that fills the frame and scroll around that with nothing else added to the frame does it still slow down sometimes?
If it happens on a test frame, then you may just be trying to push too many pixels through either your graphics card or CPU or both. I've found modern PC's with dedicated graphics cards tend to not break a sweat but older PC's or machines with integrated or low spec graphics can slow down. It's partly how fast data can be squirted into the video card memory but also the speed of your system in general.
If it does not happen on your test frame then add a second layer and begin adding more background objects to see if the number of objects and/or layers has an effect.
If after doing this it still does not slow down like you are finding in your game then there must be something specific going on in your game that is the culprit. However I'd suspect that you are just beginning to hit a graphic related limit of your PC when you get the slow downs.
The good news is that once the HWA patch is out of beta you will find this display mode will be able to cope with out a sweat on any PC with any kind of 3D capability, including most integrated graphics cards. You'll still have limits, but they won't be defined so much by the amount of graphics you throw on screen as you may be finding now in 100% software rendering modes.
I have three layers in my game, but when I tried deleting two of them the slowdown was not reduced. However if I create a test frame with lots of backdrops and 100 actives, there is no slowdown at all.
But my computer is six years old, so it can be a little weird at times. ;)
On my oldest testing PC (333mhz, win98se) I get slow downs, but it is proportional for the whole application and not just the scrolling. Yes, older computers do act weird. The challenge for me is to make application and games run fast on them. With scrolling it might be a lost cause, as that is the most dificulty with me.