Discordian Cybersecurity

🥋 Black Trigram Architecture: Five Fighters, Sacred Geometry in Combat

The Five Fighter Archetypes: Pattern in Combat Styles

Korean martial arts: diverse, sophisticated, historically profound. When architecting Black Trigram, I didn't invent five fighter archetypes—I discovered them embedded in the combat domain itself. Game-design.md documents this pattern recognition: each archetype represents a distinct combat philosophy rooted in actual Korean martial tradition and modern tactical specializations. Not arbitrary game balance—cultural authenticity meeting mechanical depth.

Five archetypes, each a complete combat system. Documented in game-design.md, these aren't palette swaps with stat tweaks. Each fighter embodies fundamentally different approaches to violence, tactical priorities, and ethical frameworks:

1. 무사 Musa (Traditional Warrior)

Military special forces with traditional training. Honor through strength, disciplined combat. Preferred trigrams: ☰ Heaven, ☳ Thunder. Signature techniques: joint manipulation (관절기법), vital point strikes (급소타격), submission control (제압술).

2. 암살자 Amsalja (Shadow Assassin)

Covert operative specializing in silent takedowns. Efficiency through invisibility, one perfect strike. Preferred trigrams: ☴ Wind, ☵ Water. Signature techniques: silent takedowns (무성제압), nerve strikes (신경파괴), respiratory attacks (호흡차단).

3. 해커 Hacker (Cyber Warrior)

Digital native with physical combat training. Information as power, technological advantage. Preferred trigrams: ☲ Fire, ☱ Lake. Signature techniques: anatomical analysis (해부학적분석), biomechanical destruction (생체역학파괴), systematic incapacitation (체계적제압).

4. 정보요원 Jeongbo Yowon (Intelligence Operative)

Government agent with psychological warfare training. Knowledge through observation, strategic thinking. Preferred trigrams: ☶ Mountain, ☷ Earth. Signature techniques: pain compliance (고통순응), psychological pressure (심리적압박), information extraction (정보추출).

5. 조직폭력배 Jojik Pokryeokbae (Organized Crime)

Underground fighter with street-smart brutality. Survival through ruthlessness, practical violence. Preferred trigrams: ☳ Thunder, ☵ Water. Signature techniques: environmental usage (환경활용), dirty techniques (더러운기법), survival fighting (생존격투).

The 70 Vital Points: Traditional Korean martial arts teaches 70 kyusho points (pressure points). Pattern: 7 × 5 × 2 (7 body regions × 5 points each × 2 sides). Our damage system implements all 70. Hit accuracy determining damage multiplier. Realism through numerology.

Game balance requiring five archetypes wasn't design choice—it was recognition of natural combat style clustering. Try four archetypes: gaps appear. Six: redundancy emerges. Five is complete.

React + PixiJS Architecture: Browser-Based Combat Simulation

Web-based combat simulation = democratized access. Documented in ARCHITECTURE.md, Black Trigram runs entirely in-browser using React 19 + PixiJS 8 + TypeScript. Zero backend. Zero installation. Zero platform lock-in. Open browser → train martial arts. This isn't compromise for convenience—it's intentional accessibility architecture. Fighting games historically gatekept behind console hardware and local multiplayer. We chose universal access instead.

1. 🖥️ React UI Layer

Korean-themed components with responsive design. Screens: CombatScreen, TrainingScreen, IntroScreen. Common UI: CombatHUD, TrigramWheel, ProgressTracker. Base modules: BaseButton, KoreanText, BackgroundGrid. Functional components with TypeScript throughout.

2. ⚙️ Game Logic Engine

TypeScript modules under src/systems/: CombatSystem orchestrates input → trigram → vital-point → damage → feedback. TrigramSystem manages stances via StanceManager, TransitionCalculator, TrigramCalculator, KoreanCulture. VitalPointSystem handles 70 vital points through KoreanAnatomy, HitDetection, DamageCalculator.

3. 🎨 PixiJS Renderer

PixiJS 8 with WebGL for 60fps 2D graphics. Manages character sprites (PlayerVisuals, EnemyVisuals), dojang background, particle systems (HitEffectsLayer), UI overlays. @pixi/react integration wraps PixiJS Application in React components.

4. 🎵 Audio Engine

Howler.js + Web Audio API for Korean traditional music blended with cyberpunk SFX. AudioManager loads bone cracks, impacts, ambient sounds. VariantSelector randomizes hit sounds. DefaultSoundGenerator provides fallback audio.

5. 🗄️ State Management

Zustand + React Context for in-browser state. useGameState, useUIState, useEnemyState track health, stamina, Ki, stance, combat metrics. No persistence—refresh resets progress. Client-side only, no backend dependencies.

Full architecture documentation: ARCHITECTURE.md includes C4 Container diagrams, Component views, Combat Flow sequences. TypeScript provides type safety across all layers. Vite handles build optimization with tree-shaking.

Web applications without layer enforcement become unmaintainable. React for UI, PixiJS for rendering, TypeScript for logic—clear separation enables confident refactoring without breaking systems.

Synchronicities: The Numbers Appearing

