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
@raysan5
raysan5 / custom_game_engines_small_study.md
Last active October 12, 2025 19:14
A small state-of-the-art study on custom engines

CUSTOM GAME ENGINES: A Small Study

a_plague_tale

WARNING: Article moved to separate repo to allow users contributions: https://github.com/raysan5/custom_game_engines

A couple of weeks ago I played (and finished) A Plague Tale, a game by Asobo Studio. I was really captivated by the game, not only by the beautiful graphics but also by the story and the locations in the game. I decided to investigate a bit about the game tech and I was surprised to see it was developed with a custom engine by a relatively small studio. I know there are some companies using custom engines but it's very difficult to find a detailed market study with that kind of information curated and updated. So this article.

Nowadays lots of companies choose engines like [Unreal](https:

@jshorty
jshorty / snapshot_sprite.gd
Created April 5, 2020 08:29
Sprite that "snapshots" a Polygon2D for rendering performance
extends Sprite
# This dictates the size of the viewport used for the "snapshot".
export var source_image_size : Vector2
export var polygon : PoolVector2Array
func _ready():
var viewport_container = ViewportContainer.new()
viewport_container.set_size(source_image_size)
add_child(viewport_container)
@Calinou
Calinou / clang-format.sh
Created March 3, 2020 14:50
Portable shell script to format all files in a folder recursively using clang-format
#!/usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'
find . \( -name '*.cpp' -o -name '*.hpp' -o -name '*.c' -o -name '*.h' \) \
-exec clang-format -i {} \;
@Calinou
Calinou / fade-to-black.sh
Created January 11, 2020 17:13
Generate a set of PNG frames that fade towards black
#!/bin/bash
START=599
for i in {600..700}; do
brightness="$((700-i))"
convert "$START.png" -modulate "$brightness%" "$i.png" &
done
@HungryProton
HungryProton / shader_cache.gd
Last active February 18, 2025 15:25
Godot shader cache hack
extends Spatial
var _materials := []
var _process_materials := []
var _count := 0
func _ready() -> void:
_find_all_materials("res://")
print(_process_materials)
@cart
cart / FXAA.tscn
Last active August 30, 2025 17:00
Godot Nvidia FXAA 3.11 Port
[gd_scene load_steps=3 format=2]
[sub_resource type="Shader" id=1]
code = "shader_type canvas_item;
// Godot Nvidia FXAA 3.11 Port
// Usage: Drop this in to any 3D scene for FXAA! This is a port of the \"PC High Quality Preset 39\". However the medium quality
// parameters are also included. For medium quality, just comment out sections \"PS 6\" and above and uncomment the \"med 13\" variables.
@Calinou
Calinou / godot-init
Last active August 31, 2025 02:14
Scripts to initialize and edit a Godot project for quick testing
#!/usr/bin/env bash
#
# For Linux and macOS.
# The Godot editor must be in your `PATH` as `godot` for this script to work.
# Licensed under CC0 1.0 Universal.
set -euo pipefail
IFS=$'\n\t'
if [[ ! "${1:-}" || "${1:-}" == "--help" || "${1:-}" == "-h" ]]; then
@clayjohn
clayjohn / cube-to-panorama.glsl
Created April 9, 2019 02:13
Convert cubemap to panorama in Godot
shader_type canvas_item;
uniform sampler2D front;
uniform sampler2D left;
uniform sampler2D right;
uniform sampler2D back;
uniform sampler2D top;
uniform sampler2D bottom;
void fragment() {
@Calinou
Calinou / update-godot-3.x.sh
Last active November 11, 2023 18:52
Update, build and install Godot from source on Linux
#!/usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'
SCONS_FLAGS=(
"lto=full"
"progress=no"
"debug_symbols=no"
)
@jakub-g
jakub-g / async-defer-module.md
Last active October 9, 2025 12:15
async scripts, defer scripts, module scripts: explainer, comparison, and gotchas

<script> async, defer, async defer, module, nomodule, src, inline - the cheat sheet

With the addition of ES modules, there's now no fewer than 24 ways to load your JS code: (inline|not inline) x (defer|no defer) x (async|no async) x (type=text/javascript | type=module | nomodule) -- and each of them is subtly different.

This document is a comparison of various ways the <script> tags in HTML are processed depending on the attributes set.

If you ever wondered when to use inline <script async type="module"> and when <script nomodule defer src="...">, you're in the good place!

Note that this article is about <script>s inserted in the HTML; the behavior of <script>s inserted at runtime is slightly different - see Deep dive into the murky waters of script loading by Jake Archibald (2013)