Synthesizing Music from JSON
tl;dr: pl_synth is a tiny music synthesizer for C & JS and an editor (“tracker”) to create instruments and arrangements.
You can try it out at [phoboslab.org/synth/](https://phoboslab.org/synth/#eJytk9mNwCAMRBuaD8xhoBaU/tvYGSCH9pKyWpDBNiaYZzJaboYxRgWbRYNhqt2Q6AhBzohSLMEocFjnkkIdHKAtsR8YnHAKTo3+YanBcsGcS8B72287t7e2Ukvl4an4m5227W/t4xCGhbgLixPwqUcdwyPYYG6FahbT3iJaF+TCoVYhTXCRvujScfWLNGUfHDC/dbUJhrIJreUTD2Xn/XXbt8vSKNpPVIrL+9aaywxTKlkH0r0jPgcmkdBAM0puWoLDDQ91vk … ⌘ Read more
A Simple Archive Format for Self-Contained Executables
The build/run instructions for the example games for
high_impact were subtly wrong:
make sokol
./build/game_sokol
make sokol
compiles the Sokol version, converts all assets and puts the results
(executable and converted assets) into the build/
directory. So far so good.
Where it falls apart is in the next line: ./build/game_sokol
. The executable
starts just fine, but it’s looking in the current directory ( ./
) for all the
assets, … ⌘ Read more
Porting my JavaScript Game Engine to C for No Reason
high_impacttl;dr: high_impact is small game engine for 2D action games. It’s written in C, compiles to Windows, Mac and Linux as well as to WASM for the Web. It’s “inspired by” my original Impact JavaScript game engine from 2010. The name high_impact is a nod to a time when C was considered a high level language.
MIT licensed, source on github: [github.com/phoboslab/high_impact](https://github … ⌘ Read more
Porting my JavaScript Game Engine to C for No Reason
high_impacttl;dr: high_impact is small game engine for 2D action games. It’s written in C, compiles to Windows, Mac and Linux as well as to WASM for the Web. It’s “inspired by” my original Impact JavaScript game engine from 2010. The name high_impact is a nod to a time when C was considered a high level language.
MIT licensed, source on github: [github.com/phoboslab/high_impact](https://github … ⌘ Read more
Rewriting wipEout
The source code for the classic PSX launch title wipEout was leaked in 2022. A few month ago I finally sat down to take a look at it. The result is a (nearly) complete rewrite that compiles to Windows, Linux, macOS and WASM.
Thanks to WASM and WebGL you can play wipEout right in your browser!
I’m not the only one who embarked on a path to r … ⌘ Read more
QOA Benchmark Results and File Format Specification
The specification for the Quite OK Audio Format,
announced in a previous blog post,
is now finalized. QOA is a lossy audio compression format. Typical audio
signals (44100hz, stereo) are encoded into 278 kbits/s, or more precisely 3.2
bits per sample – exactly 1/5 of the bits needed for an uncompressed WAV.
The QOA-Specification [fits on a single … ⌘ Read more
Time Domain Audio Compression at 3.2 bits per Sample
Audio formats typically fall into one of three categories: “lossless”,
“complicated” or “bad”. After developing a
simple image format
last year, I tried to come up with an audio format that fits neither of these
categories.
In other words: a format that is lossy, simple and quite ok.
Naturally, it’s called QOA — the Quite OK Audio Format.
 Time
Introducing QOI — the Quite OK Image Format. It losslessly compresses RGB and
RGBA images to a similar size of PNG, while offering a 20x-50x speedup in
compression and 3x-4x speedup in decompression. All single-threaded, no
SIMD. It’s also stupidly simple.
tl;dr: 300 lines of C, single header,
source on github,
benchmark results here.
![QOI compression](/content/a … ⌘ Read more
Q1K3 – Making Of
This was my third time participating in the js13kGames contest. I won in 2018 with Underrun and utterly failed to deliver any compelling gameplay with my 2019 entry Voidcall.
This year’s theme was “Space” – I chose to completely ignore it and instead decided to pay tribute to one of my all time favorite games on its 25th birthday:
The original Quake from 1996.
Voidcall – Making Of
Like last year with Underrun, I participated in this year’s js13kGames – a JavaScript game development competition with a file size limit of 13kb, including code, assets and everything else. My entry was Voidcall, a Real-time Strategy game.
Play Voidcall – A WebGL Real-time Strategy game in 13kb of JavaScript
Recently, I played the origin … ⌘ Read more
MPEG1 Single file C library
If you want to play videos in a native app or game you basically have three options:
Rewriting Pagenode
Today I released Pagenode – a project that I started 14 years ago. Pagenode began its life as a full-fledged Content Management System and now, after countless rewrites, became a simple library. Pagenode’s journey mimics my own as a developer. Its current iteration expresses my desire for simplicity.
In 2004, after dabbling a bit with PHP and finally grasping MySQL I set out to build my own CMS. I previously looked at a lot of different CMSes on the market and found all of them to … ⌘ Read more
Underrun – Making Of
I participated in this year’s js13kGames, a JavaScript game development competition with a file size limit of 13kb, including code, assets and everything else. My entry was Underrun, a twin stick shooter using WebGL.
Play Underrun – A WebGL shooter in 13kb of JavaScript
For this competition I set out to produce something with a dense atmosphere – which is inherently difficult to do with so little … ⌘ Read more
Impact Is Now Free & Open Source
My HTML5 Game Engine Impact launched almost 8 years ago. The last update was published in 2014. While Impact still works nicely in modern browsers, it lacks support for better graphic and sound APIs that are now available. I felt increasingly bad for selling a product that is hardly maintained or improved.
So as of today Impact will be available completely for free, published under the permissive MIT License.
Impact’s source is available on [gith … ⌘ Read more
Decode It Like It’s 1999
A few years ago I started to work on an MPEG1 Video decoder, completely written in JavaScript. Now, I finally found the time to clean up the library, improve its performance, make it more error resilient and modular and add an MP2 Audio decoder and MPEG-TS demuxer. This makes this library not just an MPEG decoder, but a full video player.
In this blog post I want to talk a bit about the challenges and various interesting
bits I discovered during the development of this library. You’ll … ⌘ Read more
Quake for Oculus Rift
My Oculus Rift CV1 finally arrived last week, so of course I had to update my fork of the excellent Quakespasm engine for the new Oculus 1.4 API.
While I was at it, I also fixed a number of bugs, included support for the Rift’s headphones and the XBox One controller – I’d still recommend you play with mouse & keyboard, though. Controls are set up with reasonable defaults, but you can of course change everything in the options menu. There’s also … ⌘ Read more