magicciv/drafts/site-c/index.html
2026-05-26 02:21:12 -07:00

352 lines
17 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Magic Civilization: a 4X engine designed for modders. Ship your own AI. Coming soon to Steam, App Store, Google Play.">
<title>Magic Civilization — Mod the Mind</title>
<link rel="stylesheet" href="styles.css">
<link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600&family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
</head>
<body>
<!-- Navigation -->
<nav class="navbar">
<div class="container">
<div class="nav-brand">
<span class="logo-text"></span> Magic Civilization
</div>
<ul class="nav-links">
<li><a href="#ai-interface">AI Mods</a></li>
<li><a href="#wasm">WASM</a></li>
<li><a href="#roadmap">Roadmap</a></li>
</ul>
</div>
</nav>
<!-- Hero Section -->
<section class="hero">
<div class="container">
<div class="hero-content">
<h1>Mod the Mind</h1>
<p class="hero-tagline">A 4X engine built for modders. Ship your own AI. Play against decision-makers you designed.</p>
<div class="hero-ctas">
<a href="#" class="cta primary">Wishlist on Steam</a>
<a href="#" class="cta secondary">View AI Mod Docs</a>
</div>
<div class="hero-meta">
<p><strong>Age of Dwarves</strong> — Episode 1 • Coming Soon</p>
<p class="platforms">Available on <span class="chip">Steam</span> <span class="chip">App Store</span> <span class="chip">Google Play</span></p>
</div>
</div>
<div class="hero-visual">
<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg" class="ai-diagram">
<!-- AI mod concept: neural net neuron -->
<circle cx="100" cy="100" r="80" fill="none" stroke="var(--accent)" stroke-width="2" opacity="0.3"/>
<circle cx="100" cy="100" r="60" fill="none" stroke="var(--accent)" stroke-width="1.5" opacity="0.5"/>
<circle cx="100" cy="100" r="40" fill="none" stroke="var(--accent)" stroke-width="1" opacity="0.7"/>
<!-- Center node -->
<circle cx="100" cy="100" r="8" fill="var(--accent)"/>
<!-- Surrounding decision nodes -->
<circle cx="100" cy="40" r="5" fill="var(--accent)" opacity="0.6"/>
<circle cx="100" cy="160" r="5" fill="var(--accent)" opacity="0.6"/>
<circle cx="50" cy="100" r="5" fill="var(--accent)" opacity="0.6"/>
<circle cx="150" cy="100" r="5" fill="var(--accent)" opacity="0.6"/>
<circle cx="60" cy="60" r="5" fill="var(--accent)" opacity="0.6"/>
<circle cx="140" cy="140" r="5" fill="var(--accent)" opacity="0.6"/>
<!-- Connecting lines -->
<line x1="100" y1="100" x2="100" y2="40" stroke="var(--accent)" stroke-width="1" opacity="0.4"/>
<line x1="100" y1="100" x2="100" y2="160" stroke="var(--accent)" stroke-width="1" opacity="0.4"/>
<line x1="100" y1="100" x2="50" y2="100" stroke="var(--accent)" stroke-width="1" opacity="0.4"/>
<line x1="100" y1="100" x2="150" y2="100" stroke="var(--accent)" stroke-width="1" opacity="0.4"/>
<line x1="100" y1="100" x2="60" y2="60" stroke="var(--accent)" stroke-width="1" opacity="0.4"/>
<line x1="100" y1="100" x2="140" y2="140" stroke="var(--accent)" stroke-width="1" opacity="0.4"/>
</svg>
</div>
</div>
</section>
<!-- AI Interface Section -->
<section id="ai-interface" class="ai-interface">
<div class="container">
<h2>The AI Plugin Interface</h2>
<p class="section-intro">Three trait methods. One decision loop. Your imagination.</p>
<div class="code-block">
<pre><code><span class="kw">pub trait</span> <span class="typ">DecisionMaker</span> {
<span class="kw">fn</span> <span class="fn">decide_turn</span>(
<span class="kw">&amp;mut</span> <span class="kw">self</span>,
<span class="var">state</span>: <span class="typ">&amp;GameState</span>,
<span class="var">slot</span>: <span class="typ">PlayerId</span>,
<span class="var">seed</span>: <span class="typ">u64</span>,
) <span class="kw">-&gt;</span> <span class="typ">Vec</span>&lt;<span class="typ">Action</span>&gt;;
<span class="kw">fn</span> <span class="fn">resolve_combat</span>(
<span class="kw">&amp;mut</span> <span class="kw">self</span>,
<span class="var">units</span>: <span class="typ">&amp;</span>[<span class="typ">Unit</span>],
) <span class="kw">-&gt;</span> <span class="typ">CombatOrder</span>;
<span class="kw">fn</span> <span class="fn">inspect</span>(<span class="kw">&amp;self</span>) <span class="kw">-&gt;</span> <span class="typ">AiMetadata</span>;
}</code></pre>
</div>
<div class="features-grid">
<div class="feature">
<div class="feature-icon">📊</div>
<h3>Access Complete State</h3>
<p>Map, units, cities, tech, economics, diplomacy—everything the game knows, your AI sees.</p>
</div>
<div class="feature">
<div class="feature-icon">🎲</div>
<h3>Deterministic by Design</h3>
<p>Same seed, same game. Replay, debug, validate your decisions. No RNG surprises.</p>
</div>
<div class="feature">
<div class="feature-icon"></div>
<h3>Composition Over Config</h3>
<p>Implement once, plug in everywhere. Trading, diplomacy, magic, combat—one interface.</p>
</div>
</div>
<div class="ai-variants">
<h3>Shipping AI Variants</h3>
<div class="variant-list">
<div class="variant">
<span class="variant-tag neural">Neural</span>
<strong>Learned (PPO)</strong>
<p>Trained via self-play. Open-sourced as worked example. 128K games, 5 strategies emergent.</p>
</div>
<div class="variant">
<span class="variant-tag scripted">Scripted</span>
<strong>Six Personalities</strong>
<p>MCTS + heuristics. Dwarven Traditionalist, Trader, Conqueror, Scholar, Mystic, Xenophobe.</p>
</div>
</div>
</div>
</div>
</section>
<!-- WASM Section -->
<section id="wasm" class="wasm">
<div class="container">
<h2>WASM by Default</h2>
<p class="section-intro">Safe. Deterministic. Cross-platform. The mod lingua franca.</p>
<div class="wasm-grid">
<div class="wasm-item">
<div class="wasm-icon">🔒</div>
<h3>Sandboxed</h3>
<p>No filesystem, no network, no OS calls. Your mod can't crash the game or steal saves.</p>
</div>
<div class="wasm-item">
<div class="wasm-icon"></div>
<h3>Deterministic</h3>
<p>Floating-point ops, RNG, time—all pinned. Replays never diverge, even years later.</p>
</div>
<div class="wasm-item">
<div class="wasm-icon">📦</div>
<h3>One Binary</h3>
<p>Compile once. Ships unmodified on Windows, macOS, Linux, mobile. No per-platform rebuilds.</p>
</div>
<div class="wasm-item">
<div class="wasm-icon">🚀</div>
<h3>Near-Native Speed</h3>
<p>Wasmer JIT + engine optimizations. Typical AI turn decision: &lt;100ms on mid-range hardware.</p>
</div>
</div>
<div class="wasm-diagram">
<h3>Loading Pipeline</h3>
<svg viewBox="0 0 500 120" xmlns="http://www.w3.org/2000/svg" class="pipeline-svg">
<!-- Boxes -->
<rect x="10" y="30" width="90" height="60" fill="none" stroke="var(--accent)" stroke-width="2" rx="4"/>
<text x="55" y="65" text-anchor="middle" dominant-baseline="middle" class="svg-text">Mod.wasm</text>
<polygon points="110,60 130,40 130,80" fill="var(--accent)"/>
<rect x="140" y="30" width="90" height="60" fill="none" stroke="var(--accent)" stroke-width="2" rx="4"/>
<text x="185" y="65" text-anchor="middle" dominant-baseline="middle" class="svg-text">Validate</text>
<polygon points="240,60 260,40 260,80" fill="var(--accent)"/>
<rect x="270" y="30" width="90" height="60" fill="none" stroke="var(--accent)" stroke-width="2" rx="4"/>
<text x="315" y="65" text-anchor="middle" dominant-baseline="middle" class="svg-text">Instantiate</text>
<polygon points="370,60 390,40 390,80" fill="var(--accent)"/>
<rect x="400" y="30" width="90" height="60" fill="none" stroke="var(--accent)" stroke-width="2" rx="4"/>
<text x="445" y="65" text-anchor="middle" dominant-baseline="middle" class="svg-text">Game</text>
<!-- Labels -->
<text x="55" y="100" text-anchor="middle" class="svg-label">Signed</text>
<text x="185" y="100" text-anchor="middle" class="svg-label">Checksum</text>
<text x="315" y="100" text-anchor="middle" class="svg-label">Sandboxed</text>
<text x="445" y="100" text-anchor="middle" class="svg-label">Deterministic</text>
</svg>
</div>
</div>
</section>
<!-- Native Escape Hatch -->
<section id="native" class="native">
<div class="container">
<h2>Native Escape Hatch</h2>
<p class="section-intro">Need raw GPU? Deep reinforcement learning? Go native—with your signature.</p>
<div class="native-content">
<div class="native-text">
<p>For AI projects that demand native performance (CUDA, large model inference, specialized math), sign your plugin with a developer certificate. The game loads and isolates it—you own the security risk, you own the support burden.</p>
<p><strong>The bar is signature, not gatekeeping.</strong> We're not reviewing code. We're not limiting what you can do. Sign it, ship it, users decide.</p>
<div class="native-callout">
<p><strong>Post-launch roadmap:</strong> Steam Workshop will surface both WASM and signed native mods side-by-side. Filtering, ratings, versioning built in.</p>
</div>
</div>
<div class="native-comparison">
<table class="comparison-table">
<thead>
<tr>
<th></th>
<th>WASM</th>
<th>Native (Signed)</th>
</tr>
</thead>
<tbody>
<tr>
<td>Sandbox</td>
<td class="check">✓ Enforced</td>
<td class="x">Full access</td>
</tr>
<tr>
<td>Platform coverage</td>
<td class="check">✓ Windows, macOS, Linux, iOS, Android</td>
<td class="x">Per-platform builds</td>
</tr>
<tr>
<td>Determinism guarantee</td>
<td class="check">✓ By default</td>
<td class="x">Your responsibility</td>
</tr>
<tr>
<td>Review gate</td>
<td class="check">✓ Zero—publish immediately</td>
<td class="check">✓ Signature only, no code review</td>
</tr>
<tr>
<td>Typical use case</td>
<td>MCTS, heuristics, small NN</td>
<td>LLM inference, CUDA training, bespoke math</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<!-- Open Source Section -->
<section id="opensource" class="opensource">
<div class="container">
<h2>Ship Open Source</h2>
<p class="section-intro">The shipped learned AI is your working example.</p>
<div class="opensource-content">
<div class="opensource-box">
<h3>Reference Implementation</h3>
<p>The Neural variant—PPO trainer, 128K game history, strategy evaluation suite—lives on GitHub as public Rust + WASM. Read it. Fork it. Retrain it. Own the stack.</p>
<a href="#" class="code-link">
<code>github.com/magic-civilization/ai-reference</code>
</a>
</div>
<div class="opensource-stats">
<div class="stat">
<span class="stat-value">128K</span>
<span class="stat-label">Training games</span>
</div>
<div class="stat">
<span class="stat-value">5</span>
<span class="stat-label">Emergent strategies</span>
</div>
<div class="stat">
<span class="stat-value">Apache 2.0</span>
<span class="stat-label">License</span>
</div>
</div>
</div>
</div>
</section>
<!-- Roadmap Section -->
<section id="roadmap" class="roadmap">
<div class="container">
<h2>Roadmap</h2>
<p class="section-intro">From launch through post-launch.</p>
<div class="roadmap-timeline">
<div class="phase">
<div class="phase-marker done"></div>
<h3>Episode 1: Age of Dwarves</h3>
<p><strong>Pre-launch (now).</strong> Wishlist opens. AI mod docs go live. Reference AI training begins.</p>
</div>
<div class="phase">
<div class="phase-marker soon"></div>
<h3>1.0 Launch</h3>
<p><strong>Steam, App Store, Google Play.</strong> Shipped with 1 neural + 6 scripted AIs. Direct mod loading from ~/Documents/MagicCivilization/mods/.</p>
</div>
<div class="phase">
<div class="phase-marker future"></div>
<h3>1.x: Steam Workshop</h3>
<p><strong>Post-launch update.</strong> Unified mod discovery, versioning, ratings. One-click install for WASM and signed native mods.</p>
</div>
<div class="phase">
<div class="phase-marker future"></div>
<h3>Episode 2: Age of Kzzkyt</h3>
<p><strong>2027.</strong> Second playable race. New decision-making constraints. Modders craft new AIs for new rules.</p>
</div>
</div>
</div>
</section>
<!-- CTA Section -->
<section class="cta-final">
<div class="container">
<h2>Ready to Mod?</h2>
<p>Wishlist on Steam and stay in the loop.</p>
<div class="final-ctas">
<a href="#" class="cta primary">Wishlist on Steam</a>
<a href="#" class="cta secondary">AI Mod Docs</a>
</div>
</div>
</section>
<!-- Footer -->
<footer class="footer">
<div class="container">
<div class="footer-content">
<p><strong>Magic Civilization: Age of Dwarves</strong></p>
<p>A 4X strategy game in development. Coming soon to <span class="chip">Steam</span> <span class="chip">App Store</span> <span class="chip">Google Play</span>.</p>
<p class="footer-meta">Not available on web. Desktop and mobile only.</p>
</div>
<div class="footer-links">
<a href="#">Privacy</a>
<a href="#">Credits</a>
<a href="#">Contact</a>
</div>
</div>
</footer>
<script src="script.js"></script>
</body>
</html>