PFE_Unity
A 2D top-down action/RPG shooter rebuilt in Unity 6 from an original ActionScript 3 (Flash) game — with a from-scratch binary SWF parser and a "base game as a mod" content pipeline.
PFE_Unity is a 2D top-down action/RPG shooter rebuilt in Unity 6 from an original ActionScript 3 (Flash) game. It preserves the original gameplay feel — 30fps frame-accumulator weapon logic, kontur/border-mask tile rendering, room streaming with a frozen-room buffer — while replacing the Flash runtime with a modern, DI-driven, testable Unity architecture.
The standout engineering piece is the content modding pipeline: the base game is itself treated as the first mod (pfe.base), and a dependency-free ModAPI contract assembly lets third-party mods supply weapons, units, rooms, items, etc. via AssetBundles with automatic ID namespacing (rifle → pfe.base.rifle) and Additive/Override conflict resolution.
A custom binary SWF parser (683 lines) reads the original Flash source at the bit level and feeds editor importers that convert it into Unity ScriptableObjects and sprites, so the port reuses the original art rather than re-authoring it. The architecture uses VContainer DI, MessagePipe events (zero-alloc structs), R3 reactive UI binding, and UniTask async, with an ITimeProvider abstraction enabling deterministic combat tests.
Key features
- Faithful Unity 6 port of an AS3 Flash action/RPG — preserves 30fps frame-accumulator weapon logic and kontur tile rendering.
- "Base game as a mod" pipeline behind a zero-dependency ModAPI contract assembly.
- Automatic ID namespacing (rifle → pfe.base.rifle) + Additive/Override conflict resolution.
- From-scratch binary SWF parser (683 lines) converting Flash source to Unity ScriptableObjects/sprites.
- VContainer DI + MessagePipe events (zero-alloc structs) + R3 reactive UI + UniTask async.
- ITimeProvider abstraction enabling deterministic frame-unit combat tests.
- Procedural room generation, custom 2D physics, multi-weapon combat (ranged/melee/magic/thrown/unarmed).
- 42 NUnit tests across Combat (12), Map (15), RPG (9), Inventory, and Play-mode integration.