r/vibecoding • • 1d ago

Showcase/Project Built an open-source BioShock (2007) engine rewrite in C# (.NET 10) + Godot 4 with AI coding agents

GitHub: https://github.com/FrostySL/deep-sea-runtime

Wanted to share something a bit different from the usual SaaS/web app: I've been building Deep Sea Runtime, a clean-room GPLv3 engine rewrite for the original BioShock (2007) PC campaign in C# (.NET 10) and Godot 4.7.2 (Forward+).

No game files or proprietary code are in the repo. It reads the original .bsm maps, .blk texture archives, FSB3 audio, and VengeanceScript directly from a local PC install, plus an optional BioShock Remastered HiRes texture overlay. All 5 screenshots above are captured live in-engine from 1-Welcome.bsm and 1-Medical.bsm.

What actually helped keep an AI-assisted codebase of this size from turning into spaghetti: - Strict separation of concerns: pure .NET 10 binary readers (DeepSea.Packages) and game/script core (DeepSea.Core) with zero Godot dependency, plus a thin Godot Forward+ adapter (DeepSea.Game). - Rule of 3 Maps: never hardcode single-map IDs or scripts; every feature has to work generically across 0-Lighthouse.bsm, 1-Welcome.bsm, and 1-Medical.bsm. - Real verification: 245 synthetic unit tests (no game data needed) + 490+ data-backed checks + local Forward+ renders. - AI-friendly repo setup: AGENTS.md for coding agents, an automated GitHub PR guard that requires real before/after evidence and model disclosure (not banning AI PRs, just filtering out untested slop), and 5 curated starter issues.

Still early WIP: maps, DXT VRAM upload, UE2.5-to-PBR materials, volumetric fog, animated water, Havok 4.1 rest-pose skeletons, audio, basic movement, and quicksave/quickload work, while weapon/plasmid controls, HUD, menus, full Havok skeletal animation playback, and campaign combat parity are still in progress (Windows x64 tested so far; Linux scripts are an open starter issue).

If anyone here enjoys pushing coding agents on game engines, binary formats, or Godot .NET, feedback and PRs (AI-assisted ones explicitly welcome) are open.

17 Upvotes

12 comments sorted by

3

u/Total-Reasonable 1d ago

Since the .bsm maps come from Unreal Engine 2.5 with BSP geometry and baked lighting, how are you handling the lightmaps and the BSP visibility data when moving to Godot's Forward+ renderer?

2

u/Frostio 1d ago

I intentionally drop the old UE2.5 lightmaps and don't use the BSP visibility tree either.

For lighting I pull the placed Light actors (omni/spot, color, radius, brightness, flicker/pulse LightType, shadow flags) and the ZoneInfo ambient/fog colors straight from the .bsm and feed them into Godot Forward+ clustered lighting with GPU distance fade (starting at 26m, capped at 12 shadowed lights), plus SSAO, SSIL (or optional SDFGI), SSR and volumetric fog. Since the goal is a modernized look and a lot of BioShock lights get toggled or animated by scripts anyway, keeping it all live in Forward+ fits much better than trying to import 2007 lightmaps.

For BSP I parse UModel directly, filter out portal/zone/fake-backdrop and editor helper faces, bucket the visible polygons by material/sidedness into Godot ArrayMeshes, and build a ConcavePolygonShape3D for solid collision. Visibility is just Godot's frustum culling, shared ArrayMesh instancing for static meshes, and light distance fading. Welcome is around 3.3k mesh instances and ~520 lights and still runs around 165 fps on my 3080, so it hasn't been a bottleneck. If heavier maps ever need tighter indoor culling I'd probably just use Godot occluders rather than rebuilding the old BSP PVS tree.

1

u/Total-Reasonable 1d ago

Scripted light toggles are a good reason to go fully dynamic. The tradeoff is losing the baked indirect bounce that gave those interiors their soft, moody look, so I'd expect SDFGI to land closer than SSIL there. Have you compared the two on 1-Medical?

1

u/Frostio 15h ago

I actually have F4 hooked up to toggle live between SSIL and SDFGI (3 cascades, 0.4m min cell size), so you can switch right in-game. I kept SSIL as the default mostly because it's cheap and doesn't leak light through thin walls in tight interiors, and honestly I haven't done a proper side-by-side comparison on 1-Medical since re-tuning the ZoneInfo ambient and light falloff. Good point though, I should definitely compare both in Medical's bigger rooms and see how close SDFGI gets to that soft bounce.

2

u/AcnologiaSD 1d ago

Just wow, this a game and atmosphere i still refer to to this day, seeing it being revived is top 10 of AI things for me this year great work!

4

u/Frostio 1d ago

Thanks a lot! Rapture's atmosphere is still pretty much unmatched, that's the main reason I wanted to tackle it in the first place.

And the cool part about having an open-source C#/Godot rewrite once the classic BioShock 1 base is solid is everything it opens up afterwards. Stuff like optional BioShock 2 style dual-wielding and weapon handling, completely new plasmids, modernized movement, or custom mods all become pretty straightforward to plug in instead of fighting a closed 2007 binary. Still a long road to get the full campaign there, but that's definitely the fun part I'm looking forward to.

1

u/Layers3d 1d ago

Is a man not entitled to the sweat from his own brow?
NO! says the man with AI. It belongs to everyone.

1

u/Frostio 1d ago

I rejected those answers; instead, I chose something different. I chose the impossible. I chose... rewriting the engine.

1

u/Benjaminsen 20h ago

Is it actually playable or just very pretty?

1

u/Frostio 15h ago

Honestly, not really playable as an actual game yet, mostly pretty right now. You can load the maps, walk around with collision, open some doors, hear the audio, and test very early prototypes of scripts and combat, so it's more of an interactive tech preview than something you can actually play through.

Getting real gameplay parity (HUD, menus, weapon/plasmid wheel, animations, combat and campaign scripting) is still a lot of work, and honestly a big reason I posted it this early is hoping a few people might want to jump in and help push it toward actually being playable.

1

u/Benjaminsen 15h ago

Ahh totally fair, I was curious how you had managed that :)

2

u/DaltonJFowler 1d ago

This my favorite game of all time very cool, following!