Recent snippets Explore
Event-based game logic
Chromazu
A simple, but powerful, singleton script handles global game events.
Cell Texture from a TileMapLayer and Coordinates
Keith Jones
You can obtain obtain a tile's texture as an AtlasTexture directly from the TileMapLayer
Blender-like SpinBox V2 (DragBox)
enderprism
A SpinBox-like widget with a slider, infinite dragging and exponential value editing!
Await multiple signals (for dialogs)
enderprism
A utility function to help work with dialogs.
Blender-like ranged SpinBox
enderprism
A Blender-like slider in which you can also type numbers!
EventBus
Gamma
It probably works for your version, put in globals, bada bing
Godot and Third Party Credits Script
darkcanopy
A Credits class that takes the official Godot license url (which is accepted as proper credits) and allows you to click it ingame, as well as read third party licenses from text files and populate the file
Rolling cube
Kelvin van Hoorn
A code snippet for rolling a cube on its sides.
Easy Font Size Scaler
greenpixels
An autoload script that adds an easy adds dynamic scaling to all text in your project
Screenshot without freezing (more complex solution)
darkcanopy
An even more complex screenshot function that avoids the pipeline stall of get_texture.get_image()
Recent shaders Explore
spatial
Procedural Idyllic Slash
Ali
An extensive uber shader designed to produce (stylized) slash effects.
spatial
Texture-based rim lighting
darkcanopy
Rim lighting that has a texture for an object but also rim lighting to 'highlight' it.
Greyscale Shader WITH modulate
Saltlight Studio
This is a somewhat simple shader for greyscaling sprites, except with modulate and self-modulate still working
spatial
Procedural Slash
Ali
A shader effect for procedurally creating sword slashes and the like.
Canvas item
Palette swap
Unknown user
A shader that swaps colors
Canvas item
Simple quantization
Unknown user
Reduces the range of possible colours a pixel can take
Recent articles Explore
Smoothing with expDecay instead of lerp()
darkcanopy
Many developers use lerp() in a way that is not frame rate independent. Learn how to use expDecay as an alternative.
Basic state machine
PapaPandaGames
This article shows you how to implement a basic state machine in GDScript.
Set a project-wide custom theme
Bee
Save yourself the trouble of having dozens of manually specified themes and LabelSettings resources scattered across your project.
