Solved Is it possible to swap backgrounds without loading a different stage?

Question that is answered or resolved.

PS_VITA

Active member
Hi guys, pretty much like my title says, is it possible to replace the current background for a new one in real time?

I know there's many tricks one can achieve to get what I'm requesting but I'm specifically asking to know if the background can be swapped.
 
You can't swap the native background or the panels, but you can swap the layers all you want. All you need to do is ignore background and build your stage with fglayer instead. Not only can you swap them, you can even do animation.

 
Thanks @DCurrent ,

What I'm currently doing is using a new entity as a background and setting the "set layer " option to a value that overlaps my current background and use a quick flash or screen transition to "swap" backgrounds. I have noticed that using moving fglayers can significantly slow down my module. But I haven't tested still fglayers, so I will try that and see how it goes.
 
I'd like to see your layer images. I hear complaints about slowdown sometimes, but it's almost inevitably due to poor optimization. I have over 20 moving layers in some projects I'm working on, with several of them using affine transform, and there's not even a hint of slowdown.

Often times you will get better performance from more layers, not less, if it means you can break them into smaller pieces with less areas of transpareny the engine can't trim. I'm talking about the fully transparent areas, not alpha blending.

DC
 
I'd like to see your layer images. I hear complaints about slowdown sometimes, but it's almost inevitably due to poor optimization. I have over 20 moving layers in some projects I'm working on, with several of them using affine transform, and there's not even a hint of slowdown.

Often times you will get better performance from more layers, not less, if it means you can break them into smaller pieces with less areas of transpareny the engine can't trim. I'm talking about the fully transparent areas, not alpha blending.

DC
I've used your tutorial to optimize the png layers or backgrounds. Link below.



I currently don't have any background layers I'm working on but I usually follow the tutorial from that link to optimize my backgrounds, sprites, ect.


I have a feeling that the reason why I suffer from slow down using fglayers is probably because I'm using the double dragon reloaded module and Everything is 2X resolution.
 
That set of instructions was to optimize the file, but optimizing the image design is another thing. When I get a chance I'll try to post some examples to show what I mean.

DC
 
That set of instructions was to optimize the file, but optimizing the image design is another thing. When I get a chance I'll try to post some examples to show what I mean.

DC
OMG! Yes please!

@DCurrent

I bet others are waiting for your example as well. I've been checking every day with great anticipation ;)
 
Last edited:
Back
Top Bottom