Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Layer - Setting to enable/disable "Sorting when Z Elevation changes" #379

Open
2 tasks done
Jase0000 opened this issue Oct 1, 2024 · 0 comments
Open
2 tasks done

Comments

@Jase0000
Copy link

Jase0000 commented Oct 1, 2024

Reviewed guidelines

  • I have read and understand the suggestion guidelines

Checked for duplicate suggestions

  • I checked for existing similar suggestions

Summary

This suggestion came from the knowledge of the following "bug" which is, to be fair, not a bug, just the way Construct 3 operates, and for good reason:
Scirra/Construct-bugs#7604

Z elevation changes are expensive due to C3 needing to sort objects upon a Z change. It would be excellent if we could opt to enable/disable this via a setting per layer.

For my very specific case, I am making a 2D game but utilised 3D camera on its release, and decided to permanently incorporate this into my project primarily for 3D backgrounds. To make a snazzy depthy background, lets say a space starfield with sprites that move towards the player, this is achievable at lower object counts, but the more stars the better atmosphere this provides, but too many stars, the performance hit occurs.

I have other 3D background desires that would heavily use Z elevation (don't wanna just keep things flat, want to utilise the 3D atmosphere!)

I can imagine great potential for other uses beyond this, especially with those brave enough to tackle a fully-3D game.
I figure with auto-sorting disabled, developers can manage this themselves in very specific ticks and optimise much better.

Possible workarounds or alternatives

Whilst haven't tried, I suppose redesigning my game at a different orientation could allow me to use X and Y positioning for the objects moving closer.

I feel there is not many workarounds for other use-cases beyond my own.

Proposed solution

Setting to enable/disable "Sorting when Z Elevation changes"

Why is this idea important?

I feel giving fine control over this, without harming regular 2D games, would be greatly beneficial, especially for those looking to optimise.

Additional remarks

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant