0 votes

For my game, I need to render what is basically some pixel art where the user needs to be able to click on and interact with each pixel. The pixels will not move but I would like to have them as something other than a static image in order to apply effects to each one. Currently, my approach is to simply have a node for each one. Is there a better way to do this for something around the size of 500 x 500 pixels or larger?

in Engine by (43 points)

1 Answer

+2 votes

You can use the Image class' manipulation functions for this, like set_pixel(). See how Pixelorama does it, for instance.

by (11,917 points)

Thank you for that example but do you know of any alternatives to an image based solution? I would like the flexibility that nodes provide.

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 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 webmaster@godotengine.org with your username.