Shadowy Godot Experiment
I have spent all of 2 hours with the Godot Engine, and I LOVE IT.
I was reluctant at first, because of all the time I've invested in figuring out Unity and sorting things in that. So when I wanted to play around with a 2D light/shadow game, I started searching for how to do it in Unity.
No immediate answers popped up at me (maybe I didn't know the right key terms), but there were plenty of posts about writing shaders to achieve it. There were some posts about plugins which only work with Unity Pro (but admittedly, they were quite old). And a really old post where someone had written their own plugin.
This blog post was particularly interesting as it outlined an algorithm for nice-looking shadows.
However, I wasn't looking for how to do beautiful shadows. I was looking for a way of experimenting with them.
So I searched for 2D shadows in Godot. And I found a very brief chain about the example project showing exactly how to do it.
Sure, I had a little bother trying to learn the Godot interface, but nothing too major. After a couple of hours of tweaking and learning the basics of GDScript (and with a little help from Stephen Challener (Redshrike) and Jetrel via OpenGameArt for some dummy graphics), I had a working tech demo.
Another short search to find out how to export to HTML5, and here is a shot of the result!
The cursor keys move the spotlight around, and there's a test object to produce the shadows. Nice!
I was reluctant at first, because of all the time I've invested in figuring out Unity and sorting things in that. So when I wanted to play around with a 2D light/shadow game, I started searching for how to do it in Unity.
No immediate answers popped up at me (maybe I didn't know the right key terms), but there were plenty of posts about writing shaders to achieve it. There were some posts about plugins which only work with Unity Pro (but admittedly, they were quite old). And a really old post where someone had written their own plugin.
This blog post was particularly interesting as it outlined an algorithm for nice-looking shadows.
However, I wasn't looking for how to do beautiful shadows. I was looking for a way of experimenting with them.
So I searched for 2D shadows in Godot. And I found a very brief chain about the example project showing exactly how to do it.
Sure, I had a little bother trying to learn the Godot interface, but nothing too major. After a couple of hours of tweaking and learning the basics of GDScript (and with a little help from Stephen Challener (Redshrike) and Jetrel via OpenGameArt for some dummy graphics), I had a working tech demo.
Another short search to find out how to export to HTML5, and here is a shot of the result!
The cursor keys move the spotlight around, and there's a test object to produce the shadows. Nice!
Comments
Post a Comment