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 was experimenting with Godot to create an isometric (2D) RTS game visually similar to the early command & conquer franchise. Since light should become an important aspect in my game, I created a little stresstest with a simple tank-model, which consists of a KinematicBody2D, it's CollisionShape2D, an AnimatedSprite (with an animation /1 sprite for each of the 8 movement directions) and a Light2D to create a nice lighting around the unit, similar to the isometric demo.

On my notebook, which has no dedicated GPU and a quite old CPU the framerate drops after adding only 20 tank scenes. My friends notebook can handle 160 of those, which seems okayish, but not what I'm aiming for.

So here comes my question: Is there any more feasible way to achieve this lighting effect? I was thinking about some screen-overlay - like the canvas modulate I use - where I'll stencil out the ellipses of lighting for each frame and unit on screen.
I was wondering if that's possible using shaders, but I guess it's not, since all of the unit's shader materials would have to work on one instance of the overlay - and I really don't know if that's possible.

Any help would be appreciated!

in Engine by (12 points)

Maybe some additional information: I don't really want to create shadows or use any LightOccluders with this kind of light. Also an area which is luminated by multiple "lights" doesn't have to be more lit, than the area of a single light source. Coloured lights would be a huge plus.

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.