Skip to content

Instantly share code, notes, and snippets.

@acbart
acbart / common_jupyter_header.py
Last active August 7, 2023 16:07
Common Jupyter Header
## Generally useful built libraries
import sys
import os
import json
import math
import re
import itertools
from collections import defaultdict
from dataclasses import dataclass
from datetime import timedelta, datetime
@craftablescience
craftablescience / dbg.h
Last active September 8, 2023 20:00
Debug printer for all C types, C arrays (1D and 2D), standard container types, and std::pair.
#pragma once
#include <iostream>
#include <string>
template<typename T, std::enable_if_t<!std::is_class_v<T> || std::is_same_v<T, std::string>, bool> = true> std::string debug_internal(const T& value, bool printPrefix = true) {
std::string prefix;
if constexpr (std::is_pointer_v<T>) {
if (printPrefix) prefix = "-> ";
if (!value) return prefix + "NULL";
if constexpr (std::is_convertible_v<T, std::string>) return prefix + '\"' + value + '\"';
else return prefix + debug_internal(*value, false);
@raysan5
raysan5 / custom_game_engines_small_study.md
Last active January 7, 2026 20:51
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:

@xeekworx
xeekworx / sdl_nanovg_example.cpp
Last active April 19, 2025 05:00
SDL + GLAD + OpenGL + NanoVG Example in C++
#include <SDL.h>
#include <glad\glad.h>
#include <nanovg.h>
#define NANOVG_GL3_IMPLEMENTATION
#include <nanovg_gl.h>
#include <nanovg_gl_utils.h> // For framebuffer utilities not shown in this code
#include <string>
#include <iostream>
#include <iomanip> // for setw