Articles
-
Course · C++
What new and delete actually do
How the new/delete expressions in C++ differ from malloc/free: constructor and destructor calls, operator new/delete and working with raw memory — with an assembly walkthrough. A free lesson from the course “C++ without Memory Allocations”.
-
Course · C++
How a vtable works
How a C++ compiler implements virtual functions: the hidden vptr, the vtable and dynamic dispatch — with a hand-rolled implementation of the mechanism using function pointers. A free lesson from the course “C++ without Memory Allocations”.
-
Course · C++
STL associative containers
STL associative containers: set, map, multiset and multimap — how they differ, when keys are unique and when they repeat, with short examples. A free lesson from the course “C++ without Memory Allocations”.
-
Course · C++
Heap vs stack tradeoffs
Heap vs stack: determinism, fragmentation, binary size and memory footprint — why in games and on consoles it pays to minimize the heap. A free lesson from the course “C++ without Memory Allocations”.
-
Abnormal programming
Squeezing a Megacity Down to iPhone 4 Size
The engineering underbelly of mobile SimCity BuildIt: how EA (and the St. Petersburg studio EA SPB) crammed a desktop city builder into an iPhone's 100–300 MB of RAM — a server-authoritative economy on timers, a "dumb" client-terminal, aggressive batching and texture atlases, a TBDR renderer with preview sectors, a gutted simulation with sprite traffic jams, power as Capacity − Demand, and a "classified-ads" market. Plus photos from the closing of EA's office in 2016.
-
Abnormal programming
A field guide to other people's STLs
A tour of the alternative "standard" C++ libraries from game studios and big companies: EASTL and its best practices, LLVM SmallVector/DenseMap, Folly and the anatomy of fbstring (SSO, eager copy, COW, and the jemalloc pairing), boost flat_map, Zmeya's serializable containers, Adobe's Stlab and value-oriented programming — why each appeared and where you can hurt yourself on it.
-
Abnormal programming
C++101 (Part 1)
A catalog of ~100 C++ idioms and techniques that grew out of the Game++ section. Part 1: resources and compilation — RAII, scope guard, copy-and-swap, smart pointer, copy-on-write, Pimpl and Fast Pimpl, interface class, include/inline/export guards, CRTP, Barton-Nackman, EBO, and metafunction.
-
Abnormal programming
C++101 (Part 2)
Part 2: metaprogramming and templates — traits, tag dispatching, int-to-type, type selection, SFINAE and enable-if, member detector, policy-based design, type erasure, thin template, named template parameters, expression templates and result_of, plus named and computational constructors and base-from-member.
-
Abnormal programming
C++101 (Part 3)
Part 3: initialization, polymorphism, and containers — calling virtuals during init, construction tracker, NVI and thread-safe interface, acyclic visitor, covariant return types, virtual friend function, algebraic hierarchy, polymorphic value types, functors, iterator pair, generic container, erase-remove, safe bool, and attorney-client.
-
Abnormal programming
C++101 (Part 4)
Part 4: friendship, object memory, and modern C++ — non-member non-friend, SOO/SSO, prohibiting heap, execute-around pointer, temporary proxy, nullptr, move constructor, boost mutant, deprecate and delete, function poisoning, rule of zero/three/five, most vexing parse, pass-key, and the spaceship operator.
-
Abnormal programming
How game GUIs get rewritten (Part 2)
The sequel: game UI architecture along six independent axes — placement relative to the world (diegetic / HUD / meta / spatial / narrative, from Metroid Prime and Dead Space to Spec Ops and Hellblade), function, in-memory storage (scene graph, flat list, immediate mode, ECS), data flow (MVC/MVVM, reactive, unidirectional, data binding), layout (constraint, flexbox, anchors, RIMD), and rendering (canvas, layer, SDF, GPU-driven). Part 2.
-
Abnormal programming
Why game GUIs get rewritten (Part 1)
The architecture of a game UI and why it's rewritten from project to project: a control tree as Composite, properties with reflection, decoupling from game code via bindings, prototype templates long before Unity Prefab, three handler levels, shape-based hit testing, synchronous messages, layout and 9-slice, integer coordinates, a Bridge over the renderer, styles as CSS, the pain of localization, SDF fonts, and diegetic UI (Dead Space, Doom, Metro). Part 1.
-
Craft
On the "random" people in IT
A reply to the claim that "without a relevant degree, don't even bother trying to get into IT": the history of the game industry as a history of lawyers, homemakers, pilots, ushers, and canned-bean exporters. From Gary Gygax and D&D to Miyamoto, Iwatani, Roberta Williams, Will Wright, Kojima, Molyneux, Miyazaki, Notch, Eric Barone, and Davey Wreden — people with no relevant experience who built everything you've played.
-
Craft
Why Soviet programmers didn't make GTA
Why the country that designed the Buran, the Tu-160, and nuclear icebreakers never made a Western-level mass-market game: a game as a large engineering task, where talented developers come from, back-of-the-envelope arithmetic for the socialist bloc, Silicon Valley's global "talent vacuum cleaner", a tour of post-Soviet gamedev from Tetris and Vangers to S.T.A.L.K.E.R., Atomic Heart, and War Thunder — and why a "Russian Unreal" can't be conjured up on command.
-
Abnormal programming
The resource manager
Why a resource manager is not a singleton but a whole engine subsystem: resource identity as a (source + parameters) pair, a cache with weak references and LRU, explicit and implicit parameters, targeted reload and hot-reload, recovery after device lost from D3D9 pools to DX12/Vulkan, a shared templated base for managers, and changing graphics settings without a restart — with examples from Unreal, Unity, Source, id Tech, Godot, No Man's Sky, and Cyberpunk.
-
Abnormal programming
Architectural trade-offs in game development
A big breakdown of architectural patterns and trade-offs in gamedev: layers, metalayers, subsystems, pipes & filters, microkernel, and blackboard with examples from Source, CryEngine, Unreal, id Tech, and Naughty Dog; design strategies (top-down/bottom-up/constant refactoring), the push vs pull axis, scripting languages, and rethinking GoF in modern game C++.
-
Craft
Three in a boat, poverty and dogs
An honest look at the state of the game industry in 2026: indies running on enthusiasm and options, service-game casinos, remasters of remasters, developers migrating into "subsidiaries" for a paycheck, and gamedev as the art of negotiating with yourself — where we're all in one leaky boat.
-
C++
The disobedient using
Why using namespace and ADL make name lookup in C++ unpredictable: argument-dependent lookup and operator<<, hijacking std with a local substitute, checking function viability, the ranks of implicit conversions, and why =delete functions take part in overload resolution as full-fledged candidates.
-
Craft
About 10x programmers
Do 10x programmers exist, or is it a startup myth and a manager's dream: five real types of "fast" developers — the person fused with the project, the one who writes less code, DoItProperlyMan, narrow expertise, and the focus myth — and why 10x is always about accumulated context, not an innate coefficient.
-
Performance
How memory works in game consoles
A history of game-console memory architecture from the Atari 2600 to the PS5 and Xbox Series: cycle counting and blanks, sharing the bus and DMA, the fast-but-slow RDRAM on the N64, the Dreamcast tile renderer, the PS2's three memory islands, SPUs and Local Store on the PS3, PS4 memory unification, and the SSD as a new level of the memory hierarchy.
-
Craft
How not to confuse a dream, a portfolio, and a second job
On pet projects in gamedev: why a "couple-of-evenings" project turns into years of your life, how learning differs from writing your own engine, why a small library survives more often than an ambitious all-in-one, the cost of C++ for hobby projects, and how open-source quietly becomes a second job.
-
C++
Simple name lookup in C++
Simple (unqualified) and qualified name lookup in C++: why a namespace and a local variable with the same name coexist, hiding of names and whole overload sets in inheritance, diamond-inheritance ambiguity, the using-namespace rule in qualified lookup, and the historical differences between GCC, Clang and MSVC.
-
C++
Compilers get confused by names too
Name lookup in C++: identifiers, unqualified-id, qualified-id, template-id and the "terminal name", the history of ADL (Koenig lookup) from the namespace conflict to Koenig's solution, two-phase lookup in templates, and why GCC, Clang and MSVC historically behaved differently.
-
Performance
Redundant computations
How speculative execution and branch prediction interact with the memory subsystem: why branchless code isn't always faster, the cost of a misprediction versus memory latency, the history from Tomasulo to the Pentium Pro, binary search, and benchmarks on the Jaguar (PS4).
-
C++
Generalizations in C++ (part 2)
A continuation of chapter 1 of PragmatiC++: object identity and equality, procedures and the call stack, calling conventions and the in/out/in-out categories, the computational basis from ENIAC to AMX, and regularity of types as a practical guide to designing predictable abstractions.
-
Performance
Why don't we have L5 caches?
Why a CPU has several cache levels instead of one big one: on-die signal physics, a Christmas-ornament analogy, the history from the i486 to Nehalem, why L1I and L1D are split, coherence protocols (MSI/MESI/MOESI…), eDRAM and HBM as a "hidden" L4, and why L5 makes no sense yet.
-
Craft
On the joy of programming and the weightlessness of achievement
Reflections from a developer who caught the era when code was written by hand without AI assistants: why an achievement earned too easily feels weightless, how AI removes the "useful friction" and the flow state, and where a programmer's new mastery may lie — in architecture and depth of decisions rather than typing speed.
-
Craft
Writing code is easier than writing a book about writing code
How the Game++ series on Habr grew into a book about pragmatic C++ and engine development: what "good" C++ is, the people who helped make the book happen, editing as a craft of its own, and a big block of answers to the frequent questions about writing and publishing it.
-
Performance
Hunting the red fps
Game profiling as a development philosophy: the evolution of FPS expectations, how artist content hurts performance (geometry, textures, render, culling), profiling methods — sampling, instrumentation, tracing, event-based, static analysis and replays — and the design of a tracing profiler with a zero-allocation architecture and string handles.
-
Craft
Why university doesn't train programmers
Why classic university education doesn't turn students into programmers: teachers with no real-world experience, a vicious salary circle, programming as a hands-on skill like playing the guitar, studio mentorship and why programmers are made through self-teaching.
-
Craft
Don't panic, you've just landed in AA+ gamedev
How not to panic when you land in a big AA+ studio with a multi-million-line codebase: navigating someone else's legacy, build systems, why seniors don't remember the code by heart, searching by user-visible strings, git history, code style and why the source is the ultimate truth.
-
Abnormal programming
Myths, superstitions and folk wisdom in game development
A look at 12 common C++ gamedev "truths" — which are myths, which are superstitions, and which are folk wisdom: the cult of pure C, the "bad good build", the cost of exceptions and RTTI, smart pointers and STL containers, polymorphism, inline assembly, template bloat, premature optimization and the curse of the Friday commit.
-
Abnormal programming
A zoo of strings in your C++ code?
A big tour of C++ string types as a zoo of animals: char* and char[N], string literals, std::string and SSO, string_view, pmr::string, QString, NSString, std::wstring, frame strings, Unreal's FString, StringAtom and interning, COW strings and hash-based StringID — and where each fits in game engines.
-
Performance
The good, the bad, the colored and the fast
Abnormal memory allocators from practice: a lifetime-tracking allocator for hunting leaks, a randomizing (chaos) allocator for stress-testing long-running systems, a "colored" allocator for subsystem isolation (Deathloop), and the fast TLSF — with diagrams and a CPU-cycle benchmark.
-
Abnormal programming
Be your own breakpoint
How software and hardware breakpoints work: swapping a byte for int 3 (0xCC), the x86-64 debug registers DR0–DR7 and the DR7 layout, conditional, function and temporary breakpoints, a write watchpoint via GetThreadContext, a buffer canary, and a hardware-breakpoint button right in an ImGui game editor.
-
Game design
Why Pharaoh remains the best game in the series
Why the original Pharaoh (1999) runs deeper than Zeus and the A New Era remake: worker distribution via recruiters vs a global pool, taxing poor houses, mission structure, 20 housing levels and migration logic, the random-turn "Egyptian stupidity" of service walkers — with code recovered in the Akhenaten remake.
-
Performance
I reject commits that use the heap and ask colleagues to rewrite that logic
Experience building large C++ games without the heap: why dynamic allocations are dangerous on consoles and mobile (fragmentation, malloc-time degradation, a certification rejection), and what to replace them with — fixed-size containers gtl::vector<T,N>, etl/FastDelegate instead of std::function, CRTP and static polymorphism with std::variant, object pools and placement new.
-
Game design
Blackbox gameplay
Black box gameplay in strategy games and city-builders: why the Caesar/Pharaoh/Zeus series hid numbers and mechanics, sandbox vs. scripted missions, the cognitive limit of 12 pairs, why the combinatorics of mechanics matter more than the amount of content, and why "broken" balance keeps players for years — using Age of Empires II as an example.
-
Abnormal programming
Game++. Performance traps
The finale of the Game++ series: common C++ performance traps — needless allocations, treacherous RVO, a heavy std::function, expensive string identifiers, an approximate sine, slow division, the cost of cache misses, std::pair/tuple and the price of virtuality — with quick-bench benchmarks and stories from production.
-
Abnormal programming
Game++. while (!game(over))
Should you write your own game engine: why and whether you need to, what an engine even is and what it does — the game loop, input, graphics, assets, audio, physics, scripts and configs, networking, AI, UI and architecture (library approach, GodObject, ECS), plus tooling — with code, library links and personal experience.
-
Abnormal programming
Game++. Patching patterns
Design patterns in games: what survives from the GoF "blue book" and which patterns took root specifically in gamedev — Command, State and FSM with a pushdown stack, Flyweight and instancing, Observer and EventBus, Dirty Flag, Update Layers and GOAP — with code, diagrams and use cases.
-
Craft
Just write code
A manifesto in the spirit of "just write code": while everyone else argues at the meeting about which board to move the ticket to, no Jira will ever write the bugfix. On working crap code, devalued titles, leetcode interviews, and the idea that if there are no bugs — you just didn't write any code.
-
Abnormal programming
Game++. Work hard
Concurrency models in game engines: shared/separate/shadow state, workers and a thread pool, stateless workers (Assassin's Creed, Factorio), worker chains and non-blocking IO, Naughty Dog's fibers and the marl library — with diagrams, code and loading benchmarks.
-
Craft
A couple of things a game programmer should know
A collection of sarcastic "laws" of game development: about std::move, undefined behavior, GameObject and ECS, cert submission and TRC, Heisenbugs, tech debt, // TODO and //TMP, managers, artists and Friday patches — the bitter truth of gamedev in one-liners.
-
Abnormal programming
Game++. Heap? Less
How games get rid of heap allocations: the five memory regions, stack vs. heap, determinism and fragmentation, RVO/NRVO, local inplace strings and pmr::string, ad-hoc polymorphism with std::variant, and real-world vector/map/string optimizations via monotonic_buffer_resource and a profiler.
-
Craft
Why game devs stay on C++17
Why game studios are in no rush to move to C++20 and stay on C++17: auto and a +10-15% hit to compile time, Visual Studio as the world's best debugger, the economics of build farms and tools, distrust of STL and Boost in gamedev, the absence of automated tests, and why debugging doesn't scale.
-
Abnormal programming
Game++. Unpacking containers
Specialized containers in game engines: fixed array and matrices, linear/stable/sparse/packed/static/small/dirty/buddy vector, deque and bcdeque, bounded_priority_deque, intrusive list, octree and quadtree, object_pool, ring buffer, cached_hashtable, handle_container and slot_container — how they work, diagrams and where they're used.
-
Craft
Game++. Building arcs
Game engine architectures and Conway's Law: the unitary (Big Ball of Mud) approach in Unity, layered in Unreal Engine, microkernel in CryEngine and O3DE, data-driven in Dagor, monolithic in X-Ray and micro-modular in Godot — history, pros and cons of each.
-
Game design
Ready Player One
The history of video games: from arcade machines and mainframe games to Computer Space, Atari and Pong, Galaxian and Pac-Man, Donkey Kong, the birth of consoles, the Atari 2600, the 1983 crash, Nintendo, Sega and the PC era.
-
Abnormal programming
Game++. run, thread, run…
Multithreading in games: the problems with locks (deadlock, thread starvation, priority inversion in Cyberpunk 2077 and Crysis), the C++11 memory model, lock-free and atomics, spinlocks with backoff, thread pools and a task system, hitching, a read-write mutex and 8 rules for good threading.
-
Craft
Game++. Juggling STL algorithms
Why STL algorithms are "conversational" C++: they show What you do, not How; they remove bounds, empty-collection and "smeared perf" bugs and give you compiler-grade code. The history of EASTL, iterators and back_inserter, shader caching via set_difference and a big algorithm cheat sheet.
-
Abnormal programming
Game++. Dancing with allocators
A big tour of memory allocators in games: linear, step-back, frame/double/N-frame, stack and double-stack, pool, free list, arena, segregated, buddy, thread-cache, fibonacci, compacting, hot/cold splitting and TLSF — with code, diagrams, use cases and a benchmark.
-
Reverse-engineering
Welcome to Ancient…
Pharaoh (1999): why the city-builder won't start on Windows 10/11 (the 640×480 bug, scaling, overlays, knocking on a dead Microsoft service, sound) and how the demo differs from retail — screens, menus, textures from Caesar III, Nile floods, irrigation canals and cut content. Illustrated with the Akhenaten remake.
-
Abnormal programming
Game++. Cooking vectors
How vectors work in engines and what you pay for them: capacity growth and memory fragmentation, single vs. cascaded composition, std::array, a stack-based static_vector, hybrid_vector with an SSO-like optimization, and the pitfalls of pmr allocators and vendor monotonic_buffer_resource implementations.
-
Abnormal programming
Game++. String interning
String interning (string pooling) in game engines: one copy of a string for every reference, literal interning by clang/GCC and why the trick breaks on Xbox, the danger of comparing with ==, fighting memory fragmentation, and a simple xstring implementation on hashes with reference counting.
-
Craft
In Spain, all programmers are seniors
How working in Western gamedev studios differs from post-Soviet teams: the culture of "snitching," not touching others' tasks, all communication through the PM, excessive politeness, respect earned through solved tasks, national team quirks, context-based vs. detailed communication, and anchor phrases.
-
Performance
How to fit an elephant into a suitcase
The levels of optimization when porting games to weak hardware (Switch, Apple TV, mobile): architecture, algorithms and code. A story about an expensive string-escaping check — from a naive early-exit loop to a branchless version, a lookup table and SIMD with _mm_movemask_epi8, with iPhone load-time tables.
-
Performance
Spears & bits
Packing booleans into bits in games: std::bitset, std::vector<bool>, a naive byte array and the CryEngine approach, benchmarks with spikes at 32/64/128, branch-predictor misses, and a final SSE vectorization with _mm_movemask_epi8 — from 4 ms down to 1 ms per frame.
-
Performance
Task-based thinking in game engines
The core task-system patterns in game engines: moving movement, physics, scripts, path-finding, animation, rendering and I/O onto separate threads, grouping tasks, message passing, and a comparison of a simple task, a thread manager and a task manager.
-
Craft
Good books for a gamedev AI programmer
A reading list for a game-AI programmer with personal takes: AI for Game Developers, Game AI Pro, Game Engine Gems, The Pyramid of Game Design, Behavioral Mathematics for Game AI, and AI Game Programming Wisdom — what to read and how.
-
Abnormal programming
The heavy H[header]
How a large C++ project's full build time was cut from 15:32 to 5:16: the antivirus and explorer, heavy template headers, forward declaration, precompiled headers, PIMPL, and disabling analyzers, unit tests and LTO — with header build-time tables.
-
Performance
A 486 ought to be enough for everyone
Which general-purpose technologies appeared in CPUs since the 486 and that we use every day: caches and prefetch, the TLB, speculative execution, NUMA, SIMD, out-of-order, GPGPU and branch prediction — with console examples and benchmarks.
-
Abnormal programming
How Unity gave up on their own strings
The story of Unity's COW strings: copy-on-write with partial buffer sharing and near-zero allocations, the clash with
std::string's design, dangling pointers, and why the engine eventually returned to the standard library. -
Reverse-engineering
ECS, dynvtbl, logical threads and Pharaoh
Code archaeology of the Pharaoh and Caesar III engine: an ancient-Egyptian ECS on flat arrays, a bare-bones VMT made of callbacks, logical threads from the last century, and a god object to save memory.
-
Abnormal programming
Boss, it's all gone
A sequel to «Where are your bugs?»: 16 Friday-night bugs from real engines and games — out-of-bounds writes, leaked handles on the Switch,
memseton a non-trivial type,=!instead of!=andallocain a loop. Guess the cause. -
Performance
Just don't copy that
Pass-by-value vs
const&, hidden allocations on strings and vectors,reserve, and a real drop to 10 FPS — all with QuickBench benchmarks. -
Abnormal programming
Strings in game engines
Why
std::stringis shunned in engines: C-strings and NTBS, SSO and string_view, sized/pool/arena strings, shared strings and identifiers, plus SIMD config parsing. -
Game design
Catch the player, paying or not…
Dark monetization patterns in games: daily rewards, premium currency, loot boxes, power creep, time gates and the comprehensive MINDSPACE framework — how studios play on player psychology.
-
Game design
What can we learn from the old BioShock: Infinite?
Game design lessons from BioShock: Infinite: the principle of clarity, fixed and emergent narrative, the illusion of choice and Ken Levine's layered storytelling — and how a linear shooter breaks the fifth wall.
-
Performance
And 20 cores still aren't enough
Eleven C++ optimization techniques from production engines: cache warming, compile-time dispatch, loop unrolling, signed/unsigned and type matching, hotpath isolation, SIMD, prefetch, constexpr and lock-free — with benchmarks and war stories.
-
Game design
For a fistful of achievements
The psychology of collection mechanics in games: domination, socialization, the unfinished-set effect and envy; types of collections by availability; achievements and gear as collections.
-
Game design
The last of Deus Ex
A look at the levels of Deus Ex: Mankind Divided — the Dawn Engine, the black-and-gold visual style, attention to detail, variability vs. story, and the combinatorics of immersive-sim mechanics.
-
Game design
Corridors tell no tales
How architecture and level design tell a story, using BioShock as the example: corridors and shadows, visual magnets, frozen story, geometry tuned to enemy traits, and a bit of feng shui.
-
Game design
I miss the mechanics of old games
A grumble about lost mechanics of old games: clear goals, systemic design, behavior-base levels, enemy levels, learning through interaction, reward and punishment, karma and invisible walls.
-
Game design
The Red Barrel Problem
What a "red barrel" is in game design: how exploding barrels became a shooter cliché and why inherited mechanics pile up questions yet end up unused by players.
-
Craft
What is C++ in gamedev?
Why gamedev is locked into C++ and how the language lives inside an engine on three levels: hardcore number-crunching, "ordinary" C++ with scripts and hot-reload, and a meta level with reflection and code generation.
-
Craft
What else should a game programmer read?
A follow-up list: Joel on Software, Blood, Sweat, and Pixels, the Doom 3 source code, MISRA C++, EASTL, daScript, GDC talks and blogs worth reading.
-
Craft
What should a game programmer read?
A reading list of books, blogs and repos for a game programmer: from Code Complete and Effective C++ to Game Engine Architecture, Game AI Pro, GDC and awesome-lists on GitHub.
-
Craft
Why you [don't] need your own game engine
Why studios and indies build their own engine instead of Unreal/Unity: is it expensive, is it hard, hands-on experience with Frostbite, Unity and Dagor — and why bespoke tech moves the industry forward.
-
Abnormal programming
The magic of shader swizzle in C++
Implementing swizzle (vec.xxy, vec.zx, vec.rgb) in C++ with unions and templates: from a first copy-pasted version to a single constexpr solution, a bug with the default operator= and benchmarks against glm and CxxSwizzle.
-
Craft
Are you sure you want to become a programmer in gamedev?
An honest look from the inside: what programmers actually do in gamedev, interviews, overtime, engines and their schools, studio traditions, designers — and why it's still worth it.
-
Tools
Not Unity alone…
A tour of 50+ game engines and frameworks beyond Unity: from nCine, RayLib and SDL2 to Godot, CryEngine, Unreal and DagorEngine — links, languages, licenses and hands-on notes.
-
Game design
Procedural generation of cover in games
Automatically generating cover points for NPCs from level geometry: navmesh edge traversal, raypicks, candidate culling and runtime cover evaluation. Examples from 4A Engine.
-
Reverse-engineering
How the map is drawn in Pharaoh
The algorithm for rendering the isometric map, city and animation in Pharaoh: diagonal-path and zig-zag, depth sorting, layers and the original map format.
-
Abnormal programming
Where are your bugs?
A collection of wild bugs from real engines: a missing semicolon in Unity, a
memsetthe compiler dropped, bitfield races in CryEngine, the most vexing parse and a dozen more — spot the bug yourself. -
Abnormal programming
When it's private but you really want public
Testing a C++ class's private members without touching the headers: from 100+ friends and #define private public to a template hack that swaps a pointer-to-member type.
-
Abnormal programming
Why does the Switch SDK have three different sin functions?
Porting games to the Nintendo Switch, I found three sin implementations in the SDK — and what the disassembly showed for -O1, -O3 -math:precise and -O3 -math:fast.
-
Abnormal programming
A C++ enum's name at runtime
Getting a type's name and enum values at runtime in C++ without RTTI — via __PRETTY_FUNCTION__, templates and constexpr magic.
-
Game design
Should players be hand-held?
Level-design techniques from Witcher 3, Zelda and Metro Exodus — guiding players without leading them by the hand.
-
Performance
No need to rush… (About spinlocks)
C++ spinlock implementations — from the naive TAS to a ticket spinlock — with benchmarks, cache misses and the nuances of thread prioritization.
-
Performance
Cache pollution? Stock up on tests
How caches, associativity, coherence and data alignment affect performance — with benchmarks.
-
Reverse-engineering
Reverse-engineering Caesar III: extracting textures
The .sg2/.555 texture format, RGB555 palette, IDA and Hex-Rays — and how a hobby grew into a remake. Part 1.
-
Reverse-engineering
Reverse-engineering Caesar III: City Rendering
Map format, tile selection and draw order, drawing the city. Part 2.
-
Reverse-engineering
Reverse-engineering Caesar III: game logic
Simulating citizens, walking, event queues.
-
Reverse-engineering
Reverse-engineering Caesar III: world generation
Procedural generation of the world and maps.
-
Reverse-engineering
Reverse-engineering Caesar III: the city model
The internal city model: data, layers, state.
-
Reverse-engineering
Reverse-engineering Caesar III: the game loop
Computing one city day: the simulation loop, gods, sentiment, taxes, health and data structures.