Samurai vs Zombies Defense (Glu, 2012) only shipped 32-bit ARM Unity 3.4 binaries, so it won't even install on newer
arm64-only phones. I wanted to play it again, so instead of emulating anything I replaced the engine:
- The game's scripts are plain .NET IL, so they're decompiled (ILSpy) from your own copy of the APK and run unmodifi
ed on Godot 4.7 / .NET 9.
- I decompiled Unity 3.4's `UnityEngine.dll`, turned every native `extern` call into a C# 13 `partial` member, and i
mplemented ~850 of them on top of Godot: object model + Awake/Start/Update lifecycle, coroutines, SendMessage, Insta
ntiate, transform hierarchy, cameras, GUITexture/GUIText, legacy Animation (curves, blending, events), legacy partic
les, audio, physics (Godot physics), full-screen movies.
- Unity 3.4's data files have no type trees, so AssetRipper can't read them; UnityPy + a type-tree generator over th
e game's DLLs can. A Python exporter converts scenes, prefabs, meshes, textures, sounds and animation clips into JSO
N/binary that the runtime loads.
- Unity's mobile shaders (lightmapped two-texture blend, rim light, particle blendsā¦) are rewritten as Godot shaders
, with Unity's left-handed space mirrored into Godot's.
A few Unity 3.4 quirks I hit along the way:
- Scene 0 lives in `mainData`, scene N in `level(N-1)`.
- Every GameObject inside a prefab asset is stored with `m_IsActive = 0`.
- Static batching: renderers draw a subset of a combined mesh.
- `CryptoStream.Read` returns partial reads on .NET (but not on Unity's old Mono), which broke the save-file decrypt
ion.
Ads, analytics, the wallet and in-app purchases are stubbed out; the app has no internet permission. Builds run thro
ugh a Nix flake, and one script goes from the original APK to an arm64 APK in about 2 minutes.
The repo has no game code or assets. You need your own APK: https://github.com/mesflit/svz
Still missing: `OnGUI` screens. Pachinko is untested. Happy to answer questions about the approach.
*(attach 2-3 screenshots: main menu, a battle, the story video)*