Open-source project
OpenFodder/openfodder avatar
OpenFodder/openfodder

Open Fodder: an open-source engine for the Cannon Fodder game

Open Fodder: An open source port of Cannon Fodder

611 stars61 forksC++GPL-3.0

At a glance

What is it?
Open Fodder is a from-scratch open-source implementation of the Cannon Fodder engine for modern operating systems, with a scripted random map generator, a separate campaign editor, and a long option list for platforms, engines and tests. The engine is free; the retail game is not.
Who is it for?
Open Fodder is worth adopting if you want to study or extend a 1990s strategy-shooter engine, generate random missions from scripts, or contribute an engine without touching the original game's assets, and the retail releases are cheap to buy from GOG for the data packs. It is the wrong choice if you expected a complete game, because the engine ships without the retail content.
Can I use it commercially?
Yes, with conditions. GPL-3.0 is a copyleft licence: if you distribute software that includes it, you must release that software's source code under the same licence. Running it internally without distributing it does not trigger that obligation.
Is it still maintained?
Yes. The repository last received commits 3 days ago.
What is it written in?
Mainly C++, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 23, 2026, and from our analysis. They are not legal advice.

Editorial analysis

What Open Fodder is and what it deliberately leaves out

Cannon Fodder was an action-strategy shoot 'em up developed by Sensible Software and published by Virgin Interactive. It was military themed, built around shooting action, but controlled with a strategy game style system where the player directs troops through missions against enemy infantry, vehicles and installations. Open Fodder is an open-source version of that engine, written for modern operating systems.

The distinction between engine and game matters here, because it is where the licensing and the ethics sit. The repository contains the engine, not the retail content. The README lists the supported versions as Cannon Fodder for Amiga, Amiga CD32 and DOS CD, and Cannon Fodder 2 for Amiga and DOS CD, and it is explicit that the retail releases are purchased from Good Old Games. The data that ships with the project is the demo set: six Amiga magazine cover disk demos and one PC demo, from magazines including Amiga The One issue 68, Amiga Power issue 31, Amiga Action issue 51, Amiga Format issue 54, Amiga Power issue 45, Amiga Format issue 68 and PC Format CD-ROM number 1.

The acknowledgements give the lineage plainly: Sensible Software for the original game, Alessandro Petralia for valuable testing, and ScummVM for the Amiga sound routines. That last credit is the clue to the engineering approach, since reimplementing an Amiga title on modern systems usually means porting the original's audio code rather than rewriting it. The repository itself is organised like a game project rather than a library: a Source directory with subdirectories for the PC and Amiga variants, a Projects directory for the IDE project files, a cmake directory alongside a top-level CMakeLists.txt and a Makefile, a Run directory that receives the built executable, a FreeDesktop directory for the Linux desktop entry, and vcpkg.json with vcpkg-configuration.json for the Windows dependency setup. There is also an openfodder.ini.example configuration file, and a .gitmodules entry pointing at the data packs.

The command line: platform defaults, engines, maps and test modes

The engine exposes a long option list rather than only a windowed game, and the README prints it in full. The options fall into clear groups.

bash
      --about                   About
  -h, --help                    Help
      --pc                      Default to PC platform data
      --amiga                   Default to Amiga platform data
      --engine cf1              Default to engine (single map/random)
                                (default: cf1)
      --columns 22              Number of camera columns (default: 22)
      --rows 16                 Number of camera rows (default: 16)
  -w, --window                  Start in window mode
      --unit-test               Run Tests
      --unit-test-headless      Run Tests, with no output
      --nosound                 Disable sound output
      --playground              Sprite playground
      --list-campaigns          List available campaigns
      --random-save "MyMap"     Generate and save a random map (default: )

The first group decides which data and which engine variant to use. The --pc and --amiga flags select the platform data as the default, and --engine cf1 picks the engine, described as single map or random. The --about flag prints information and -h or --help prints the usage text.

The second group shapes the view. --columns and --rows set the number of camera columns and rows, defaulting to 22 and 16, -w or --window starts in window mode, --window-scale sets the scale, and --integer-scaling is on by default.

The third group is about the simulation itself. --max-sprite caps sprites at 45 by default and --max-spawn caps spawns at 10, --sleep-delta sets the engine speed at 2, and --cheats enables the cheat keys. The fourth group is the tooling that makes the engine testable and scriptable: --demo-record and --demo-play work with demo files, --demo-record-all records a demo of everything, --unit-test runs the test suite and --unit-test-headless runs it with no output, and --playground opens the sprite playground. The last group skips presentation, with --skipintro, --skipbriefing, --skipservice and --skiphill, and there is also a --nosound switch for machines without audio.

Two groups are worth a second look. --list-campaigns lists the campaigns that the loaded data provides, and --single-map plays one named map, --random generates and plays a random map and --random-save generates a random map and saves it. The --script option names a JavaScript file to execute, which is the hook into the next section. The campaign and mission selectors, -c and -m, plus -p for the starting phase, let a session resume at a specific point.

Random maps and the JavaScript scripting layer

Open Fodder includes a JavaScript interpreter, and the README states its purpose plainly: creating randomized maps. A number of scripts are provided that implement various functionality, such as placing random hostages, rescue tents, and a helicopter if required to rescue the hostages. Customisations and additions can be made to any of the scripts.

This is the most interesting design decision in the project, because it turns the engine into a generator. A Cannon Fodder mission is a grid of positions and units, and once the layout logic lives in JavaScript rather than in compiled code, the space of possible missions becomes something you can explore programmatically rather than something you have to hand-author in the editor.

