Hey everyone,
I took the Windows build of **SCP: Containment Breach Remaster v0.5.0** (a Unity Mono fan remaster licensed under CC BY-SA 3.0) and ported it to **native Android using Godot 4.6.3 (Vulkan Forward Mobile)**, with the entire reverse-engineering, asset optimization, and APK build pipeline packaged inside a single **Nix Flake**.
### Why & How it was built
- **Reverse Engineering:** Used **[REA (morluto/rea)](https://github.com/morluto/rea)** MCP/CLI alongside `ilspycmd` and `AssetRipper` to inspect `CB-Remaster.exe`, `ScpGame.dll`, and `Assembly-CSharp.dll`, mapping out movement physics, blink/stamina timers, procedural room generation (`15.36m` grid), doors, SCP-914, Tesla Gates, and SCP AI logic.
- **Mobile Asset Optimization:** The raw PC build is ~828 MB with uncompressed 2K/4K Unity textures. I wrote a Python pipeline (`scripts/build_mobile_assets.py`) that repacks the extracted `.glb` rooms, doors, items, and SCP models with mobile-sized textures and OGG Vorbis audio, bringing the runtime assets down to **~25 MB** (~33x reduction).
- **Native Android Performance:**
- Godot 4 **Vulkan Forward Mobile** renderer + ETC2/ASTC texture compression.
- Real-time **Room Distance Culling** (only rooms within 2–3 grid cells stay active).
- In-game **Low / Medium / High** presets (0.65x / 0.85x / 1.0x render scale) + live FPS counter.
- Supports both `arm64-v8a` and `armeabi-v7a`.
### What's currently playable
- **3-Zone Procedural Facility:** Light Containment Zone (LCZ) → Heavy Containment Zone (HCZ) → Entrance Zone (EZ) with keycard-locked checkpoints and Gate A escape.
- **4 Active SCPs:** SCP-173 (line-of-sight + blink movement + door opening), SCP-106 (phases through walls, slowed by flashlight, repelled by Tesla Gates), SCP-049 (patrols HCZ, hears sprinting, countered by SCP-714), and SCP-096 (cry → face-look panic → rage chase).
- **Mechanics & Mobile UX:** Dual-zone multi-touch controls (left analog stick + right camera drag), blink/stamina/health meters, 10-slot touch inventory, interactive **SCP-914**, **Tesla Gates**, live **S-Nav 300** minimap, save/load, and 6 languages (EN, TR, DE, ES, RS, CH).
- **100% Reproducible Nix Flake:** `nix run .#export-android` builds and signs the APK from scratch (Godot 4.6.3, export templates, Android SDK 34/35, JDK 17, REA, AssetRipper, FFmpeg).
### Links
- **GitHub Repo (Source + Nix Flake + REA reports):** https://github.com/mesflit/scp-cb-remaster-godot-android
- **Direct Android APK (Release v0.5.0-android):** https://github.com/mesflit/scp-cb-remaster-godot-android/releases/tag/v0.5.0-android
All original SCP assets and credits remain under **CC BY-SA 3.0** (full attribution to Undertow Games, Regalis, señorDane, and the SCP Foundation community is included in the repo).
Feedback, bug reports on different Android GPUs (Adreno/Mali/Xclipse), and PRs are very welcome!