Posts

Showing posts with the label Godot

Godot Tutorial: How to read all files in EVERY sub directory (Breadth/Depth first Search)

Image
Godot Tutorial: How to read all files in EVERY sub directory (Breadth/Depth first Search)     Hey all, So I was thinking of writing some automated smoke tests in Godot for a project I'm working on and I realized, I don't think I've ever done directory I/O in Godot. - The tools is so well integrated that I've never really had to mess with it yet. - I'm willing to bet many of you guys haven't either. - Don't worry it's easy, lets get into it. You'll learn: - How to read all files in a directory to process however you'd like - How to use Depth First Search - How to use Breadth First Search - The order that both search styles will traverse a tree Code From Tutorial: How to use: - Create a "Node" type of Godot Node    - Note in Video I used Node2D which is OK, but slighly better to use plain Node since no 2D coords etc are needed - Attach this script to that Node: https://gist.github.com/Razzlegames/28dcb74ba...

Creating a Fake Refraction, Bubble Shader for your 2D Godot Game!

Image
Video Version Asset Creation : https://www.youtube.com/watch?v=udbPym1JjkY&t=192s Shaders: https://www.youtube.com/watch?v=-W_2OzjnUl4 OK so you have that cool 2D Bubble Bobble inspired game but you want to add some modern flare?  Or maybe you just got some random pixel assets you'd like to experiment with adding fake "refraction" too?  I've got you covered!   Cheaters that don't want to read? You when you don't read this tutorial For cheaters, here's the code, right away, to play with : https://github.com/Razzlegames/GodotBubbleShaderTutorial Refrac-What? So what is refraction?  In simple terms light bends and changes direction as it goes from one medium to another. For example when it passes through water in a glass, it slows down and changes direction causing a distorted appearance to anyone looking through the glass.  Different materials have different refraction amount, and the angle and effect is more pronoun...