C/C++
C and C++ projects: MS-DOS games, OpenGL demos, raytracers, simulations, Windows tools and graphics effects.
Customising AI output by owning the denoising steps
Replacing, extending and holding images and video together by running every denoising step yourself.
20 October 2026Emulating a round-screen ESP32 board
An emulator for the board that runs the real firmware binary, down to how pixels reach the screen.
27 August 2026Real-time ray tracing on a round ESP32 display
A real-time ray tracer for the round AMOLED, kept interactive by tracing at low resolution and only refining the pixels that matter.
24 August 2026A clock on a round ESP32 display
There's never been a better time to turn an interesting piece of hardware into something useful or fun.
20 August 2026API hooking for window image capture
Hooking Win32 device context APIs to grab window repaints even if the window is obscured or offscreen.
29 April 2010FakeServer
This is a simple example of sockets programming in Win32 / C++ which listens on a socket and lets you provide the server responses.
19 December 2009Reflective sphere with polygon rendering
Analytical reflections in OpenGL: a mirrored sphere drawn with ordinary triangles, each object bent to where its reflection should appear from the camera.
27 January 2008Polychorons
Animated 4-dimensional objects mapped down to 3D
25 January 2008httpproxy
A demo application using the LSOCK and LMEM libraries in Win32.
28 July 2005Fluid dynamics galaxy
Trying out a galaxy effect using an FFT-based fluid solver. The force field on the liquid is gravitational.
29 March 2005Galaxy simulation
Using a fast Fourier transform for gravity simulation to beat O(N2) force calculations.
1 January 2005RTRay: a realtime raytracer
Raytracing in real time on a 2002 PC comes down to tracing as few rays as possible.
27 March 2002Procedural city block
Procedural city block layout
16 July 2000OpenGL ribbon
A looping, twisting ribbon drawn with OpenGL in C++ on Windows, with its shape worked out from sine waves of the clock on every frame.
26 January 2000OpenGL patterns with cubes
Using a 3D grid of cubes to create shapes and patterns. You could say that these are very primitive voxels.
17 January 2000Cloth simulation
Simulating a cloth falling and slipping over objects
13 October 1999WinSock hook
Logging all the calls to WinSock with a fake wsock32.dll standing between an executable and the real DLL.
C++ graphics effects
Some little animation experiments.
1 June 1998Lewpen's pattern generator
Windows programs in C++, and Java applets, that compute an animated picture every frame from functions on whole images, from sine-wave plasmas and image lookups to ZGo, where the functions are joined into networks.
1 June 1998ZSystem
A design for generating a whole universe from random seeds in C++, where every object is a function that builds its parts, tried out in three OpenGL test programs for Windows.
1 June 1998Bedlam
A Boulderdash clone made for the 386 CPU on MS-DOS in Assembly Language, with sprites and levels made with Deluxe Paint.
18 June 1995Tetrisk
A falling-blocks game for MS-DOS where you steer two pieces in two wells at once, written in assembly language with graphics painted in Deluxe Paint.
2 May 1994