<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Game-Engine on Lorbic</title><link>http://localhost:1313/tags/game-engine/</link><description>Recent content in Game-Engine on Lorbic</description><generator>Hugo</generator><language>en</language><lastBuildDate>Mon, 10 Aug 2026 10:00:00 +0530</lastBuildDate><atom:link href="http://localhost:1313/tags/game-engine/index.xml" rel="self" type="application/rss+xml"/><item><title>Part 6: Simulating a Living Facility: Room Derivation, Sunlight Spillover, and Positional SFX</title><link>http://localhost:1313/modular-missions-floodfill-audio-raylib/</link><pubDate>Mon, 10 Aug 2026 10:00:00 +0530</pubDate><guid>http://localhost:1313/modular-missions-floodfill-audio-raylib/</guid><description>&lt;p>Generating a raw matrix of integer tiles gives you a map layout, but it doesn&amp;rsquo;t give you a living environment. When I loaded my first level into &lt;em>Derelict Facility&lt;/em>, the engine had no concept of what a &amp;ldquo;Laboratory&amp;rdquo; or a &amp;ldquo;Reactor Room&amp;rdquo; was. It just saw a flat array of walls and floors.&lt;/p>
&lt;p>If a player flipped a power terminal inside a room, I had no clean way to know which room lights or doors to toggle without scanning the whole map grid on every frame. If an alarm fired down the hall, it played at full volume regardless of where the player was standing.&lt;/p></description></item><item><title>Part 5: From Terminal Cells to Sprite Maps: Font Fallbacks and Auto-Tiling</title><link>http://localhost:1313/autotiling-sprites-font-fallbacks-raylib/</link><pubDate>Sun, 09 Aug 2026 10:00:00 +0530</pubDate><guid>http://localhost:1313/autotiling-sprites-font-fallbacks-raylib/</guid><description>&lt;p>Building a terminal-based engine in pure ASCII looks cool for about five minutes. Then you try rendering a complex facility map with corners, T-junctions, and status icons, and raw character cells start feeling incredibly limiting.&lt;/p>
&lt;p>Two specific problems hit me immediately when I tried switching to Raylib for graphics. First, drawing wall tiles manually by hand in level files meant placing 16 different corner variations by hand. Second, when I tried rendering a 🚨 warning emoji alongside FiraCode monospace text, Raylib just rendered a missing glyph box (&lt;code>?&lt;/code> or &lt;code>□&lt;/code>).&lt;/p></description></item><item><title>Part 4: Refactoring to SoA ECS: Bitmasks and Flat Component Arrays</title><link>http://localhost:1313/structure-of-arrays-ecs-bitmasks-golang/</link><pubDate>Sat, 08 Aug 2026 10:00:00 +0530</pubDate><guid>http://localhost:1313/structure-of-arrays-ecs-bitmasks-golang/</guid><description>&lt;p>When I started building &lt;em>Derelict Facility&lt;/em>, my initial instinct for game actors was standard Object-Oriented design: create an &lt;code>Entity&lt;/code> struct, add pointers for position, sprite, and stats, and store them in a slice (&lt;code>[]*Entity&lt;/code>).&lt;/p>
&lt;p>It worked fine for five entities. But as soon as I added automated doors, save terminals, and active power grids across a 1000-tile map, keeping track of separate heap pointers became a headache. My Go profiler showed GC pauses spiking while the CPU spent more time chasing heap pointers across non-contiguous memory than actually updating game state.&lt;/p></description></item><item><title>Part 3: Casting Shadows Without Trigonometry: The Beauty of Integer Math</title><link>http://localhost:1313/casting-shadows-bresenham-integer-math/</link><pubDate>Tue, 07 Apr 2026 10:00:00 +0530</pubDate><guid>http://localhost:1313/casting-shadows-bresenham-integer-math/</guid><description>&lt;p>At the end of generating a procedural map for the &lt;em>&lt;a href="https://github.com/vikash-paf/derelict-facility" target="_blank" rel="noopener noreferrer">Derelict Facility&lt;/a>&lt;/em> engine, I had a sprawling interconnected maze of rooms and corridors. But there was a devastating problem: I could see everything.&lt;/p>
&lt;p>The entire map was rendered at once. It looked like a top-down blueprint, not a dark, atmospheric facility. I needed to implement Fog of War. I needed to treat the player character like a lighthouse in the dark.&lt;/p></description></item><item><title>Part 2: Decoupling the Renderer: Terminal to Raylib in One Interface</title><link>http://localhost:1313/decoupling-game-engine-renderer-raylib/</link><pubDate>Mon, 06 Apr 2026 10:00:00 +0530</pubDate><guid>http://localhost:1313/decoupling-game-engine-renderer-raylib/</guid><description>&lt;p>The biggest architectural mistake you can make when building a game engine is letting the game know how it is being drawn.&lt;/p>
&lt;p>When I started building the &lt;em>Derelict Facility&lt;/em> engine, the output target was a raw ANSI terminal. The engine calculated A* paths, resolved line-of-sight, and then spewed escape codes (&lt;code>\033[31m&lt;/code>) to &lt;code>os.Stdout&lt;/code>.&lt;/p>
&lt;p>Eventually, I hit the physical limits of terminal emulators: inconsistent character widths (especially for emojis), slow double-buffering, and a hard cap on frame rates. I needed to move to a real, hardware-accelerated graphics library like Raylib.&lt;/p></description></item><item><title>Part 1: Data-Oriented Design in Go: Why [][]Tile Destroyed My Game Engine</title><link>http://localhost:1313/data-oriented-design-go-contiguous-memory/</link><pubDate>Sun, 05 Apr 2026 10:00:00 +0530</pubDate><guid>http://localhost:1313/data-oriented-design-go-contiguous-memory/</guid><description>&lt;p>Most game development stories start the same way: install Unity, drag some sprites onto a canvas, and press Play.&lt;/p>
&lt;p>I wanted to understand the metal. I set out to build &lt;em>&lt;a href="https://github.com/vikash-paf/derelict-facility" target="_blank" rel="noopener noreferrer">Derelict Facility&lt;/a>&lt;/em>, a systems-level game engine from scratch in pure Go. No SDL, no OpenGL wrappers, no Ebiten. The goal wasn&amp;rsquo;t just to ship a game; the goal was to learn the memory layouts and I/O pipelines that modern engines hide behind friendly APIs.&lt;/p></description></item></channel></rss>