Skip to content

Instantly share code, notes, and snippets.


Dan Bechard dbechrd

View GitHub Profile
raysan5 /
Last active May 29, 2023 17:47
A small state-of-the-art study on custom 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 or Unity for their games (or that's what lot of people think) because d

View dx11minimal.cpp
//#include "matrix.cpp"
#include <windows.h>
#include <d3d11.h>
#include <dxgi.h>
#include <stdint.h>
#include <d3dcompiler.h>
#define assert(expr) if(!(expr)) { *((int *)0) = 0; }
#define invalidCodePath assert(false);
d7samurai /
Last active May 17, 2023 09:54
Minimal D3D11

Minimal D3D11

Minimal D3D11 reference implementation: An uncluttered Direct3D 11 setup & basic rendering primer / API familiarizer. Complete, runnable Windows application contained in a single function and laid out in a linear, step-by-step fashion that should be easy to follow from the code alone. ~215 LOC. No modern C++ / OOP / obscuring cruft. View on YouTube


Also check out Minimal D3D11 pt2, reconfigured for instanced rendering and with a smaller, tighter, simplified overall code structure, or Minimal D3D11 pt3, with shadowmapping + showcasing a range of alternative setup / rendering techniques.

fnky /
Last active May 29, 2023 12:54
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
rygorous / hb_stb_truetype.c
Last active January 23, 2023 06:09
View hb_stb_truetype.c
// ---- loading a font
static void load_font(void)
hb_blob_t *blob;
hb_face_t *face;
size_t filelen = 0;
void *filedata = stb_file("c:/windows/fonts/arial.ttf", &filelen);
if (filedata == 0) stbpg_fatal("Couldn't load font");
Reedbeta / cool-game-programming-blogs.opml
Last active May 23, 2023 18:24
List of cool blogs on game programming, graphics, theoretical physics, and other random stuff
View cool-game-programming-blogs.opml
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<title>Graphics, Games, Programming, and Physics Blogs</title>
<outline text="Tech News" title="Tech News">
<outline type="rss" text="Ars Technica" title="Ars Technica" xmlUrl="" htmlUrl=""/>
<outline type="rss" text="Polygon - Full" title="Polygon - Full" xmlUrl="" htmlUrl=""/>
<outline type="rss" text="Road to VR" title="Road to VR" xmlUrl="" htmlUrl=""/>
gafferongames / delta_compression.cpp
Last active May 12, 2023 17:15
Delta Compression
View delta_compression.cpp
Delta Compression by Glenn Fiedler.
This source code is placed in the public domain.
#include <stdint.h>
#include <stdio.h>
#include <assert.h>
#include <string.h>
bradwilson / get-hash.ps1
Created January 31, 2013 04:32
Hashing function for PowerShell
View get-hash.ps1
[string]$pattern = "*.*",
[ValidateSet("md5", "sha1", "sha256", "sha384", "sha512")]$algorithm = "sha1",
[Reflection.Assembly]::LoadWithPartialName("System.Security") | out-null
if ($algorithm -eq "sha1") {
$hashimpl = new-Object System.Security.Cryptography.SHA1Managed