Mod options on the overlay: Mod Config Menu and Dead Sea Scrolls settings as native widgets in Game Options' Mods tab; GPL-2 LICENSE; README trimmed to a short overview of the differences from Repentance+, its behaviour and libraries; REPENTOGON's reference checkout gitignored
This commit is contained in:
1 parent
2d2c4536da
commit
a319517a5b
7 files changed
+633
-135
No files matched your search
@@ -1,106 +1,58 @@
|
||||
# Repentance+ rebuilt
|
||||
# Isaac: Repentance+ port
|
||||
|
||||
A native 64-bit Linux build of The Binding of Isaac: Repentance+ (v1.9.7.17), reconstructed as C++ from the
|
||||
original executable, with REPENTOGON's modding API built in.
|
||||
A native 64-bit Linux build of The Binding of Isaac: Repentance+ (v1.9.7.17), reconstructed as C++ from the original executable.
|
||||
|
||||
**Private.** This repo holds decompiled game code. It is a local git repo with no remote: never push it, publish
|
||||
it, or paste large parts of it anywhere public. Nothing from the game ships here: the game reads the player's own
|
||||
install, which it never modifies.
|
||||
## Differences from Repentance+
|
||||
|
||||
- Native Linux, no Proton or Wine.
|
||||
- [REPENTOGON](https://repentogon.com/)'s modding API is built in. Without REPENTOGON mods, the game plays as vanilla.
|
||||
- A developer overlay (` key) replaces the console, built on Dear ImGui. It has these windows:
|
||||
- Console: the game's and REPENTOGON's commands, plus extra ones (`give`, `room`, `boss`, `character`, `nextstage`, `clearroom` and others).
|
||||
- Game Options: every option in one place, REPENTOGON's included. Its Mods tab shows Mod Config Menu and Dead Sea Scrolls settings as native widgets.
|
||||
- Mods: turns mods on and off.
|
||||
- Debug and Log.
|
||||
- Online features (Steam, online co-op, leaderboards, daily uploads) are offline stubs.
|
||||
- Saves, mods and options live in a per-user folder, or wherever `SaveDirectory` in options.ini points. Steam Cloud is not used.
|
||||
- A test harness: headless runs, input recording and replay, and state traces.
|
||||
|
||||
### Behaviour
|
||||
|
||||
By default the game behaves exactly like the original. REPENTOGON's changes to vanilla behaviour (its bug fixes, Vanilla Tweaks options and callback reordering) only apply once the `VanillaParity` switch is turned off, either in the overlay's REPENTOGON tab or in `Repentogon/options.ini`.
|
||||
|
||||
### Libraries
|
||||
|
||||
The original's Windows platform layer is replaced by:
|
||||
|
||||
- SDL3: window, OpenGL context, input and audio.
|
||||
- Lua 5.3: mods. It is POSIX-built, with no native modules.
|
||||
- pugixml: the install's XML and `.anm2` files, and mods' XML.
|
||||
- rapidjson: REPENTOGON's JSON save files.
|
||||
- Ogg, Vorbis and Theora: cutscene videos, decoders only.
|
||||
- Dear ImGui (docking branch): the overlay.
|
||||
- stb: images and Vorbis sound.
|
||||
|
||||
## Clarification
|
||||
|
||||
This application was developed with the assistance of a large language model.
|
||||
|
||||
No game files ship here. The game reads your own install's `resources/` folder as it is, and never modifies it.
|
||||
|
||||
## Build
|
||||
|
||||
After cloning and entering the repository's directory, make sure to initialize the submodules:
|
||||
|
||||
```git submodule update --init --recursive```
|
||||
|
||||
Every library is built statically from the submodules.
|
||||
|
||||
```
|
||||
src/ the game (see Source layout)
|
||||
assets/ files the repository ships itself: the overlay's fonts (git-lfs), with their licences, and REPENTOGON's Lua
|
||||
scripts and the resources its menus load (assets/repentogon/, GPL-2, searched after every mount)
|
||||
external/ static submodules: SDL3, Lua 5.3, pugixml, rapidjson, Ogg, Vorbis, Theora, stb, Dear ImGui (docking)
|
||||
tools/ gitignored local tools: the resource importer and the test harness (tools/harness/)
|
||||
```
|
||||
|
||||
## Building and running
|
||||
|
||||
```sh
|
||||
git submodule update --init --recursive
|
||||
cmake -B build -G Ninja -DISAAC_RESOURCES="<install>/resources" && cmake --build build
|
||||
cmake -B build -G Ninja -DISAAC_RESOURCES="<install>/resources"
|
||||
cmake --build build
|
||||
build/linux/isaac
|
||||
```
|
||||
|
||||
The game builds into `build/<platform>/`, which holds only the executable and links to the folders it reads beside
|
||||
it: `resources` (`ISAAC_RESOURCES`, the import tool's `resources/` by default), `mods` (the repository's gitignored
|
||||
`mods/`) and `assets`. It runs from any folder. `--resources DIR` and `--mods DIR` replace either one for a run.
|
||||
Saves (save files, their backups, mod save data and REPENTOGON's per-save files) go to options.ini's `SaveDirectory`,
|
||||
or SDL's per-user folder when it is empty, and `--saves DIR` replaces it for a run. `--options FILE` reads and writes
|
||||
another options.ini, with REPENTOGON's options beside it. Logs and configs stay in the per-user folder.
|
||||
`--resources DIR`, `--mods DIR`, `--saves DIR` and `--options FILE` override those locations for a run.
|
||||
|
||||
The build uses ccache and mold when they are installed and precompiles the standard headers and `classes.h`.
|
||||
`-DISAAC_UNITY=ON` builds the game in unity batches, for faster clean builds and slower incremental ones.
|
||||
## License
|
||||
|
||||
SDL3 (window, OpenGL context, input, audio) and Lua 5.3 (mods) are built statically, with pugixml for data,
|
||||
rapidjson for REPENTOGON's own save files and Xiph's Ogg, Vorbis and Theora (decoders only) for the cutscene
|
||||
videos. Online features (Steam, EOS, curl) are offline stubs.
|
||||
|
||||
The game reads the player's own install as it is: its `resources/` folder mounts its packed archives
|
||||
(`src/engine/filesys.cpp`, a port of KAGE's file system: each archive indexed once at start-up, its files unpacked on
|
||||
demand) in the original's order (loose files, then animations, config, fonts, graphics, music, rooms, sfx, videos,
|
||||
afterbirth, afterbirthp, the repentance_<language> archives and secret.a, a later archive overriding an earlier one),
|
||||
with the language's mount (`resources.<code>`) searched first. Every resource
|
||||
(documents, anm2, images, sounds, music, videos, shaders, fonts, rooms, string tables, the game's Lua scripts) is read
|
||||
through that one file system, and nothing is ever written into the install. XML documents and `.anm2` files are read
|
||||
as the original's XML, and mods' own XML loads as it ships. Loaders read it through one node API
|
||||
(`src/engine/data.h`) over pugixml's tree. The import tool in `tools/` (gitignored) still unpacks an install into
|
||||
`resources/` and its mods into `mods/`, every file as it is.
|
||||
|
||||
## Source layout
|
||||
|
||||
`src/` is sorted by subsystem. A file drops its folder's prefix and includes others by path from `src/`
|
||||
(`#include "entity/boss/mom.h"`); CMake builds every `.cpp` under it.
|
||||
|
||||
```
|
||||
engine/ platform (SDL3 window, frame pacing, clock), gl, kage_* (graphics, input, sound), anm2, textures,
|
||||
fonts, video, renderers, the file system (packed archives) and data loading, log, seeds and RNG, the
|
||||
test harness
|
||||
game/ main, Manager, game_* (game/state, game/save, game/update ...), options, strings, save data, mods,
|
||||
sound and music managers, dailies, local versus
|
||||
level/ level_* (level/generator, level/stage ...), room*, backdrop, minimap, path finder, rails,
|
||||
stage transition, Greed
|
||||
grid/ grid entities (level/grid/rock, level/grid/door ...)
|
||||
entity/ Entity and its list, factory, config, collision, combat
|
||||
player/ Entity_Player split by concern (player/actives, player/cards, player/update ...), PlayerManager
|
||||
npc/ Entity_NPC and every enemy AI (npc/gaper, npc/hopper ...)
|
||||
boss/ every boss (boss/mom, boss/delirium ...)
|
||||
familiar/ Entity_Familiar and familiar behaviour
|
||||
effect/ Entity_Effect variants
|
||||
pickup/ pickups, slots, item config, item pools, procedural items
|
||||
weapon/ weapons, tears, lasers, knives, bombs, projectiles
|
||||
ui/ HUDs, popups, pause screen, cutscenes, console
|
||||
menu/ every menu screen (ui/menu/character, ui/menu/mods ...)
|
||||
overlay/ the developer overlay (CMake option ISAAC_OVERLAY, on by default): ` shows it in place of the console,
|
||||
with the Console, Game Options, Mods, Debug and Log windows on Dear ImGui
|
||||
lua/ the Lua engine, API bindings and callbacks
|
||||
online/ online-only code, kept as offline stubs
|
||||
repentogon/ REPENTOGON's modding API built in (CMake option ISAAC_REPENTOGON, on by default, OFF builds the vanilla
|
||||
game): its scripts' loading, its options store and the vanilla parity switch, inert without mods
|
||||
generated/ frozen decompiler output: classes.h declares every original class, global and function, and
|
||||
stubs.cpp stops the game at any original function src/ does not define
|
||||
```
|
||||
|
||||
## Test harness
|
||||
|
||||
Flags on the game binary (`src/engine/harness.cpp`), deterministic: the same input file always gives the same run.
|
||||
The first three leave the developer overlay out, so the console behaves as the original's.
|
||||
|
||||
```
|
||||
--headless no window, GL context or audio, no frame pacing (about 7,900 frames per second)
|
||||
--record F / --replay F per-frame input from boot, so menu navigation is included
|
||||
--frames N quit after N frames
|
||||
--trace F [--trace-every N] [--trace-detail] hashes (or the fields) of the RNGs, players and entities
|
||||
--mods DIR a private mods folder
|
||||
--screenshot-every N a windowed run saves every Nth frame (as Isaac.GetFrameCount() counts) to screenshots/
|
||||
```
|
||||
|
||||
`tools/harness/run.sh SAVE WORK [flags]` runs on a fresh copy of a save folder with a private `XDG_DATA_HOME`;
|
||||
`tools/harness/menu.py` writes the boot-to-run menu input; `tools/harness/compare.py A B` prints the first frame
|
||||
and field where two traces differ; `tools/harness/bot/` is a Lua mod that plays through `MC_INPUT_ACTION`.
|
||||
`tools/harness/goldens/check.sh` replays about 70 recorded runs (every character, the main and alternate floors,
|
||||
every final boss, Greed and Greedier, challenges, typed seeds, saving and continuing) on three saves (nothing unlocked
|
||||
in Hard, everything unlocked in Normal and in Hard) and names each trace that changed; `--record` re-records them.
|
||||
`RESOURCES=<install>/resources` points them at an install (the Steam install by default).
|
||||
Traces follow the compiler's float code, so check with a clang build, as the goldens were recorded.
|
||||
The code is under [GPL-2](LICENSE). The fonts in `assets/` and the libraries in `external/` are each under their own license.
|
||||
Reference in new issue
Block a user