Re: Tips for optimizing for Flash Export
You can do scrolling layers without actually using the MMF2 layers. Keep everything in 1 frame and have your layer backgrounds as active objects. Nothing wrong with having a huge 800x600 active, it's much better than a new layer.
Then just make an event like:
Is global value OrderLayers set to 1
- Bring Object X to front, Bring Object Y to Front, Bring Object Z
- Set OrderLayers to 0
So bring every active object to the front in the order that you need them, starting with backgrounds (aka large active objects), then moving to your playable character and enemies.
Then, whenever an object is created a X Y that will mess up the order of the layers, just set your global value OrderLayers to 1, and let your event do all the re-ordering.
That always buys me some extra frames per second.
Re: Tips for optimizing for Flash Export
Quote:
Originally Posted by Ryan
You can do scrolling layers without actually using the MMF2 layers.
I also do it this way. Just keep in mind that MMF has some kind of sync bug which sometimes leads to gaps between the scrolling AOs. Their design should allow to overlap some pixels to avoid graphical glitches.
Re: Tips for optimizing for Flash Export
I haven't had a problem keeping backgrounds in sync, just ensure your background offsets are all tied to a root global value, (ie. don't do X position +1, do X Origin + Global Offset) and make sure they all update within the same cycle, check your offsets to make sure you're not leaving gaps.
Re: Tips for optimizing for Flash Export
I have a 640x480 AO with some simple code:
XPos (AO) <= X Left Frame-Frame Width
---> Create new AO at 1280,0
I already reduced it to 2 lines of code to be on the save side, find an example in this topic .
I used Ball Movement and also tried to move it's X-pos manually. It's not Flash-related, though the effect may be a little worse in SWFs.
Can you tell me what you would change? Always count down a Global Value from 640 and set the AOs X-pos related to it? Where would be the difference?
The fixed X-position 1280 seems to be correct for new AOs, but after a while the error shows. Not always, of course!
Re: Tips for optimizing for Flash Export
At Ryan:
Wow, big actives for layers really is better on FPS in flash than using background objects in actual layers?!? I wasn't expecting that... In my experience its the opposite for Jave for mobile export. I'll have to give that a shot! :)