<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Dev on charalambous.uk</title><link>https://charalambous.uk/dev/</link><description>Recent content in Dev on charalambous.uk</description><generator>Hugo</generator><language>en-us</language><atom:link href="https://charalambous.uk/dev/index.xml" rel="self" type="application/rss+xml"/><item><title>Teaching Terra to speak Lua</title><link>https://charalambous.uk/dev/teaching-c-to-speak-lua/</link><pubDate>Mon, 13 Apr 2026 00:00:00 +0000</pubDate><guid>https://charalambous.uk/dev/teaching-c-to-speak-lua/</guid><description>&lt;p&gt;The game code has moved from C to Lua. Terra (the C engine) now exposes functions that Lua scripts call to spawn entities, move cameras, play sounds, and draw UI. The game itself is now a Lua script that the engine loads and runs.&lt;/p&gt;
&lt;p&gt;&lt;img loading="lazy" src="https://charalambous.uk/images/devlog-003/c-lua-header.svg" alt="C to Lua"&gt;
&lt;/p&gt;
&lt;h2 id="the-bridge"&gt;The bridge&lt;/h2&gt;
&lt;p&gt;&lt;img loading="lazy" src="https://charalambous.uk/images/devlog-003/lua-bridge.svg" alt="C to Lua bridge"&gt;
&lt;/p&gt;
&lt;p&gt;The Lua bridge is a single C file that wraps every engine system (renderer, input, audio, etc.) and exposes them as &lt;code&gt;terra.*&lt;/code&gt; functions. I&amp;rsquo;ve got about 50 functions in here for now but I&amp;rsquo;m sure it will grow quite quickly as I start building larger games.&lt;/p&gt;</description></item><item><title>Vim inside a custom game engine</title><link>https://charalambous.uk/dev/vim-inside-a-custom-game-engine/</link><pubDate>Mon, 13 Apr 2026 00:00:00 +0000</pubDate><guid>https://charalambous.uk/dev/vim-inside-a-custom-game-engine/</guid><description>&lt;p&gt;I embedded Neovim as a subprocess inside Terra. Neovim runs as &lt;code&gt;nvim --embed --headless&lt;/code&gt; (no terminal or window).&lt;/p&gt;
&lt;h2 id="first-import"&gt;First import&lt;/h2&gt;
&lt;p&gt;The first version was a bit rough but I have vim working inside the terra editor. You may also notice in this screenshot we have a &amp;lsquo;fake&amp;rsquo; vim bar at the bottom which i was also experimenting with before importing vim, later we use the real one natively.&lt;/p&gt;
&lt;p&gt;&lt;img loading="lazy" src="https://charalambous.uk/images/devlog-003/vim-first-import.webp" alt="First rough Neovim import"&gt;
&lt;/p&gt;</description></item><item><title>First Demo</title><link>https://charalambous.uk/dev/play-the-demo/</link><pubDate>Fri, 03 Apr 2026 00:00:00 +0000</pubDate><guid>https://charalambous.uk/dev/play-the-demo/</guid><description>&lt;style&gt;
 main &gt; h1:first-of-type { display: none; }
 main &gt; .time:first-of-type { display: none; }
 .demo-game { display: block; }
 .demo-mobile { display: none; text-align: center; padding: 60px 20px; color: #999; }
 @media (max-width: 768px) {
 .demo-game { display: none !important; }
 .demo-mobile { display: block; }
 }
&lt;/style&gt;
&lt;div class="demo-mobile"&gt;
 &lt;p style="font-size: 2em; margin-bottom: 8px;"&gt;:(&lt;/p&gt;
 &lt;p&gt;This demo requires a keyboard and mouse.&lt;/p&gt;
 &lt;p&gt;Come back on a PC to play!&lt;/p&gt;
&lt;/div&gt;
&lt;div class="demo-game" style="position: relative; width: 90vw; max-width: 1280px; aspect-ratio: 16/9; left: 50%; transform: translateX(-50%); overflow: hidden;"&gt;
 &lt;iframe src="https://charalambous.uk/demo/index.html"
 frameborder="0" allow="autoplay; fullscreen" scrolling="no"
 style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none;"&gt;
 &lt;/iframe&gt;
 &lt;div style="position: absolute; top: 12px; left: 12px; background: rgba(0,0,0,0.6); border-radius: 8px; padding: 10px 14px; pointer-events: none;"&gt;
 &lt;div style="display: grid; grid-template-columns: 34px 8px 34px 34px 34px; grid-template-rows: 32px 32px; gap: 0; align-items: center; justify-items: center;"&gt;
 &lt;span class="key-sprite animated" style="background-image: url(/images/keys/Q.webp)"&gt;&lt;/span&gt;
 &lt;div&gt;&lt;/div&gt;
 &lt;div&gt;&lt;/div&gt;
 &lt;span class="key-sprite" style="background-image: url(/images/keys/W.webp)"&gt;&lt;/span&gt;
 &lt;div&gt;&lt;/div&gt;
 &lt;div&gt;&lt;/div&gt;
 &lt;div&gt;&lt;/div&gt;
 &lt;span class="key-sprite" style="background-image: url(/images/keys/A.webp)"&gt;&lt;/span&gt;
 &lt;span class="key-sprite" style="background-image: url(/images/keys/S.webp)"&gt;&lt;/span&gt;
 &lt;span class="key-sprite" style="background-image: url(/images/keys/D.webp)"&gt;&lt;/span&gt;
 &lt;/div&gt;
 &lt;p style="font-size: 0.7em; color: #ccc; margin: 8px 0 0 0; line-height: 1.4;"&gt;
 WASD move · Q cast&lt;br&gt;
 Scroll zoom · Esc pause&lt;br&gt;&lt;br&gt;
 Pause to equip abilities&lt;br&gt;
 and adjust their values
 &lt;/p&gt;</description></item><item><title>From desktop to browser</title><link>https://charalambous.uk/dev/from-desktop-to-browser/</link><pubDate>Fri, 03 Apr 2026 00:00:00 +0000</pubDate><guid>https://charalambous.uk/dev/from-desktop-to-browser/</guid><description>&lt;p&gt;Quite a few changes since the last post. It actually plays like a game and I have also configured a pipeline so that I can provide demos to play in a web browser.&lt;/p&gt;
&lt;h2 id="running-in-the-browser"&gt;Running in the browser&lt;/h2&gt;
&lt;p&gt;The entire engine compiles to WebAssembly via Emscripten using the same source code, same OpenGL calls. Emscripten translates them to WebGL 2.0 automatically. The total download is under 1MB, for comparison the google homepage is about 1.5MB total size.&lt;/p&gt;</description></item><item><title>Building a game and engine from scratch</title><link>https://charalambous.uk/dev/building-a-game-engine-from-scratch/</link><pubDate>Tue, 31 Mar 2026 00:00:00 +0000</pubDate><guid>https://charalambous.uk/dev/building-a-game-engine-from-scratch/</guid><description>&lt;p&gt;Building a game from scratch. No Unity, no Unreal, no Godot. Just C, C++, and OpenGL. The project is codenamed &lt;strong&gt;Coopla&lt;/strong&gt;, and the custom engine powering it is called &lt;strong&gt;Terra&lt;/strong&gt;.&lt;/p&gt;
&lt;h2 id="game-engine--libraries"&gt;Game, engine &amp;amp; libraries&lt;/h2&gt;
&lt;p&gt;The engine is written in C17 with OpenGL 3.3. No massive framework with a load of stuff we will never need. Just enough to get pixels on screen and a player moving through 3D space.&lt;/p&gt;
&lt;p&gt;&lt;img loading="lazy" src="https://charalambous.uk/images/devlog-001/engine-diagram.svg" alt="Engine architecture"&gt;
&lt;/p&gt;</description></item></channel></rss>