Projects - FreeChain

About

FreeChain is a port of the Atari ST game "Chain Reaction", originally by Stephen Taylor and Colin Whitehead. It is a multi-player strategy game in which players take it in turns to add atoms to the board, causing reactions. If a player loses all of their atoms, they are out of the game. The last player standing wins.

FreeChain is played on a rectangular grid of cells. On their turn, a player may place an atom either in an empty cell, or in a cell already containing atoms they own.

Each cell has a maximum safe number of atoms it can hold; when this is exceeded, it explodes in a burst of criticality, spreading one atom to all adjacent cells. If opposing atoms were in those cells, they are captured by the player. If those cells are now over their own safe limits, they will explode. This can cause some rather impressive chain reactions.

▒▒▒▒▒───┬ → ┌───┬───┬
▒ o ▒ o │ → │ X o o▒▒▒▒▒───┼ → ├───┼───┼
│o oooo│ → │oooooo│
├───┼───┼ → ├───┼───┼

By exceeding the safe limit of the top-left corner, red has exploded outward and captured green's atom (as well as giving it a new friend). This explosion has also expanded the cell below it, which is now unstable, and will explode. That explosion will capture blue, and make it's cell unstable…

Of course, if it were blue's turn, they'd get to run this chain in reverse. It's possible to win FreeChain even if you're down to just one cell.

Most cells, in the middle of the grid, can safely hold three atoms. Edge cells can hold two, and corner cells can only hold one. The ncurses interface will remind you of which cells are on the threshold of exploding by displaying them slightly brighter than the others.

Download

License

FreeChain is, as you may have guessed from the name, licensed under the GNU GPL. Under DOS and Windows it makes use of the public domain PDCurses library. See the readme for details.

Windows

FreeChain v0.5.1, with ncurses interface and thick minmax AI. This is a console application, so it will appear in a "DOS" prompt, but is a proper 32-bit application and should run under any version of Windows since 95, including 64-bit Windows 7.

DOS

FreeChain v0.5 is 0.4 with patches to compile with DJGPP and PDCurses. Two binaries are included: frechain.exe, and frechaid.exe. The former will work on Windows 9x's "reboot into DOS mode" and up (such as command prompts). The latter has been combined with CWSDPMI so that it should work under real DOS—it works under DOSBOX. It also uses a slightly shallower AI search, so runs better on old or emulated hardware (it also still works under Windows if you have a slow Winbox).

Source

FreeChain SVN revision 1970 is the version built as 0.5.1 for Windows. It also includes the abandoned work on a GTK+2 interface for 0.6. When building you can specify a make target of freechain-nc or freechain-gtk; the default is to build both.

Other than this incomplete GTK+ port and the DOS/Windows patches, it is gameplay-identical to FreeChain v0.4, with ncurses interface and thick AI. That may be slightly cleaner to compile on Linux, MacOS X, or other POSIX-y platforms.

Once upon a time, releases were announced on my LiveJournal. That's quite dead now.

Other versions

If you want to play the original Chain Reaction, you'll need an Atari ST (possibly emulated), and the game. The Little Green Desktop may help with the latter.

Surprisingly, this is the only accurate CR port I know of, which is why I wrote it. There's a slightly disturbing DOS/X game based on it, but it lets atoms (er, foxes) share cells, and adds walls. (Still, if you want to get it to build, it seems to have fallen out of maintainance. It's GPL, though, so here's my patched version.) A two-player version called "Explode!" exists amongst the demos of a research OS written in Haskell(!) called House, but a player is only eliminated when they cannot move because the board is full.

Screenshots

While it's currently a ncurses console game, so looks like your terminal emulator, here's a screenshot of version 0.4 caning the author quite comprehensively:

That'll teach him to call the two-step lookahead unpruned minimax AI "thick".

Here's v0.5.1 running under Windows 7 64-bit, in a six-way computer battle (red won):