{"id":29345013,"url":"https://github.com/jamesfmackenzie/chocolatekeen","last_synced_at":"2026-03-07T07:06:12.502Z","repository":{"id":82199746,"uuid":"196307683","full_name":"jamesfmackenzie/chocolatekeen","owner":"jamesfmackenzie","description":"Chocolate Keen is a reverse engineering of Commander Keen in C/C++ and SDL. The goal is to be super accurate versus the original","archived":false,"fork":false,"pushed_at":"2026-03-01T07:16:05.000Z","size":18819,"stargazers_count":77,"open_issues_count":3,"forks_count":7,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-03-01T09:34:24.222Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jamesfmackenzie.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-07-11T02:43:24.000Z","updated_at":"2026-03-01T07:16:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"ec04b943-654d-4ad2-800d-e49a7f5ec15c","html_url":"https://github.com/jamesfmackenzie/chocolatekeen","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jamesfmackenzie/chocolatekeen","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesfmackenzie%2Fchocolatekeen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesfmackenzie%2Fchocolatekeen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesfmackenzie%2Fchocolatekeen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesfmackenzie%2Fchocolatekeen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jamesfmackenzie","download_url":"https://codeload.github.com/jamesfmackenzie/chocolatekeen/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesfmackenzie%2Fchocolatekeen/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30209447,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-07T05:23:27.321Z","status":"ssl_error","status_checked_at":"2026-03-07T05:00:17.256Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-07-08T15:00:47.402Z","updated_at":"2026-03-07T07:06:12.491Z","avatar_url":"https://github.com/jamesfmackenzie.png","language":"C","funding_links":[],"categories":["Games"],"sub_categories":[],"readme":"# Chocolate Keen\nChocolate Keen is a reverse engineering of Commander Keen in C and SDL. The goal is to be super accurate versus the original\n\n## How to Play\n* You can play directly in the browser! Click \u003ca href=\"http://www.jamesfmackenzie.com/chocolatekeen\"\u003ehere\u003c/a\u003e\n* If you want to download and play offline, see the Releases section below  \n\n### Controls\n* Arrows - Move Keen around\n* Ctrl - Jump\n* Alt/Option - Use Pogo/Stop Pogo (if you have one)\n* Ctrl AND Alt/Option - Fire raygun (if it has charges)\n\nIf you’re having issues with the controls (e.g. on a Mac keyboard), you can change the key bindings with F3.\n\n## Releases\nDownloadable game packages available in \u003ca href=\"https://github.com/jamesfmackenzie/chocolatekeen/tree/master/releases\"\u003ereleases\u003c/a\u003e. All versions come packaged as zip files with game data. Just extract and run. On Linux, you'll need the \u003ca href=\"https://wiki.libsdl.org/Installation#Linux.2FUnix\" target=\"_blank\"\u003eSDL 2.0 runtime\u003c/a\u003e installed. Other versions come pre-packaged with SDL\n\n* \u003ca href=\"https://github.com/jamesfmackenzie/chocolatekeen/tree/master/releases/linux\"\u003ereleases/linux\u003c/a\u003e - Linux version. Run `./chocolate-keen`\n* \u003ca href=\"https://github.com/jamesfmackenzie/chocolatekeen/tree/master/releases/webassembly\"\u003ereleases/webassembly\u003c/a\u003e - WebAssembly version. Run `chocolate-keen.html`\n* \u003ca href=\"https://github.com/jamesfmackenzie/chocolatekeen/tree/master/releases/windows-x86\"\u003ereleases/windows-x86\u003c/a\u003e - for 32-bit Windows. Run `chocolate-keen.exe`\n* \u003ca href=\"https://github.com/jamesfmackenzie/chocolatekeen/tree/master/releases/windows-x64\"\u003ereleases/windows-x64\u003c/a\u003e - for 64-bit Windows. Run `chocolate-keen.exe`\n\n### Episodes Two and Three\nThe downloadable releases above come packaged with Commander Keen \"Invasion of the Vorticons\" Episode One: Marooned on Mars. But the engine supports the entire Vorticons trilogy. If you have Episode Two or Three, drop the level/data files into the GAMEDATA folder as follows:\n\n    .\n    ├── chocolate-keen.exe\n    └── GAMEDATA\n        ├── KEEN1\n        |   └── ... Episode One level data (pre-packaged)\n        ├── KEEN2\n        |   └── ... Episode Two level data\n        └── KEEN3\n            └── ... Episode Three level data\n    \nYou can then start each episode via `chocolate-keen.exe -startkeen1`, `chocolate-keen.exe -startkeen2` and `chocolate-keen.exe -startkeen3` respectively\n\n## Building\nYou can clone or download the chocolatekeen repo and build it yourself\n\n### Linux\nFor Linux builds you'll need a C compiler (e.g. gcc) and toolchain. The setup varies between distros. For Ubuntu you can install the build-essential package via `sudo apt-get install build-essential`. Once you have that setup:\n\n1. Install the SDL 2.0 development libraries. This varies between Linux distros. For Ubuntu it's `sudo apt-get install libsdl2-dev`. More info \u003ca href=\"https://wiki.libsdl.org/Installation#Linux.2FUnix\" target=\"_blank\"\u003ehere\u003c/a\u003e\n2. Launch a shell\n3. Navigate to `/build/linux`\n4. Run `./build_linux.sh`\n\n### WebAssembly\nTo build for WebAssembly, you'll need the \u003ca href=\"https://github.com/emscripten-core/emsdk\" target=\"_blank\"\u003eEmscripten SDK\u003c/a\u003e. Find setup instructions \u003ca href=\"https://emscripten.org/docs/getting_started/downloads.html\" target=\"_blank\"\u003ehere\u003c/a\u003e\n\n1. Launch a shell with emscripten build tools (emsdk) in the PATH\n2. Navigate to `/build/emscripten`\n3. Run `./build_emscripten.sh`\n\n### Windows (MinGW)\nThis is a Makefile project. To build for Windows you'll need something like \u003ca href=\"https://www.msys2.org/\" target=\"_blank\"\u003eMSYS2\u003c/a\u003e and a gcc toolchain. Find setup instructions \u003ca href=\"https://www.math.ucla.edu/~wotaoyin/windows_coding.html\" target=\"_blank\"\u003ehere\u003c/a\u003e\n\n1. Download and unzip SDL 2.0 development libraries: https://www.libsdl.org/download-2.0.php\n2. Launch a UNIX shell\n3. Navigate to `/build/mingw`\n4. Run build script that corresponds to your platform:\n* Windows x86:\n  * `./build_mingw32.sh /path/to/SDL2`\n  * e.g. `./build_mingw32.sh /d/Development/SDL2-2.0.9/i686-w64-mingw32/`\n* Window x64:\n  * `./build_mingw-w64.sh /path/to/SDL2`\n  * e.g. `./build_mingw-w64.sh /d/Development/SDL2-2.0.9/x86_64-w64-mingw32/`\n\n### Windows (Visual Studio)\nBuild and Debug with Microsoft Visual Studio / Visual C++\n\n1. Navigate to `/build/visual_studio`\n2. Open Solution file (`ChocolateKeen.sln`) in Visual Studio\n3. Restore NuGet dependencies (Project -\u003e Manage NuGet Dependencies \u003e Restore)\n4. Build (Build \u003e Build Solution)\n5. Run (Debug \u003e Start Without Debugging) or Debug (Debug \u003e Start Debugging)\n\nGame data is automatically copied to the Target Directory as part of build - so everything should \"just run\"\n\n## Authors\nThe original authors of Chocolate Keen are NY00123, QuantumG and Lemm. The project started with a reverse engineering of the original Keen code, and the goal is complete authenticity to the original - bugs and all. For more info see https://pckf.com/viewtopic.php?f=4\u0026t=2536\n\nSince bringing this to GitHub, I've ported to WebAssembly and I intend to support other platforms too \n\n## Developer Notes\n\n### Local CI-Style Check\n\nRun this from the repo root to execute the same quick checks used during refactors:\n\n```bash\n./scripts/ci-local.sh\n```\n\n### WebAssembly Notes\n\n#### Performance\nThe WebAssembly build of Chocolate Keen relies on \u003ca href=\"https://github.com/emscripten-core/emscripten/wiki/Emterpreter\" target=\"_blank\"\u003eEmterpreter\u003c/a\u003e. This hinders performance significantly vs using Emscripten loops. If you don't have a sufficiently fast machine you may notice audio stutters or frame skips\n\n#### Graphics\nAlthough the original game supports both EGA and VGA graphics modes, the WebAssembly build is hardcoded to VGA. The original game resolution is 320x200, which is internally scan-doubled to 320x400. The x-axis is then doubled also to preserve the aspect ratio, yielding 640x400. Once overscan borders are added, the internal game resolution jumps to 672x414. This is rendered into the HTML canvas to provide a pixel perfect image, and then aspect-ratio corrected to 4:3 via CSS\n\nSome parts of the game (initial load and exit screen) use VGA text mode. Internally this renders at 720x400 (or 736x414 with overscan) and is nearest-neighbour downsampled to the game resolution of 672x414. It looks ugly, but we have to live with this for now to preserve crisp game visuals\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamesfmackenzie%2Fchocolatekeen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjamesfmackenzie%2Fchocolatekeen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamesfmackenzie%2Fchocolatekeen/lists"}