So I’ve been using parallax for a lot, not for simple backgrounds but for complex environment which gives the sense of depth. I love the parallax2D node, the only issue is workflow and performance.
The more parallax layers you add, the more it will lag, but that is expected since every single layer gets rendered individually unlike 3D which uses depth buffer. or so I think?
My other issue which is workflow, I sometimes want to add small parallax varieties on some places, sometimes it’s hard to guess and you may have to add another parallax layer.
The solution for this is just working on the game in a 3D environment, but I’ve been building this game for 8 months and it’s fully 2D. i didn’t do this at the start since I didnt think too much on graphics but now since my game has evolved, it matters.
Here are some screenshots from my metroidvania, to let you know that I rely on parallax even tho its not too obvious on a static image
3D would have the same limitations, it also has to render everything it’s told to render. Depth buffering very likely causes more of a performance hit than 2D’s painter algorithm/z-indexing; but they both play a very minor performance hit.
Your environments look great! Not sure how to help much with workflow issues, maybe creating a plugin/tool for those one-off parallax layers that may be slowing you down? There may be ways to test or preview quicker too, but I’m not sure what you are doing specifically so it’s hard to recommend workflow changes or tools without knowing the workflow.
I already use that, but it’s still not ideal workflow wise, imagine I want an object to have a specific parallax scroll scale, then I’d have to add a new Paralalx2D node just for that object, there isn’t much freedom since it will start lagging after having lots of them unlike just placing them on the z axis
If it’s not a graphical issue then it may not be the Parallax2D’s fault, it’s not a very heavy node- mostly a unique Transform2D, certainly less overhead than using 3D for both graphics and processing transforms.
What does your scene tree look like anyways? How many layers do you have? Are your levels partitioned?
I’m not sure with what you mean with Partitions, but I have 15 parallax layers, they are all needed and the game does run better with less layers, The scene tree is straight forward, but the BG and FG scene also contain their own layers for dust particles and such, it makes things very immersive in my opinion.
My game is split in rooms so loading/unloading is already done. I cant really guess what’s bad performance wise since my RTX 40 60 is running at 400FPS, but on low end it reaches 20 or less which is unplayable.
I also use transparency layers (without parallax) so background layers start blending to a solid color for the sake of depth. which might not be so good on old GPUs/iGPUs
Like gertkeno said, what the Parallax2D node does is updates your child node’s position every frame and could be done on the lowest spec computer you could throw at it. For most cases, if your PC doesn’t slow down when you have 15 images on screen, putting them in 15 Parallax2D nodes won’t either.
What could cause a slowdown (and would with or without Parallax2D) is if you are trying to display a large number of incredibly large HD renderings and repeat them (possibly hundreds of times). From the screenshots though, it looks like you have very low resolution textures, but maybe use HD effects like lights (which are pretty expensive). There wouldn’t be a way around that though. Parallax2D’s pseudo-infinite repeat feature is the optimized alternative, since (if you set it up correctly) it should only repeat each image once rather than enough to cover your level.
If you show your setup, we may be able to determine where your performance bottleneck is if you’re having low framerate issues.
Have you tried compatibility mode for the lower end devices? I’m assuming integrated graphics or phones, those will get (some) better performance on OpenGL with Compatibility mode. Maybe reducing GPU effects like full screen shaders if any or GPU-particle nodes?