Aug. 17, 2019
Recently I've been hacking on a game engine for infinitelives called px3d.
It's built on top of ClojureScript, Blender, and Three.js and it runs in the browser.
One feature I'm particularly happy with is the live-reloading of Blender assets into the game. You hit "save" in Blender and the updates appear in the running game a second later - no need to re-compile or re-load the game.
The way this works is with a background script which watches the
assets.blend file. It re-builds the
assets.glb whenever it is modified, and writes the hash of the file into
assets.cljs. Figwheel pushes changes to the compiled cljs files whenever they change, and there is another bit of code which tells three.js to re-load
assets.glb if the hash has changed.
Infinitelives is the vehicle me and my buddy Crispin use to make games and tooling, mostly for gamejams. The gamejam format is great because it is time-boxed, which means we can periodically do this self-indulgent thing we enjoy without taking too much family or work time.
Gamejams are typically only 48 hours long and so we have learned some good techniques for shipping working code under extreme constraints. A hardcore economy of time, resources, and scope is required.
ClojureScript & Figwheel are perfect for this with their hot-loading of modified code. I built the tight Blender re-load integration for the same reason. Hand drawn graphics consume a lot of time during jams and this should help us really level up on the content side of things.
If you'd like to find out when we release games and new tools you can sign up to our release notifications on the infinitelives home page or follow us on Twitter.
Aug. 4, 2019
Aug. 1, 2019
For some time I have been looking for a writing solution with the following properties:
- Lets me review and make minor edits on my phone.
- Is synched to my laptop where I can write longer form.
- Supports simple markup such as Markdown.
- Supports attachments and images.
- Is Free & Open Source Software and can be self-hosted.
The solution is Joplin.
It's a wonderful piece of software. There are apps for all of the usual platforms, including a direct link to the Android apk, which is a blessing if you are somebody who opts out of using Google services.
Some other things which are great about Joplin:
- You can edit notes in an external editor.
- You can paste images directly into your document.
- It imports and exports many formats including Markdown.
- It can export individual articles to PDF.
- Its native export format "JEX" is a simple tar file.
- Its native data store is on-disk.
- Sync is optional and very easy to set up.
- Sync uses the widely supported webdav protocol.
I got sync between my devices working quickly by using Piku to deploy a simple webdav server to my Piku VPS. If you want to do this yourself, check out the latter repository and then push it to Piku as follows:
git remote add piku piku@MYSERVER.NET:webdav
git push piku master
piku config:set NGINX_SERVER_NAME=WEBDAV.SOMEDOMAIN.NET PASSWORDS="username:password username2:password2 ..." FOLDERS="/joplin:/home/piku/joplin"
After that is up and running you can configure Joplin sync by selecting "webdav" on each device and then enter the URL
WEBDAV.SOMEDOMAIN.NET/joplin/ and the
username:password pair you specified above.
I wrote this post with Joplin.
June 7, 2019
Yesterday I released
Hacksilver, an album of
procedurally generated "algorave" music. Some people had questions about
the technology used to write it so I thought I'd write this up.
The beats and melodies were generated using
drillbit, a LISP codebase written
in a Python variant called Hy. The project outputs Impulse Tracker mod
files which are then
played and mixed live.
The interesting parts of that codebase are in the generators folder. For
example the drill-n-bass choppage generator is
Each generator has three functions:
make-sample-set: which generates IT wav tables that are used by
the generator (e.g. individual drum kit or synth sounds)
make-pattern-settings: which sets up parameters & context that
will be re-used by the pattern generator to provide similarity across
make-pattern: which outputs the pattern data in a format easily
consumed by the Impulse Tracker file writer
Mixing and live-effects are performed in Pure
Data. Originally I was using a fully software
based mixer. However I discovered that
a nicer mode of operation is to have individual bits of sound
generating/filter hardware chained together. So I started using this
Raspberry Pi based mixer + FX unit from another
project to mix live.
One other bit of software in there is
jsfxr which is wrapped by the LISP
code and outputs 8-bit synth sounds (which are then used by the pattern
generator). Because the synth definitions are simple JSON hash maps
there is a fun pseudo-evolutionary technique I was able to use where you
interpolate between the values of two synth definitions to generate new
sounds based on two synth definitions that you like.
I also built a little hardware Impulse Tracker renderer based on a
Raspberry Pi running XMP with my
friend Dimity. It has a Pocket Operator style sync output and runs
directly into the mixer that both share the same timing and the fx can
be quantised to the music which is playing.
If you're interested in the music hardware that Dimity and I are
building and selling you can stay updated at
In the image at the top of this post the hardware Impulse Tracker
renderer is the little box on the right hand side. The RPi mixer/fx unit
is to the top right of the C64 keyboard. The Korg Nanokontrol2 strapped
to the C64 keyboard is controlling the fx and mixing parameters on the
RPi. They keyboard itself was for playing live synth sounds (a very
simple arpeggiating subtractive synthesizer built in Pd).
June 6, 2019
I just released
Hacksilver, a new album
of procedurally generated music.
It uses a whole slew of weird tech to generate the beats, melodies,
synth sounds including beat-generating
LISP, 8-bit synth generating
Data for the mixing and mastering. One thing
that was particularly fun was procedurally generating Impulse Tracker files.
Would appreciate a re-share if you know of anybody who might be into
this type of thing.