ED5 Sigil Engine
Sigil Engine — Tactical Card Game Framework
Ship a tactical card battler in days, not months. Full source code for a production-grade grid-based card game with multiplayer, AI opponents, admin panel, deck builder, shop, and more. Built with Next.js + Phaser + Supabase + TypeScript.
๐ Live Demo: unitcards.vercel.app
What You Get
This is a framework — it's a complete, working engine you can reskin, extend, and ship as your own. Every feature below is implemented and functional.
โ๏ธ Battle System — 36 Modular Game Systems
- Grid-based tactical combat — configurable board size, tile types, terrain costs, biomes
- Turn-based engine — draw โ play โ move โ attack loop with full turn management
- Realtime multiplayer mode — tick-based battles with 6 dedicated sync systems
- Pathfinding & movement — straight, diagonal, or both; variable movement steps
- Combat resolution — melee/ranged/caster attacks, shields (magic/melee), ammo & mana resources
- Floating damage numbers, projectile animations, VFX, dynamic lighting
- Camera controls — pan, zoom, follow, with mobile touch support
๐ 5 Card Types
| Type | Features |
|---|---|
| Units | HP, attack, range, movement, shields, resources (mana/ammo), sacrifice & synergy mechanics, flying |
| Buildings | Attack / defend / summon / utility roles, multi-tile support |
| Spells | Single / area / global / line / random targeting |
| Traps | Tile / unit / building placement, multiple trigger conditions |
| Castles | Collectible player bases with passive/active effects, multi-tile |
๐ฎ 6 Game Modes (All Implemented)
- Standard 1v1 — Destroy the enemy castle
- Capture the Flag — Dedicated flag system, scoring, and specialized CTF AI
- Castle Defense — Survive X turns against attackers
- Free-for-All — Up to 4 players
- Dungeon Crawl — Roguelike PvE with procedural maps, loot, chests, items, co-op lobbies
- Realtime Battle — Live tick-based multiplayer/single player (separate scene & systems)
๐ง Data-Driven Effect System
The engine's core power — every card ability is defined in JSON, not code. No programming required to create new cards or effects.
- 21 trigger types — onAttack, onDeath, onTurnStart, onStepOnTile, onFlagPickup, and more
- Composable conditions — target.hp < 50%, target.isEnemy, board position checks
- Action types — damage, heal, applyStatus, move, summon, modifyStats, and more
- Status effects — bleed, poison, freeze, stun — all JSON-configured
- Rules engine — separate AttackRules, MovementRules, PlacementRules for clean validation
๐ก๏ธ Full Admin Panel — 15 Sections
A complete back-office for managing every aspect of your game without touching code:
| Section | What It Does |
|---|---|
| Cards | Full CRUD — create, edit, delete cards with all stats and effects |
| Effects | Visual effect editor with triggers, conditions, and actions |
| Maps | Grid map editor with tile types, biomes, spawn points |
| Factions | Faction/group manager with shared effects and modifiers |
| Sprites | Sprite sheet manager — upload, configure frame dimensions, animations |
| Animations | Animation definition manager |
| Media | Media library with image uploads and cropping |
| Enemy Decks | AI opponent deck builder |
| Dungeons | Dungeon configuration — biomes, encounters, loot tables |
| Quests | Quest definitions and progression rules |
| Rewards | Reward configuration for all systems |
| Analytics | Game analytics dashboard |
| Users | Player management — give cards, currency, view profiles |
| Settings | Site-wide configuration |
| Test | Debug and testing tools |
๐ค AI Systems
- AI Opponents — 1,000+ line AI controller with scoring heuristics, attack focus profiles, pinned targets
- CTF AI — Specialized 780+ line AI with role-based tactics: runner, interceptor, defender, attacker
- AI Content Generation — OpenAI integration for generating card concepts, effects, and images from the admin panel
- AI Vision — Analyze card art and game screenshots
๐ Multiplayer & Social
- Realtime multiplayer via Supabase Realtime (WebSockets)
- Lobby system with matchmaking
- Friends system — add, remove, search, view profiles
- Card trading — offer, review, accept/reject trades
- Collection comparison — compare collections with friends
- Chat system — conversations, DMs, messaging
- Notifications — duel invites, friend requests, dungeon invites, trade offers
- Leaderboard & rankings with rank colors
- Co-op dungeon lobbies — invite friends to dungeon runs
๐ช Economy & Shop
- Card packs with configurable rarity weights and faction focus
- In-game currency (Shards) with bundle tiers
- Player marketplace — list, buy, cancel card listings
- Stripe integration — real-money checkout with webhook handling
- PayPal integration — alternative payment method
- XP & leveling system
- Quest rewards
- Starter card provisioning for new players
๐บ๏ธ Map & Tile System
- Configurable grid dimensions
- Tile types: normal, obstacle, spawnPoint, castleTile, flagTile
- Biomes: grassland, desert, snow, lava, swamp, void — each with lighting configs
- Variable movement costs, walkable/buildable flags
- Tile effects (poison swamp, lava burn, etc.)
- Mode-specific map restrictions
๐ฐ Dungeon Crawler Mode
A full roguelike PvE mode with its own systems:
- Procedural map generation with seeded RNG
- Encounter director — spawns enemies based on progression
- Loot system — 6 chest types (normal, silver, gold, diamond, mimic, cursed, locked)
- Item system — 11 weapon types, 5 armor types, 10 potion types, 7 equipment slots, 5 rarity tiers
- Co-op multiplayer — invite friends to dungeon runs via lobbies
- Dungeon leaderboard
๐งฑ Tech Stack
| Layer | Technology |
|---|---|
| Frontend & UI | Next.js 16 (React 19), Tailwind CSS, Framer Motion |
| Game Engine | Phaser 3.90 (embedded in Next.js) |
| Backend & Auth | Supabase (Postgres, Auth, Realtime, Storage) |
| Language | TypeScript (strict mode throughout) |
| Payments | Stripe + PayPal |
| AI | OpenAI API (GPT + Vision + DALL-E) |
| Platform | PWA (mobile-first, installable, offline-capable) |
๐ What's Included
- Full source code — ~150+ components, 36 game systems, 78 database migrations
- Complete type system — 1,000+ lines of TypeScript interfaces covering every game entity
- Database schema & seed data — cards, effects, maps, factions, packs ready to go
- 5 Phaser scenes — Boot, Preloader, Battle, RealtimeBattle, Dungeon
- 15-section admin panel — manage everything from the browser
- 16+ API routes — shop, AI generation, admin tools, webhooks
- PWA config — manifest, service worker, mobile-optimized
- Deployment ready — deploy to Vercel in minutes
๐จ Easy to Reskin
The engine is designed for data-driven customization:
- All cards, effects, and maps are JSON data, not hardcoded logic
- Swap art assets in
public/assets/ - Change colors and branding via Tailwind config
- Add new factions, card types, and game modes without modifying core systems
- Admin panel lets non-developers create and balance content
๐ก What You Can Build With This
- Tactical card battlers (Cards & Castles, Clash Royale-style)
- Turn-based strategy games (Fire Emblem, Advance Wars-style grid combat)
- Auto-battlers with the realtime tick system
- Dungeon crawlers / roguelikes using the dungeon mode
๐ Quick Start
- Clone the repo
npm install- Set up a free Supabase project
- Run migrations:
npx supabase db push - Add your env vars (.env.local)
npm run dev- Open
localhost:3000— you're live
๐ License
Commercial license included. Use in your own games, modify freely. You may not resell the engine source code as-is.
๐ข Support & Updates
Active development. Updates are posted as devlogs. Questions? Drop a comment below or reach out via the community.
v0.1.0 — Full Release. Built with TypeScript, tested in production.
© 2026 Sigil Engine. All rights reserved.
THIS ENGINE WILL RECEIVE PERIODIC AND MAJOR UPDATES FOR FREE
| Published | 8 days ago |
| Status | Released |
| Category | Tool |
| Platforms | HTML5 |
| Author | ChigooX |
| Tags | Game engine |




















