Skip to content

A text editor on a game engine's UI (part 1): drawing text and storing it as lines

SDL can draw a texture, but it has no idea what a letter is. In part 1 of building a multi-line text editor on my own game engine's UI, I follow one string from font outlines to pixels, then decide how to store the document. My timings show that moving bytes costs almost nothing at article size. Finding a line is the cost that matters.

text-renderingfreetypetext-editordata-structuresuicpp
Read more →

Persistent Storage in C++ Web Apps: WASMFS + OPFS with Emscripten

Getting persistent save files working in a C++ web app with Emscripten: why WASMFS replaces IDBFS, how to mount the OPFS backend, standard C++ file I/O on the web, browser lifecycle save hooks, and the threading pitfalls that will silently deadlock your app

emscriptenwebassemblycppwasmfsopfsgame-engineweb
Read more →