Skip to content

Instantly share code, notes, and snippets.

@TheCherno
TheCherno / GameEngineDoc.md
Last active November 6, 2026 06:57
GameEngineDoc - AI Game Engine spec

AI Game Engine

We're building a production-grade, simple and straight-forward 3D Game Engine for Windows, macOS and Linux (Ubuntu 24+). This is professional-grade software that needs to be stable, fully-tested, and real-world deployable. No hacks, no shortcuts - solid as a rock.

Dev Workflow

  • Ask questions only when absolutely necessary - work autonomously
  • IMRORTANT! DO NOT look outside of working directory or use other code on my computer as reference
  • Start by asking question to determine engine name. Suggest a few
  • Testing is of the utmost importance - use lots of unit tests (any framework, simple is good), run automated testing
  • Setup a scene used for testing, which tests every single feature in the engine - all components, and entire scripting API
@TheCherno
TheCherno / Timer.h
Created October 21, 2024 03:45
Timer
#include <chrono>
class Timer
{
public:
Timer() { Reset(); }
void Reset() { m_Start = std::chrono::high_resolution_clock::now(); }
float Elapsed() const { return std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::high_resolution_clock::now() - m_Start).count() * 0.001f * 0.001f; }
float ElapsedMillis() const { return std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::high_resolution_clock::now() - m_Start).count() * 0.001f; }
private:
@TheCherno
TheCherno / Instrumentor.h
Last active October 23, 2026 14:41
Basic Instrumentation Profiler
//
// Basic instrumentation profiler by Cherno
// Usage: include this header file somewhere in your code (eg. precompiled header), and then use like:
//
// Instrumentor::Get().BeginSession("Session Name"); // Begin session
// {
// InstrumentationTimer timer("Profiled Scope Name"); // Place code like this in scopes you'd like to include in profiling
// // Code
// }
@TheCherno
TheCherno / SparkyMarch2016ReleaseNotes.txt
Last active March 30, 2016 11:28
Sparky March 2016 Release Notes
==================================
Sparky March 2016 Release Notes
==================================
Major New Features:
- Sparky now supports Physically-Based Rendering (PBR)
- Sparky now supports rendering in both OpenGL and Direct3D 11
- Custom 3D model format (SPM - Sparky Model)
- Build tool for converting from Autodesk FBX to SPM
- Custom memory allocation and control