2D Shaders for Game Development: Code a Lava Lamp in Godot

In this class, we'll create a digital lava lamp using shaders in the Godot Game Engine, a lightweight, free and open source game engine. The goal here is play and experimentation: there are tons of possibilities for your lava lamp; the project is extremely customizable (think: base shape, speed, colors and gradients, amount of goo, glow).

We’ll be writing our lava lamp code on a Sprite node in Godot’s shading language, which is very similar to GLSL, the widely used OpenGL shading language. At the end of the class, we’ll create a seamless GIF loop of your custom lava lamp in action to share to the project gallery. As a bonus, I’ll even show you how you can run your lava lamp on your desktop while you do other things.

This class serves as an introduction to 2D fragment shaders, which are often used in game development to achieve neat visual effects that run rapidly on the GPU via parallel processing, meaning many points are processed by the code individually and simultaneously. Being able to write shaders is a valuable skill that can add a lot of flair to your game projects, and after creating the lava lamp, you’ll have a good understanding of how they work!

How to Watch

Skillshare (includes free option)
  • If you don't have Skillshare Premium but want to get it, consider using my referral link for a free 14 days! You'll get 14 days free access to all of Skillshare (thousands of classes), and I'll earn $10 if you sign up.
  • If you already have a Skillshare Premium account, you can take the class there.
  • If you cannot access any of the above, you can redeem my class completely for free here. You will need a free Skillshare account, but do not sign up for a free trial—if it asks you to, come back and click the link again.
Web Monetization
  • Ensure you have an active Coil subscription. Then just scroll down! The class should load automatically.
If you run into any issues or there's anything else preventing you from taking the class, feel free to reach out (contact@innkeepergames.com).

Continue reading with a Coil membership.