Switch repo to English, add i18n with EN/DE language files and first-start language selection

- in-game texts moved to lang/en.lang and lang/de.lang (key = text, placeholders)
- game logic emits message keys + args, translated at display time
- localStorage access via own miniquad JS plugin (www/dc_plugin.js)
- code comments, DESIGN.md, CREDITS.md translated; README.md added

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Richard ZinkandClaude Opus 5.5 committed 2026-11-02 22:53:03 +01:00
1 parent a101f6ddc4
commit fbf6f223fc
18 files changed
+1072 -362

No files matched your search

+55 -54
View File
@@ -1,64 +1,65 @@
# DungeonCraft – Design-Entscheidungen
# DungeonCraft – Design Decisions
Eigenständiges Dungeon-Management-Spiel (Genre: Dungeon-Aufbau & Verteidigung), läuft als WASM im Browser.
An original dungeon management game (genre: dungeon building & defence) that runs as WASM in the browser.
## Technik
- Rust + **macroquad** (WebGL), Ziel `wasm32-unknown-unknown`
- Oberfläche komplett **im Canvas**
- Schrift: **DINOBYTE** Bitmap-Font (CP437, 6×8 px, CC BY 4.0, siehe CREDITS.md) für alle Texte, ganzzahlig skaliert
- Alle UI-Fenster mit **CP437-Rahmen** (einfach für Panels, doppelt für Dialoge); Balken (HP/Mana/Tor) als Pixel-Balken
- Sound: Event-System + macroquad-Audio vorbereitet (Lautstärke, Stumm-Taste M); Klänge werden später generiert
## Technology
- Rust + **macroquad** (WebGL), target `wasm32-unknown-unknown`
- User interface drawn entirely **in the canvas**
- Font: **DINOBYTE** bitmap font (CP437, 6×8 px, CC BY 4.0, see CREDITS.md) for all texts, integer scaled
- All UI windows use **CP437 frames** (single lines for panels, double lines for dialogs); bars (HP/mana/gate) are pixel bars
- Sound: event system + macroquad audio prepared (volume, mute key M); sounds will be generated later
- Languages: all in-game texts live in **language files** (`lang/*.lang`, key = text); English is the reference/fallback, German included, more can be added. The language is chosen on first start and stored in the browser.
- Repository language: **English** (code, comments, docs, commit messages)
## Grafik
- **3D**, **echt isometrisch** (orthografische Kamera)
- Kamera **frei 360° drehbar + neigbar**
- Wände mit **unregelmäßiger Oberfläche** (Rauschverformung der Wandflächen, nahtlos zwischen Nachbarn)
- Texturen: **prozedurale Pixelart** (Kachel-Atlas)
- Figuren: **Pixel-Sprites als Billboards** (immer zur Kamera gedreht)
- Licht: **Dunkel + Fackeln** – Grunddunkelheit, eroberte Bereiche und Lichtquellen (Fackeln, Kern, Portal, Tor) hell, flackerndes Licht
- **Kachel-Outlines**: dezente dunkle Linien um jedes Feld (Böden, Wandoberseiten, senkrechte Wandkanten), folgen der unregelmäßigen Oberfläche; abschaltbar (Taste G, später Grafik-Einstellungen)
- UI bleibt 2D-Ebene darüber, Minikarte
## Graphics
- **3D**, **true isometric** (orthographic camera)
- Camera **freely rotatable 360° and tiltable**
- Walls with an **irregular surface** (noise displacement of the wall faces, seamless between neighbours)
- Textures: **procedural pixel art** (tile atlas)
- Units: **pixel sprites as billboards** (always facing the camera)
- Lighting: **dark + torches** – dark base level; claimed areas and light sources (torches, core, portal, gate) are bright, flickering light
- **Tile outlines**: subtle dark lines around every tile (floors, wall tops, vertical wall edges), following the irregular surface; toggle with G (later in the graphics settings)
- The UI is a 2D layer on top, including a minimap
## Steuerung
- Linksklick: aktives Werkzeug benutzen (Rechteck aufziehen für Graben/Räume)
- Rechtsklick: Einheit aus der Hand absetzen
- Kamera: WASD/Pfeiltasten, rechte Maus ziehen, Mausrad-Zoom, Bildschirmrand
- Drehen/Neigen: mittlere Maustaste ziehen, Q/E drehen, R/F neigen
- Zauber: 0 Blitz, X Heilung, V Wicht beschwören
- Fackeln: automatisch beim Erobern; fremde Gebiete schummrig sichtbar
## Controls
- Left click: use the active tool (drag a rectangle for digging/rooms)
- Right click: drop a unit from the hand
- Camera: WASD/arrow keys, right mouse drag, mouse wheel zoom, screen edge
- Rotate/tilt: middle mouse drag, Q/E rotate, R/F tilt
- Spells: 0 lightning, X heal, V summon imp
- Torches: placed automatically when ground is claimed; foreign areas are dimly visible
## Geplant (nach 3D)
- Repo komplett auf Englisch; Spieltexte in separaten Sprachdateien (EN + DE, erweiterbar), Sprache im Spiel umschaltbar
- Menü: Speichern (Download *.dcsave), Laden (Dateiauswahl + Drag & Drop), Autosave im Browser (localStorage)
- Einstellungen: Sprache + Ton, Kamera, Grafik, Spiel, Tastenbelegung – gespeichert im Browser **und** im Savegame
- Musik: eigener **XM/MOD-Replayer in Rust**, gemeinsamer Mixer für Musik + Effekte (Streaming über JS-Audio-Plugin, ersetzt macroquad-Audio)
- Soundtrack (als .xm komponiert, in MilkyTracker bearbeitbar): Titel/Menü, mehrere ruhige Aufbau-Tracks, Kampf, Sieg/Niederlage-Jingles; **Titelmelodie als Leitmotiv in allen Stücken erkennbar**
## Planned
- Menu: save (download `*.dcsave`), load (file picker + drag & drop), autosave in the browser (localStorage)
- Settings: language + sound, camera, graphics, game, key bindings – stored in the browser **and** in the savegame
- Music: own **XM/MOD replayer in Rust**, shared mixer for music + sound effects (streamed via a JS audio plugin, replaces macroquad audio)
- Soundtrack (composed as `.xm`, editable in MilkyTracker): title/menu, several calm build tracks, battle, victory/defeat jingles; **the title melody is a recognisable leitmotif in every piece**
## Spielinhalt (volles Konzept)
- **Graben**: Erde/Gold markieren → Grubenwichte graben, bringen Gold heim, erobern Boden
- **Räume**: Schatzkammer, Quartier, Pilzgarten, Trainingshalle, Bibliothek
- **Portal** erobern → Kreaturen: Kobold, Höhlenspinne, Schattenmagier, Steinoger (abhängig von Räumen)
- **Bedürfnisse**: Schlaf, Essen, Lohn (Zahltag); unzufriedene Kreaturen gehen
- **Hand**: eigene Einheiten aufnehmen/absetzen (max. 8)
- **Zauber** (Mana): Blitz, Heilung, Grubenwicht beschwören
- **Helden**: Ritter, Bogenschützin, Priester, Zwergenhauer, Lichtpaladin (graben sich zum Seelenkern durch)
## Game content
- **Digging**: mark earth/gold → Pit Imps dig, bring gold home and claim ground
- **Rooms**: treasury, lair, mushroom garden, training hall, library
- Claim the **portal** → creatures: kobold, cave spider, shadow mage, stone ogre (depending on rooms)
- **Needs**: sleep, food, wages (payday); unhappy creatures leave
- **Hand**: pick up / drop own units (max. 8)
- **Spells** (mana): lightning, heal, summon Pit Imp
- **Heroes**: knight, archer, priest, dwarf miner, paladin of light (they dig their way to the Soul Core)
## Ziel
- **Sieg**: Heldentor zerstören
- **Niederlage**: Seelenkern zerstört
## Goal
- **Victory**: destroy the Hero Gate
- **Defeat**: the Soul Core is destroyed
## Torangriff
- **Angriffsflagge**: Spieler setzt eine Sammelflagge; freie Kreaturen marschieren hin und greifen alles in der Nähe an (auch das Tor)
- **Tor**: ca. 3000 HP, regeneriert langsam, wenn es nicht angegriffen wird
- **Verteidiger** erscheinen bei HP-Schwellen 75 % / 50 % / 25 % (letzter Trupp mit Boss), herausfordernd
## Attacking the gate
- **Attack flag**: the player places a rally flag; free creatures march there and attack everything nearby (including the gate)
- **Gate**: about 3000 HP, regenerates slowly when not under attack
- **Defenders** appear at HP thresholds 75% / 50% / 25% (the last squad with a boss), challenging
## Heldenwellen
- **Endlos**, solange das Tor steht
- Stärke richtet sich nach dem **Armeewert** (Summe HP × Angriff aller Kreaturen inkl. Stufen)
- Wellenstärke **mitwachsend 60 % → 100 %** des Armeewerts, mit etwas Zufall
- **Schonfrist** 5 Minuten, danach **Mindestwelle** (z. B. 2 Ritter) auch bei schwacher Armee
- Ziel: immer schaffbar, aber herausfordernd
## Hero waves
- **Endless** while the gate stands
- Strength follows the **army value** (sum of HP × damage of all creatures incl. levels)
- Wave strength **grows from 60% to 100%** of the army value, with some randomness
- **Grace period** of 5 minutes, then a **minimum wave** (e.g. 2 knights) even with a weak army
- Goal: always beatable, but challenging
## Betrieb / Test
- Build im Docker (Multi-Stage: Rust → nginx:alpine)
- Testversion auf Port **18093**, später zusätzlich Subdomain über Nginx Proxy Manager
## Operations / testing
- Build in Docker (multi-stage: Rust → nginx:alpine)
- Test build on port **18093**, later additionally a subdomain via Nginx Proxy Manager