I don't believe in coincidences. I believe in patterns revealing themselves:

  • 70 vital points = 7 × 5 × 2. As documented in game-design.md, the game implements 70 traditional Korean martial arts pressure points (kyusho). Head (10 points), Neck (8 points), Torso (20 points), Arms (16 points), Legs (16 points). Mathematical pattern emerges from anatomical reality.
  • Eight trigram stances. ☰ Geon (Heaven), ☱ Tae (Lake), ☲ Li (Fire), ☳ Jin (Thunder), ☴ Son (Wind), ☵ Gam (Water), ☶ Gan (Mountain), ☷ Gon (Earth). Traditional I Ching philosophy integrated into combat mechanics via stance system documented in COMBAT_ARCHITECTURE.md.
  • 60-second round timer. As specified in game-design.md section 2.7, each round lasts exactly 60 seconds. Forces tactical decisions under time pressure. Winner determined by KO or higher health at timeout.
  • CombatStats tracking six core metrics. Health (❤️), Pain (😖), Balance (⚖️), Consciousness (🧠), BloodLoss (🩸), Stamina (🔋). Each stat interacts creating realistic combat feedback documented in game-design.md section 2.2.
  • 10×10 octagonal grid arena. Discrete positioning system with 0.3m cells. Octagon inscribed in square creates playable zone. Out-of-bounds cells trigger skid animation. Grid-based tactical combat per game-design.md section 2.1.

When game mechanics naturally align with numerological patterns, question emerges: did we impose structure, or did structure reveal itself through practice? Answer: both. Recognition, not invention.

Cultural Preservation Through Digital Accuracy

Not just entertainment. Educational tool preserving Korean martial arts techniques digitally through authentic representation:

  1. Authentic Technique Documentation: Combat system based on traditional Korean martial arts principles documented in COMBAT_ARCHITECTURE.md. Realistic vital point targeting, stance-based combat, authentic trigram philosophy integration.
  2. Historical Context: Game design document provides comprehensive background on Korean martial arts traditions. Technical breakdowns of each archetype's fighting philosophy. Cultural significance explained alongside mechanics.
  3. Language Respect: Korean terminology preserved throughout. Hangul script for fighter names: 무사 (Musa), 암살자 (Amsalja), 해커 (Hacker), 정보요원 (Jeongbo Yowon), 조직폭력배 (Jojik Pokryeokbae). English translations as supporting context, not replacement.
  4. Open Source Education: Complete game architecture documented in public repositories. ARCHITECTURE.md, COMBAT_ARCHITECTURE.md, game-design.md available at github.com/Hack23/blacktrigram. Students can examine implementation of traditional techniques in modern gaming context.
  5. Transparent Development: Technical decisions documented with cultural respect. No exploitation of Korean martial arts imagery. Educational value through accurate representation and accessible documentation.

Not commercial exploitation. Open-source cultural preservation. Revenue (if any) supporting Korean martial arts schools. Respect encoded in architecture.

Digital preservation that disrespects source culture fails its mission. We consult, we compensate, we credit. Technology serving culture, not extracting from it.

Future Architecture: Five-Year Evolution

Roadmap: FUTURE_ARCHITECTURE.md. Five major enhancements:

Year 1: Online Multiplayer

Netcode for rollback. Lag compensation. Ranked matchmaking. 5-region servers (Asia, Europe, NA, SA, Oceania).

Year 2: Training Mode Enhancement

Frame data display. Hitbox visualization. Combo tutorials. AI sparring. Practice against 5 difficulty levels.

Year 3: Mobile Port

iOS + Android versions. Touch controls. Performance optimization. 5 control schemes (virtual joystick, swipe, tap, tilt, external controller).

Year 4: VR Support

First-person martial arts. Motion controller tracking. Physical movement mapped to in-game techniques. 5 VR platforms (Quest, PSVR, Index, Vive, WMR).

Year 5: AI Coach

Machine learning analyzing player performance. Personalized training recommendations. Weakness identification. Improvement tracking across 5 skill categories.

Investment timeline: 15% development budget annually. Fibonacci-adjacent growth. Sustainable evolution without feature bloat.

Technical Stack: Modern Web Meets Unity

Hybrid architecture: Unity for game engine, React+TypeScript for UI/menus. Best of both worlds.

  • Unity 2022 LTS: Game engine, physics, rendering. C# for core systems.
  • React + TypeScript: Menu system, settings, character select. Web UI embedded in Unity.
  • WebGL Build: Browser-playable version. No install required. Accessibility through web.
  • GitHub Actions CI/CD: Automated builds. 5 platforms: Windows, macOS, Linux, WebGL, Android (future).
  • Asset Pipeline: Blender → FBX → Unity. Texture compression. LOD generation. 5-stage optimization.

Evidence: OpenSSF Scorecard 7.0/10. CII Best Practices badge. SLSA Level 3 attestations. Game development with software engineering rigor.

Architectural Wisdom: Five Lessons from Game Development

  1. Five fighter archetypes = minimum viable diversity. Fewer feels limited. More feels redundant. Five balances variety with learnability.
  2. Layer separation crucial in Unity. Without discipline, everything couples to everything. Our five layers enforce separation of concerns.
  3. Cultural authenticity requires consultation. Can't fake Korean martial arts. Consulted masters. Compensated advisors. Resulted in respectful, accurate representation.
  4. Open source game development = transparency. Code, assets, design docs—all public. Community contributions improving quality. Collaboration over secrecy.
  5. Sacred numbers appear in gameplay naturally. 5-hit combos, 70 vital points, 5-frame increments—patterns emerging from playtesting, not imposed by design.

Game architecture frozen in initial design becomes obsolete as gameplay evolves. Architecture with documented evolution enables confident iteration—players see trajectory, not just snapshot.

Explore the Sacred Combat Geometry

Think for yourself. Play the game. Read the code. Study the patterns. Five fighter archetypes, 70 vital points, sacred geometry in combat simulation—patterns visible when you know where to look.

Simon Moon, System Architect, Hack23 AB

"Combat choreography revealing mathematical elegance. Five fighters, infinite possibilities."

Continue the Journey

Next: Black Trigram Combat System - Deep dive into hit detection and physics

Related: Complete Documentation - All architecture diagrams and game design specs

Back to: Security Blog - All discordian posts