Skip to content

Instantly share code, notes, and snippets.

View hiulit's full-sized avatar
💻
Working

hiulit

💻
Working
View GitHub Profile
@AnidemDex
AnidemDex / flow_container.gd
Last active April 24, 2022 16:27
Node Container that wraps its childs nodes in its rect
tool
extends Container
#class_name FlowContainer
## Modified version of
## https://github.com/godotengine/godot/pull/56104 to be used in versions previous 3.5
## by AnidemDex
## Use it as you want
@alexymik
alexymik / config.txt
Created June 15, 2021 19:54
Raspberry Pi PI2SCART config.txt Display Settings
# Edit your config.txt on SD Card to
disable_audio_dither=1
dtparam=audio=on
dtoverlay=vga666
enable_dpi_lcd=1
display_default_lcd=1
dpi_group=2
dpi_mode=87
hdmi_timings=320 1 16 30 34 240 1 2 3 22 0 0 0 60 0 6400000 1 #240p
@Sephirothphoenix
Sephirothphoenix / Crystal.shader
Created February 25, 2021 05:58
Robe Shaders (Golden Scythe, Godot)
shader_type canvas_item;
void fragment() {
// Color of the current pixel
vec4 oC = texture(TEXTURE, UV);
// Get the difference between the current pixel color and the color to replace, and replace the color
// Exterior Main
if (max(max(max(abs(oC.r - 0.408), abs(oC.g - 0.282)), abs(oC.b - 0.471)), abs(oC.a - 1.0)) <= 0.01){oC = vec4(
@jordanlis
jordanlis / godot_2d_wind_shader.txt
Last active January 21, 2021 01:52
godot 2D wind shader
// original wind shader from https://github.com/Maujoe/godot-simple-wind-shader-2d/tree/master/assets/maujoe.simple_wind_shader_2d
// original script modified by HungryProton so that the assets are moving differently : https://pastebin.com/VL3AfV8D
//
// speed - The speed of the wind movement.
// minStrength - The minimal strength of the wind movement.
// maxStrength - The maximal strength of the wind movement.
// strengthScale - Scalefactor for the wind strength.
// interval - The time between minimal and maximal strength changes.
// detail - The detail (number of waves) of the wind movement.
// distortion - The strength of geometry distortion.
shader_type canvas_item;
render_mode blend_mix;
uniform float noiseSize : hint_range(0, 50) = 15.0;
uniform float speed : hint_range(-10.0, 10.0);
uniform float albedo : hint_range(0.0, 1.0) = 0.7;
float rand(vec2 coord) {
return fract(sin(dot(coord, vec2(35, 62)) * 1000.0) * 1000.0);
}
@cenullum
cenullum / circle.shader
Created October 18, 2020 16:30
Godot Engine Circle with Outline Color Shader
shader_type canvas_item;
uniform vec4 outline_color:hint_color = vec4(1.0,1.0,0.0,1.0);
uniform float inner_circle=0.45;
uniform float outer_circle=0.5;
const vec4 alpha_color= vec4(0,0,0,0);
uniform float smoothness=0.01;
@securas
securas / block_tileset.gd
Created August 6, 2020 15:02
A custom godot autotiler for blocks
tool
extends TileSet
const EMPTY_AUTOTILE = Vector2( 4, 0 )
var block_tiles = [ "blocks" ]
func _forward_subtile_selection(autotile_id : int, _bitmask : int, tilemap : Object, tile_location : Vector2 ):
if block_tiles.find( tile_get_name( autotile_id ) ) < 0:
@sonicprod
sonicprod / RPi4.MAME.Appliance.md
Last active September 24, 2025 15:05
How to make a dedicated MAME Appliance on a Raspberry Pi 4B | Comment réaliser un système MAME dédié sur un Raspberry Pi 4/Pi 400

How to make a dedicated MAME Appliance on a Raspberry Pi 4/Pi 400

Note: the following steps are written in French. Feel free to translate to English.

However, please take notice that if you copy the scripts on this page from the version translated into English by Google Translate, it is possible that extra characters may appear within some scripts (this is caused by Google Translate), resulting in corruption of the impacted scripts. Consequently, it is better to copy the scripts from the original French version of this page.

Comment réaliser un système MAME dédié sur un Raspberry Pi 4/Pi 400

@keztricks
keztricks / gbdc_mac_dev.md
Last active August 10, 2025 10:45
Developing in gbdc on Mac

I've been following GamingMonsters's gbdk Gameboy Dev tutorial (it's rad! https://www.youtube.com/playlist?list=PLeEj4c2zF7PaFv5MPYhNAkBGrkx4iPGJo).

Was doing this for my own reference, but thought I may as well flesh out & share I'm on MacOS, so have put together anywhere I've had to do something different, I'm up to Session 10, so will update if anything further comes along as we progress.

Quick heads up, before you run anything here make sure you know what it's doing, this all worked fine and dandy for me, but I'm not making any promises!

"Hello World" - Part 1

Installing gdbk

@CowThing
CowThing / pixel_perfect.gd
Last active August 24, 2025 04:53
Pixel perfect scaling script for Godot 3.1
extends Node
"""
An autoload singleton for pixel perfect rendering of the game.
Set this script as an autoload.
`base_size` - Is the target size of the viewport. The viewport will scale up to fit the largest
possible integer multiple of this size within the window.
`expand` - If true the viewport will expand to the edges of the window after scaling up.