
shader_type canvas_item;
uniform vec4 shine_color : source_color = vec4(1.0);
uniform float shine_progress : hint_range(0.0, 1.0, 0.01) = 0.0;
uniform float shine_size : hint_range(0.01, 1.0, 0.01) = 0.1;
uniform float shine_angle : hint_range(0.0, 89.9, 0.1) = 45.0;
float scale(float value, float inMin, float inMax, float outMin, float outMax) {
return (value - inMin) * (outMax - outMin) / (inMax - inMin) + outMin;
}
void fragment() {
//COLOR = texture(TEXTURE, UV);
float slope = tan(radians(shine_angle));
float progress = scale(shine_progress, 0.0, 1.0, -1.0 - shine_size - shine_size * slope, 1.0 * slope);
float shine = step(slope * UV.x - UV.y, progress + shine_size + shine_size * slope) - step(slope * UV.x - UV.y, progress);
COLOR.rgb = mix(COLOR.rgb, shine_color.rgb, shine * shine_color.a);
}
shader_type canvas_item;
// Ranges from 0 to 1 over the course of the transition.
// We use this to actually animate the shader.
uniform float progress : hint_range(0, 1);
// Size of each diamond, in pixels.
uniform float diamondPixelSize = 10.0;
void fragment() {
float xFraction = fract(FRAGCOORD.x / diamondPixelSize);
float yFraction = fract(FRAGCOORD.y / diamondPixelSize);
float xDistance = abs(xFraction - 0.5);
float yDistance = abs(yFraction - 0.5);
if (xDistance + yDistance + UV.x + UV.y > progress * 4.0) {
discard;
}
}
Do you have a solid foundation in Godot 4 and want to take the next step toward building more complete and professional games?
Master Godot 2D: Create an RPG-Style Game with Godot is designed specifically for those who already understand the fundamentals of Godot and want to level up by building more advanced, organized, and reusable systems.
In this course, you’ll learn how to build a complete RPG-style game from scratch, packed with engaging mechanics. RPGs are generally one of the most complex genres to develop. In this course, you’ll learn how to tackle the hardest parts in the simplest way.
Throughout the course, you will learn how to:
Play animations based on movement
Create a Finite State Machine (FSM) system
Build a health system
Design levels using TileMaps
Automate TileMaps with rules
Create interactive panels
Master UI creation
Build a complete inventory system
Add an equipment system
Create custom items
Update player stats using attributes
Create enemy zones (enemy spawners)
Develop enemy AI using states
Build an enemy loot system
Create skills with unique effects
Equip skills using a hotbar
Add NPCs to the world
Implement NPC movement
Create a dialogue system
Build a complete shop system
Build a complete crafting system
Build a complete quest system
Master Autoloads
Create an audio system
Write clean, scalable code applicable to your own projects
Master nodes, signals, composition, and scene inheritance
Design a solid and flexible architecture
Each section is carefully designed to strengthen your programming logic and help you understand how to structure professional-level projects in Godot.
If you already know the basics of Godot and are ready to build a complete and polished RPG, this course will give you the tools to make it happen.