Deterministic State Machine & Battle Resolver

A playable simulation of a digital TCG battle pipeline. Experience strict finite state machine (FSM) phase validation, seed-deterministic RNG trigger checks, and state hash verification.

1. IDLE
→
2. ATTACK STEP
→
3. GUARD STEP
→
4. DRIVE CHECK STEP
→
5. DAMAGE STEP
→
6. CLOSE STEP
Vanguard (Attacker)
Blaster Blade
17,000
Base 9k + Marron Boost 8k
VS
Opponent Vanguard (Target)
Dragonic Overlord
11,000
Base 11,000 (0 Shield)
Drive Check Reveal
[Face-down in Deck - Waiting for Drive Step]
Current State: IDLE
Deterministic Seed: 0x4F92B1
State Verification Hash: sha256:7e8a9...b4c2
Ready. Click "Declare Attack" to initiate combat pipeline.

Why Deterministic Finite State Machines Matter

In digital trading card games (like Cardfight!! Vanguard) and high-stakes financial order matching engines, state corruption and desync are unacceptable.

1. Strict State Isolation (FSM)

Actions are only valid within their exact phase. A client cannot send a "Drive Check" packet if the engine is not strictly in the DRIVE_CHECK state, eliminating timing and packet-injection exploits.

2. Seed-Based Deterministic RNG

Given the same initial seed and sequence of user inputs, the entire game or transaction matches identically across client and server. Replays are 100% reproducible by simply saving the input stream.

3. MoonSharp Lua Sandboxing & OTA

Game mechanics and card rules are written in sandboxed Lua scripts loaded dynamically over-the-air (OTA). The core C# engine guarantees zero memory leakage and strict execution timeouts.

4. Cryptographic State Hash (Auditability)

After each state transition, a checksum hash of the entire game tree is generated. In P2P multiplayer or financial audit trails, this allows instant desync detection without sending bulky payloads.

EA

Erlando Aubrey

Senior Backend & Distributed Systems Engineer

Architecting deterministic rule engines, low-latency financial systems, and full-stack software. Open to Senior/Staff Individual Contributor (IC) roles and technical consulting.