I am in the midst of making a side scroller. However it was running slowly and I discovered two things sloowing it down.
1 using _x -= speed; I use this to move the background, so without it the game is unplayable but with it it runs at about 1/5 the intended speed. 2 When I removee the code that makes the screen move the menu,that shows your life, money, weapon etc. also slows it down to about half speed.
This may be due to the size of the background and menu, however I have sen large worlds used at faster paces.
Anything that may help illiviate this would be appreciated Chillerman91@hotmail.com
Hi there. Because of the nature of the flash platform any 'scrolling' games are very memory and cpu process intensive (especially if you're using tiles). I think there are a few work-arounds people have found. I'll try to find a few. Are you using AS2 or 3? I think I'm right in saying that upgrading to AS3 should help things run a bit smoother.
For now though, try to minimize the file and image sizes of all the 'moving parts', and remove as much of you can from memory (objects or locations, parts of the level, which are off-screen).
Also, what I've found while working with AS3... keep an eye on your .fla's fps. If you leave it at the default 12, it will indeed run very slow... even though code might execute more often than those twelve times per second.
I know, you probably thought of that, but it's little stupid things like that that can keep you puzzled for quite a while.
And what Khimaera said... usually side scrolling is pretty intensive, so keep that in mind. Just like he said; try to keep as much junk away from the memory as possible, remove everything that you don't need at the time.
It's extremely processor-intensive to move a very large object and re-render it. You're better off simply moving your player instead of the background. Look up flash vcam on google, that way you can follow your player as you would with a moving bg.
dank, it's amazing to see just how much gimmicks you know! I hadn't even heard of it... but from what I can see it's pretty great! Only thing I'm wondering about is... doesn't it re-render the object anyway?