The Godot Q&A is currently undergoing maintenance!

Your ability to ask and answer questions is temporarily disabled. You can browse existing threads in read-only mode.

We are working on bringing this community platform back to its full functionality, stay tuned for updates.

godotengine.org | Twitter

0 votes

I am making a 2D online multiplayer game that uses large backgrounds with the same mindset as early pre-rendered 3D backgrounds. With 4096x3072 being my game's standard. However, I would like to expand some areas horizontally. With a potential size of up to extra 1024 pixels on the left and right each. Thus, I can not avoid using multiple images.

Displaying large sprites may be wasteful, I am looking for the most efficient (but simple) solution to optimize large backgrounds. Is it even necessary?

These are my ideas:

1) Dynamically create a tileset with tiles being 256x256 squares of the full background, and populate a tilemap node. (automatically, with GDScript code).

2) Use sprite nodes, but use dynamically created AtlasTextures instead. (This may be the worse option, I am not sure however)

The priority here is to make it efficient and to not render things off-screen.

I also have objects that are rendered above the backgrounds. those can be of any size. Because of this reason, I would like to know if I can rely on Godot to cull them automatically or if I need to do this myself.

This can be taken from both Godot 3 and Godot 4 feature set. I plan on switching to Godot 4 when it's reasonable.

Any help is welcome.

in Engine by (14 points)

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.