Status: Archived. Finished Flutter game from 2025. Kept as-is, not maintained.
A Flutter-based arithmetic roguelite where players climb a procedurally scaling tower by answering rapid-fire math challenges. Correct streaks trigger combo-driven combat bonuses, while mistakes accelerate enemy attacks and jeopardise survival. The project targets mobile form factors first, with responsive layouts for tablets and the web.
- Adaptive difficulty system driven by
GameConfigandDifficultyController, unlocking new operations and number ranges as floors are cleared. - Combo-centric combat loop with exponential damage scaling, milestone-based combo retention, and time penalties on mistakes.
- Data-driven enemy roster sourced from
assets/enemies.csv, supporting tiered difficulty, unique bosses, and resilient fallbacks when data is incomplete. - Rich feedback layer combining haptics, animated widgets (
DamageNumberManager,ComboPopupManager,DifficultyPopupManager), and themed UI to convey state changes. - Lean state management through a single
GameStateChangeNotifier, keeping logic predictable and testable without external state libraries.
lib/
├─ main.dart # Entry point binding theme + initial route
├─ theme.dart # Color, typography, spacing tokens
├─ game_config.dart # Static knobs for balance & difficulty presets
├─ game_state.dart # Central gameplay state machine & timers
├─ difficulty.dart # Progressive operation unlock logic
├─ enemy_data.dart # Enemy models + CSV loading utilities
├─ screens/
│ ├─ main_menu.dart # Animated landing screen with difficulty tiles
│ └─ game_screen.dart # Core gameplay, orchestrating managers & widgets
└─ widgets/ # Reusable UI components (combo counter, HP bars, popups, death screen)
assets/
└─ enemies.csv # Enemy catalogue consumed by EnemyManager
Key design principles:
- Configuration-first: all tunables (damage, timers, floor pacing) live in
game_config.dartto simplify balancing. - Documented flow:
GameStateowns timers and combo transitions, while UI widgets stay presentational and subscribe via listeners. - Asset resilience: enemy loading is tolerant of malformed CSV rows, ensuring the game still boots with defaults.
- Animation encapsulation: each widget manages its own controllers to avoid cross-component coupling.
- Flutter SDK:
>= 3.9.0 - Dart SDK: installed via Flutter toolchain
- Recommended tooling: Android Studio or VS Code with Flutter extension
# verify toolchain
dart --version
flutter --version
# fetch dependencies
flutter pub get# run on connected device/emulator
flutter run
# specify platform explicitly
flutter run -d chrome # web
flutter run -d emulator-5554 # android emulator exampleEnable performance overlays via Flutter DevTools when tuning animations. GameState emits granular events, so attach a debugger or log listeners for deeper inspection.
| Task | Command | Notes |
|---|---|---|
| Static analysis | flutter analyze |
Enforces flutter_lints from analysis_options.yaml |
| Formatting | dart format . |
Run before committing to maintain 2-space indentation |
| Tests | flutter test |
Add widget/unit coverage for gameplay logic |
| Coverage (optional) | flutter test --coverage |
Generates coverage/lcov.info |
lib/game_config.dart centralises all balance levers:
baseAttackTime,wrongAnswerPenalty– pacing for enemy strikes.comboLinear,comboPower,comboPowerCoef– governs damage multiplier growth.difficultyBossesPerStage,difficultyNegativeSubtractionStage– stage progression cadence.- Operation caps (
capsAdd,capsSub,capsMul,capsDiv) and weights to shape generated equations.
Difficulty presets map to these values via GameConfig.applyDifficulty, updating timers, stage behaviour, and combo multipliers when the player selects Easy/Normal/Hard.
assets/enemies.csv columns:
idnameemojibaseHPbaseDamageMultiplierdifficultyLeveltype(normal|boss)specialAbilityIdspecialAbilityDescription
EnemyManager filters by floor level and boss flag. Missing tiers fall back to the full list, so ensure each level has at least one normal enemy and a boss for best pacing.
# Android release APK
flutter build apk --release
# iOS (requires macOS tooling)
flutter build ios --release
# Web (for quick demos)
flutter build webPackage-specific configuration (icons, bundle IDs, signing) resides under android/ and ios/. Update those platforms before distributing.
- Keep
pubspec.yamldependency versions current (flutter pub outdated). - Audit
assets/enemies.csvfor balance tweaks and emoji/ability consistency. - Monitor animation performance on lower-end hardware; adjust controller durations or particle counts if necessary.
- Extend test coverage as new gameplay systems are added.
| Symptom | Resolution |
|---|---|
| Flutter commands request engine updates | Run with --no-version-check or update Flutter; ensure write permissions to flutter/bin/cache. |
| CSV parsing exceptions | Validate delimiter and column count; ensure there’s no trailing comma on lines. |
| Animations feel choppy | Profile with flutter run --profile; inspect widget rebuild counts and animation controllers. |
| Combo multiplier feels unbalanced | Tweak comboLinear/comboPowerCoef and re-run tests for damage expectations. |
- Progress persistence across sessions (save floor + stats).
- Additional enemy abilities with active player counters.
- Daily challenges with constrained operation sets.
- Multiplayer leaderboards sharing max combo / floor reached.
Feel free to fork, experiment with new mechanics, and open pull requests via the provided templates. Happy hacking!
Status: NEAR_COMPLETE Completion: 72 Last reviewed: 2026-09-22 Family: math-roguelite Resume cost: low
Aritmetik roguelite. README oyunu anlatıyor.
README yaklaşık 6 bin karakter, test var, yaklaşık 4 bin satır. Git 2025-09-19.
Kalan kat veya içerik listesi bu taramada oynanmadı.
README'deki bir sonraki kat veya eksik işlemi uygula. Yeni matematik oyunu açma.
Registry id mathgame. Source scan: 15 files, about 4159 lines, tests=True.
none