The combination with --random, --random-save and --script is what makes that usable in practice. A script can produce a map, the engine can play it immediately, or it can be written to disk for later. The scripting layer is also why the editor lives in a separate repository. The OpenFodder editor project holds the campaign and map editor, which is a distinct tool from the engine that runs the result, and a workflow that spans two repositories is a common source of friction that the maintainers solved by splitting them.

Building from source and running the demos in a browser

Installation details live in a separate INSTALL.md document, and the README points at it rather than repeating the steps. It also links a Windows executable built during testing, hosted as a zip on the project's own file storage, for anyone who wants the most recent Windows build without a toolchain. The repository has GitHub Actions workflows for the Windows and Linux builds, with status badges for each.

The top-level Makefile shows what a Unix build involves. It compiles with clang++ under the C++14 standard with warnings on, pulls include paths from DirectFB and the Source directory, and takes the compiler and linker flags for SDL2 from sdl2-config, linking the SDL2 mixer library as well. The output is linked into the Run directory as OpenFodder.

bash
CC = clang++ $(CXXFLAGS) -c -Wall -std=c++14 -ferror-limit=100 $(pathInc) $(Libs)
LD = clang++ $(LDFLAGS) obj/*.o -lpthread $(DLibs) 
all : fodder
fodder: 	main
		mv *.o obj/
		$(LD) -o Run/OpenFodder

Two details in the build are more than incidental. The Makefile generates a version header from the git log with a single git command, writing the short hash into Source/gitver.hpp, so the executable records the exact commit it came from. It also compiles the PC and Amiga source trees together, which matches the Amiga and PC platform support in the data and in the F1 and F2 hot keys that switch between versions at runtime.

Playing does not require a build at all. The README states that the demos can be played in the browser, with an OpenFodder.html page hosted on the project's file storage, which is a compiled-to-WebAssembly path that puts a 1990s strategy shooter in a browser tab. For the engine, the hot keys do the rest of the work: F1 and F2 switch between the Amiga and PC versions when available, F9 and F10 make the current squad invincible and complete the current map when cheats are enabled, F11 toggles full screen, F12 locks the cursor to the window, and plus and minus change the window size.

Where the project stands: licence mix, releases and the split with the editor

The repository carries four separate licence files alongside the main COPYING file, which is the usual shape for a project that mixes its own code with third-party components: COPYING, COPYING.BSD.txt, COPYING.LGPLv2.1.txt, COPYING.MIT.txt and COPYING.ZLIB.txt. The project's own metadata records the repository under GPL-3.0, and the README carries a FOSSA licence status badge.

The practical implication is that the engine source carries copyleft obligations while the bundled third-party code carries its own terms, and that the Amiga sound routines credited to ScummVM arrive under their own licence rather than under the project's. Anyone planning to redistribute a build should read the individual files rather than assume a single licence covers the tree.

On activity, the repository is not archived and the last push was on 2026-10-19, which puts it in active use even though the public release tags in the repository history are older, with 1.9.2 dated 2024-06-02 and 1.9.1 dated 2024-06-01. Continuous integration badges for the Windows and Linux builds suggest the work continues even when tagged releases do not. The repository also carries BUGS.md, COMPILING.md, CONTRIBUTING.md and IDEAS.md, which is the paperwork of a project that wants contributors rather than just users.

The clearest signal of where this goes is the two repository split. The engine and the editor are separate codebases with separate purposes, and the scripting layer sits between them, letting the generator produce content that the editor can refine. That arrangement is more useful than a single all-in-one tool, and it is the pattern most open-source reimplementations of old games eventually adopt.

Editorial conclusion

Open Fodder is worth adopting if you want to study or extend a 1990s strategy-shooter engine, generate random missions from scripts, or contribute an engine without touching the original game's assets, and the retail releases are cheap to buy from GOG for the data packs. It is the wrong choice if you expected a complete game, because the engine ships without the retail content. Verify first that your platform matches one of the listed supported versions, that SDL2 and the mixer library are present for a source build, and that the separate editor repository is cloned before you try to author campaigns.

Frequently asked questions

What is Open Fodder and what does it include?

It is an open-source version of the Cannon Fodder engine for modern operating systems. The README states that it supports six Amiga demos from the Amiga platform and three retail releases, and that the retail versions are purchased separately from Good Old Games.

How do I install or build Open Fodder?

The README points to INSTALL.md for installation, and the repository contains a Makefile, a CMakeLists.txt and vcpkg files for Windows. A prebuilt Windows executable is also linked from the project file storage.

What does the JavaScript interpreter in Open Fodder do?

It is used to create randomized maps. The README says a number of scripts are provided that implement functionality such as placing random hostages, rescue tents, and a helicopter if required to rescue the hostages, and that the scripts can be customised.

Which Cannon Fodder versions does Open Fodder support?

Cannon Fodder for Amiga, Amiga CD32 and DOS CD, and Cannon Fodder 2 for Amiga and DOS CD. The project also ships six Amiga magazine cover disk demos and one PC demo in its data pack.

Is the map editor part of the Open Fodder repository?

No. The README links a separate OpenFodder editor repository for the campaign and map editor, while the main repository holds the engine, its scripting layer and the build files.

Official sources

  1. License: GPL-3.0
  2. OpenFodder/openfodder on GitHub
  3. Project website
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/openfodder-openfodder.svg)](https://hysenlabs.com/projects/openfodder-openfodder)

Was this useful?