Conway's Game of Life for Windows 3.1x: Source Code with 16-bit C and 32-bit Assembly

An implementation of Conway's Game of Life for Windows 3.1x and later

Brian Raiter, a former Windows programmer, shares three free programs he wrote in his spare time, complete with source code. The highlight is his implementation of Conway's Game of Life for Windows 3.1x, which, while not particularly useful as a game, contains interesting technical bits: mixing 16-bit C code with 32-bit assembly via winmem32.dll, translating between DIBs with different color organizations, managing a small palette, and handling background processing and window updates. Also included are GDI Rescuer, a debugging utility for Windows 3.1x that finds leaked GDI objects, and Code Breaker, a Mastermind-style game that was his first commercial program.

However, the source code does contain some interesting bits, including mixing 16-bit C code and 32-bit assembly via winmem32.dll, translating between DIBs with different color organizations, non-trivial management of a small palette, and background processing and window updating.
  1. bluedino

    It seemed like there were numerous versions of this, but LifeGenesis from Microsoft entertainment Pack was the one I remember playing the most

    https://games.zerker.ca/GameDetails/LifeGenesis_Windows%203....

  2. baruz

    I am not too familiar with Windows development in the 16-bit era, so I do not understand what Raiter means when he writes that he “de-Petzoldized” the code. I thought Petzold’s work on documenting the Windows API was foundational. Was it the style?

  3. DrHungers

    Has anyone ever seen a version of the game of life that's actually a playable "game" - that's fun and not just an interesting simulation? I would love to try it.

More from this day

2026-08-30