Skip to content

Instantly share code, notes, and snippets.

View Calinou's full-sized avatar
🦄
______ is best pony.​

Hugo Locurcio Calinou

🦄
______ is best pony.​
View GitHub Profile
@Calinou
Calinou / dinosaur-planet-60-fps.md
Last active February 5, 2024 17:46
Running Dinosaur Planet at 60 FPS – instructions and caveats
@geekley
geekley / NonJoypads.gd
Last active January 15, 2024 12:30
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 for use in production code.
static var _Self: GDScript = (func() -> void:).get_object() as GDScript
@reduz
reduz / GPU_driven_renderer.md
Last active April 29, 2024 15:13
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.

@wheremyfoodat
wheremyfoodat / post.md
Last active March 18, 2024 19:05
Why having multiple emulators is good

Forenote: Most of the following is simply my point of view as an emulator developer. Various names are omitted for privacy reasons.

I usually write blog posts aimed at developers, but I'd like to make an exception just this once. For a lot of game consoles you have likely noticed that there's multiple emulators for said console. Even for more modern systems like the Nintendo 3DS, you've got several active emulators such as Citra, Mikage and Panda3DS, and some less active ones at the moment such as Corgi3DS. This has made many people in the emulation community ask "Why do emulator developers not simply collaborate"? Thus, I'd like to dedicate this post to answering this question as an emulator developer myself.

1) We actually do collaborate!

Even when we're working on different emulators, we very often collaborate and help each other. A lot of people don't know, since it usually happens ov

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 4, 2023 19:28
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`.
@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