Skip to content

Instantly share code, notes, and snippets.

View Calinou's full-sized avatar
🦊

Hugo Locurcio Calinou

🦊
View GitHub Profile
@Calinou
Calinou / dinosaur-planet-60-fps.md
Last active August 19, 2024 05:16
Running Dinosaur Planet at 60 FPS – instructions and caveats
@geekley
geekley / NonJoypads.gd
Last active October 3, 2025 14:22
Fix false positives in Godot joypad device detection (e.g. touchpads). See https://github.com/godotengine/godot/issues/59250#issuecomment-1786196830
# Public domain, as per The Unlicense. NO WARRANTY. See https://unlicense.org
extends Node
## Solves a [url=https://github.com/godotengine/godot/issues/59250]bug[/url] where touchpad devices
## can be detected as a joypad.
##
## This script should be autoloaded in the project settings.
## This is merely a workaround, not intended for use in production code.
func _enter_tree() -> void:
@reduz
reduz / GPU_driven_renderer.md
Last active June 1, 2025 20:02
GPU Driven Renderer for Godot 4.x

GPU Driven renderer design for Godot 4.x

Goals:

The main goal is to implement a GPU driven renderer for Godot 4.x. This is a renderer that happens entirely on GPU (no CPU Dispatches during opaque pass).

Additionally, this is a renderer that relies exclusively on raytracing (and a base raster pass aided by raytracing).

It is important to make a note that we dont want to implement a GPU driven renderer similar to that of AAA/Unreal, as example.

During the past days, this great article by Sam Pruden has been making the rounds around the gamedev community. While the article provides an in-depth analysis, its a bit easy to miss the point and exert the wrong conclusions from it. As such, and in many cases, users unfamiliar with Godot internals have used it points such as following:

  • Godot C# support is inefficient
  • Godot API and binding system is designed around GDScript
  • Godot is not production ready

In this brief article, I will shed a bit more light about how the Godot binding system works and some detail on the Godot

@HungryProton
HungryProton / autosmooth.gd
Last active July 8, 2023 14:46
Autosmooth meshes in GDScript
class_name MeshUtils
static func auto_smooth(mesh: Mesh, threshold_degrees := 30.0) -> Mesh:
var result := ArrayMesh.new()
var threshold := deg_to_rad(threshold_degrees)
var sanitized_mesh := merge_duplicate_vertices(mesh)
# Auto smooth each surfaces.
@Calinou
Calinou / gd-pr-test.sh
Last active October 23, 2025 23:15
Test a Godot pull request locally
#!/usr/bin/env bash
#
# Tests a Godot pull request locally, given an URL to a pull request (or its
# number) and a path or URL to a testing project. This script can also be used
# to confirm Godot bug reports locally using "master" as the first argument.
#
#### Installation
#
# Save this script to a file in your PATH (such as `/usr/local/bin/gd-pr-test`),
# then make the file executable using `chmod +x /path/to/script`.
@XenoPanther
XenoPanther / Windows ReFS versions.en.md
Last active October 21, 2025 14:09 — forked from 0xbadfca11/00_README.md
Windows ReFS versions

Version number is reported by fsutil fsinfo refsinfo, available on Windows 10 and Windows Server 2016.

ReFS 1.1

  • Version of formatted by Windows Server 2012.
  • Version 1.1 is used already in Windows Server 8 Beta. I have never seen version 1.0.
  • Can use and store alternate data streams, when mount on 8.1/2012 R2 or later.

ReFS 1.2

  • Version of formatted by Windows 8.1, Windows 10 v1507 to v1607, Windows Server 2012 R2, and when specified ReFSv1 on Windows Server 2016 or later.
  • Cannot use alternate data streams, when mount on 2012.
@Calinou
Calinou / game.c
Created January 12, 2023 03:21
Dirt Rally Linux fix (source: https://news.ycombinator.com/item?id=25818126)
// Source: <https://news.ycombinator.com/item?id=25818126>
//
// Instructions:
// 1. Paste contents of this file to a new file called "game.c" within your home folder.
// 2. Open a terminal, install GCC from distribution repositories and compile this source file: gcc game.c -shared -o game.so
// 3. Move game.so to the same folder as the DirtRally binary (within the bin/ folder, not DirtRally.sh).
// Use Manage > Browse Local Files on Dirt Rally to reach this folder, then enter the bin/ folder.
// 4. Modify Steam launch options: LD_PRELOAD=./game.so %command%
// 5. Run the game on Steam.
#include <sys/mman.h>
@Calinou
Calinou / chdize.sh
Last active January 2, 2023 21:19
Compress ISO/CUE files to CHD on a remote filesystem accessible via SFTP/SSH
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'
# Compresses ISO/CUE files to CHD on a remote filesystem accessible via SFTP/SSH.
# Source ISO files on the remote host are not removed after conversion
# (you have to do this manually if desired).
#
# chdman must be installed (it's typically packaged as `mame-tools`).
# If it's not in your distribution repositories, build
@Calinou
Calinou / master.pl
Created December 14, 2022 01:56
Cube 1 master server perl script (downloaded from https://hyphe.myzel.net/hungerburg/masterserver)
#!/usr/bin/perl -w
##
## cube masterserver
## (c) 2004, Hungerburg, License same as Cube (z-lib)
##
=cut
Changes