- Joined
- Aug 29, 2009
- Messages
- 196
- Reaction score
- 27
Hi, not really sure where to post this, so this is the first forum that came to mind. If there is a better place for it, feel free to move it.
A while ago I got bored and decided to make an idle game inspired by MU Online. It has a lot of things from MU, but it is not meant to be a 1:1 copy.
Want to call it AI slop? Go ahead. The game was made with the help of AI because I simply do not have the time to write everything from scratch.
That does not change the fact that the game is actually pretty fun and has a lot of potential to grow.
Anyway, enough talking. Here is what you will find in the game:
Live Demo:
Download:
Have fun
Short AI summary of what i have already done, along with an installation guide.
A while ago I got bored and decided to make an idle game inspired by MU Online. It has a lot of things from MU, but it is not meant to be a 1:1 copy.
Want to call it AI slop? Go ahead. The game was made with the help of AI because I simply do not have the time to write everything from scratch.
That does not change the fact that the game is actually pretty fun and has a lot of potential to grow.
Anyway, enough talking. Here is what you will find in the game:
Live Demo:
To view the content, you need to sign in or register
Download:
To view the content, you need to sign in or register
To view the content, you need to sign in or register
Have fun
Short AI summary of what i have already done, along with an installation guide.
## 1. Game Systems Overview
### 1.1 Characters & Accounts
- **Account system** with email/password registration and login (NextAuth.js, bcrypt-hashed passwords).
- **Multiple characters per account** with a character select screen.
- **5 character classes**: Dark Knight, Dark Wizard, Elf, Magic Gladiator, Dark Lord (currently cosmetic — no stat differences).
- **Account-wide resources**: jewels, crafting materials, and event tickets are shared across all characters on an account.
**Status:Fully working**
### 1.2 Combat & Hunting (core loop)
- Real-time interval-based combat against monsters, with floating damage numbers, criticals, excellent hits, life steal, reflect damage, and poison damage-over-time.
- **62 monsters across 13 hunting zones**, from Newbie Valley (lv 1–10) to Chaos Throne (lv 281+).
- Attack speed scales the combat tick: `max(150, 2000 − attackSpeed × 10)` ms; **Burst skill** temporarily attacks 5× faster (3-minute cooldown).
- Damage model: random roll between min/max damage, reduced by 30% of monster defense; criticals ×1.5, excellent hits ×2.0; hit chance clamped between 5–95%.
- Death → 5-second respawn countdown, automatic return to hunting.
**Status:Fully working** (Burst skill ~80% — API ready, UI mostly integrated)
### 1.3 Leveling, Stats & Resets
- **XP curve:** `level² × 2.8125` per level (recently reduced by 25%); levels 1 → 400+.
- **Purchasable stat upgrades** with Zen (cost `50 × level^1.5` per point, with bulk-buy buttons): Damage, Defense, Vitality/HP, Speed, Zen multiplier.
- **Reset (rebirth)** at level 400+: level returns to 1, character keeps stats/equipment/inventory, and gains `2,000,000 × resetNumber` Zen plus 1 Ascension Point.
**Status:Fully working**
### 1.4 Ascension (skill tree)
Permanent, reset-earned skill points spent across **8 skills**:
| Skill | Effect per point |
|---|---|
| Damage | +2% damage |
| Critical | +1% crit rate |
| Health | +5% max HP |
| Life Steal | +0.5% |
| Zen | +3% zen drops |
| Experience | +2% EXP |
| Poison | +0.5% chance (DoT on monster's current HP) |
| Excellent | +0.25% excellent-hit chance |
**Status:Fully working**
### 1.5 Items, Inventory & Equipment
- **24-slot inventory** with drag & drop (@dnd-kit), tooltips, item destruction and bulk-clear.
- **10 equipment slots**: weapon, shield, helm, armor, pants, gloves, boots, ring, pendant, wings.
- **Rarity tiers**: common → uncommon → rare → epic → legendary; rarity determines number of random item options (affixes).
- **Random item options** on drop: crit rate, attack speed, life steal, extra damage/defense, EXP/Zen bonus, crit/excellent damage (weapons), HP recovery, max HP, damage decrease, reflect (armor).
- **Drops**: ~30% chance per kill, item level within ±15 of the monster; enhancement pre-rolls (+1 at 50% down to +4 at 3%).
- **2,253 WebP item images** organized by category.
**Status:Fully working**
### 1.6 Crafting & Enhancement (Jewels)
- **Jewel of Bless** — +3 damage (weapons) / +2 defense (armor), up to +6; includes a "Bless Max" bulk upgrade.
- **Jewel of Soul** — random stat re-rolls.
- **Jewel of Life** — HP-related crafting with special stat rolls.
- **Jewel of Chaos** — premium resource used in Chaos Machine recipes and quest rewards.
- Enhancement level is stored per item and shown in its name (e.g. "Sword +4"); accessories cannot be enhanced.
**Status:Fully working**
### 1.7 Chaos Machine
Recipe-based mixing of materials into tickets and special items:
- **Blood Castle Ticket** = Scroll of Archangel + Blood Bone + Jewel of Chaos + 300k Zen (100% success).
- **Devil Square Ticket** = Devil's Key + Devil's Eye + Jewel of Chaos + 300k Zen (100% success).
- **Wings crafting** (two tiers) and **Chaos Items** (high-rarity weapons).
**Status:Partial (~60%)** — ticket recipes work; wings/chaos-item recipes are incomplete.
### 1.8 Helpers (companions)
- **Attacker** — fights alongside the player on its own 500 ms combat loop (2 attacks/sec); damage `50 + level × 20`; upgrade cost `100,000 × (level+1)^2.5` Zen.
- **Buffer** — activatable damage buff (+0.1% per level, max level 100); 2-minute duration, 10-minute cooldown; upgrade cost `50,000 × (level+1)^2.5` Zen.
- Recently integrated directly into the Hunting Zone panel (desktop layout).
**Status:Fully working**
### 1.9 Boss Zone
Two handcrafted bosses with daily kill limits (2/day each) and guaranteed leveled drops:
- **Gorgon the Stone Guardian** (lv 25) — 75k HP, rewards 50k EXP / 25k Zen.
- **Kundun the Destroyer** (lv 70) — 750k HP, rewards 500k EXP / 250k Zen.
**Status:Fully working**
### 1.10 Endless Tower
- Infinite floor-based dungeon; monster HP/damage scale +5% per floor.
- Themed monster tiers from Spiders/Skeletons (floors 1–10) up to mythic bosses Kundun/Selupan/Nightmare (floor 501+).
- **2 entries per day**, persistent max-floor tracking, 10% HP heal between floors, resumable in-progress runs.
**Status:Fully working**
### 1.11 Events (Blood Castle & Devil Square)
- Two timed dungeon events entered with crafted tickets; 2 entries per day per character.
- Concurrent hunting is blocked while in an event; event state tracked in DB and localStorage.
**Status:Partial (~60%)** — entry/ticket framework in place; reward UI pending.
### 1.12 Daily Quests
**10 daily quest types** with automatic midnight reset, tracked per character — kill-count quests (1k / 5k / 20k kills), EXP milestones (1M / 10M / 100M), event participation, boss kills, +9 enhancement, and character reset. Rewards are jewels and Zen (up to 1B Zen + Chaos jewels for the top tier).
**Status:Fully working**
### 1.13 Achievements
**20+ lifetime achievements in 5 categories** (combat, progression, wealth, crafting, events) — e.g. First Blood (1 kill) up to Monster Overlord (1M kills), reset milestones, Zen wealth tiers.
**Status:Partial (~50%)** — tracking works; reward/claim UI incomplete.
### 1.14 Vault (bank)
**100-slot account-wide storage** — deposit/withdraw from any character, survives resets, same drag & drop interface as inventory.
**Status:Fully working**
### 1.15 Ranking
Global top-50 leaderboard sorted by level → resets → monsters killed → tower floor, showing class, deaths, and highest tower floor per character.
**Status:Fully working**
### 1.16 Offline Progression
- Earns EXP and Zen while away at **20% of the live production rate**, capped at **8 hours**.
- Heartbeat system prevents double-counting/cheating; rewards computed and presented on return.
**Status:Fully working**
### 1.17 Other screens
- **Wiki page** — game guide framework (monsters, items, quests). **Status:Stub (~10%)**, content pending.
- **Desktop navigation menu** linking all pages (Game, Boss Zone, Chaos Machine, Vault, Events, Ranking, Wiki, Characters) with responsive mobile fallback.
---
## 2. What Is Done and Ready
| System | Status |
|---|---|
| Accounts, auth, multi-character |100% |
| Combat & hunting (13 zones, 62 monsters) |100% |
| Leveling, stat upgrades, resets |100% |
| Ascension skill tree (8 skills) |100% |
| Inventory, equipment (10 slots), item drops & options |100% |
| Jewel crafting & enhancement |100% |
| Helpers (Attacker + Buffer) |100% |
| Boss Zone (2 bosses) |100% |
| Endless Tower |100% |
| Daily quests (10 types) |100% |
| Vault (100 slots) |100% |
| Ranking / leaderboard |100% |
| Offline rewards |100% |
| Poison DoT mechanic |100% |
| Burst skill |~80% |
| Events (Blood Castle / Devil Square) |~60% |
| Chaos Machine (wings, chaos items) |~60% |
| Achievements |~50% |
| Wiki |~10% |
No TODO/FIXME technical-debt markers were found in the code. Not started (potential roadmap): PvP, guilds, trading, chat/social features, seasonal events.
**Content totals:** 62 monsters · 13 hunting zones · 2 bosses · 5 classes · 10 daily quests · 20+ achievements · infinite tower floors · 2,253 item images.
---
## 3. Technical Data
### Stack
| Layer | Technology |
|---|---|
| Framework | **Next.js 16.1.6** (App Router) + **React 19.2.3** |
| Language | **TypeScript 5** (strict mode, ES2020 target) |
| Styling | **Tailwind CSS 4** (+ styled-jsx for combat animations) |
| Client state | **Zustand 5** (single `useGameStore` with devtools) |
| Database | **PostgreSQL on Neon** (serverless) via **Prisma ORM 7.3** (@prisma/adapter-neon) |
| Auth | **NextAuth.js 4.24** + Prisma adapter, bcryptjs hashing |
| Drag & drop | @dnd-kit |
| Mobile | **Capacitor 8** Android build (`com.muidle.adventure`, 4.4 MB APK) + PWA manifest |
| Hosting | **Vercel** (serverless) |
### Codebase metrics
- **~19,200 lines of TypeScript/TSX** across **75 source files**.
- **34 API routes** (auth, character, inventory, crafting, vault, events, chaos machine, boss, endless tower, quests, achievements, ranking, game data/progress, seed).
- 10 React components (largest: `HuntingPanel.tsx` ~995 LOC, main page ~1,220 LOC), 8 game-logic modules (`formulas`, `monsters`, `locations`, `bosses`, `quests`, `achievements`, `endless-tower`), 4 service modules, 1 Zustand store.
- **2,253 WebP asset images**.
### Architecture
- **App Router** with server-side game logic isolated in API routes and service modules — clients never compute authoritative rewards.
- **Database schema (7 models):** `users`, `player_characters`, `player_inventory` (24 slots), `character_equipment` (10 slots), `player_vault` (100 slots), `items` catalog, `game_statistics`; indexed on userId/characterId/username/email.
- **Game loop:** pure `setInterval`-based timers — combat tick scaled by attack speed (min 150 ms), separate 500 ms helper loop, 1-second ticks for poison, respawn, and buff cooldowns. Tower combat pauses when its panel is not visible.
- **Persistence:** auto-save every 30 seconds plus Beacon API flush on tab close/visibility change (mobile-safe); heartbeat timestamps power the offline-reward calculation.
- **RNG:** standard `Math.random()` (unseeded) for drops, damage variance, crit/excellent rolls.
### Tooling & scripts
- `dev` / `build` (`prisma generate && next build`) / `start` / `lint` (ESLint 9, next core-web-vitals + TS config).
- Database workflow: `dbush`, `db:seed` (tsx seed script), `db:migrate` (1 migration), `db:studio`.
- Required env vars: `DATABASE_URL`, `NEXTAUTH_SECRET`, `NEXTAUTH_URL`.
- No automated test suite yet; type safety enforced via strict TypeScript.
### PWA / Mobile
- Web manifest (fullscreen, portrait, dark theme `#111827`), 192/512 px icons, Apple mobile-web-app meta.
- Capacitor wraps the deployed Vercel URL; StatusBar plugin configured for dark translucent mode.
---
## 4. Getting Started (Developer Guide)
### Quick start
```bash
# In the project folder (Mu-Idle):
npm install
cp .env.example .env
# Fill in DATABASE_URL and NEXTAUTH_SECRET (NEXTAUTH_URL defaults toTo view the content, you need to sign in or register)
npx prisma db push
npm run db:seed
npm run dev
```
OpenTo view the content, you need to sign in or register.
### Scripts
| Command | Description |
|---|---|
| `npm run dev` | Start Next.js in dev mode |
| `npm run build` | Production build (`prisma generate` + `next build`) |
| `npm run start` | Run the built version |
| `npm run lint` | ESLint |
| `npm run dbush` | Sync Prisma schema with database |
| `npm run db:seed` | Initial data (`prisma/seed.ts`) |
| `npm run db:migrate` | Prisma migrations |
| `npm run db:studio` | Prisma Studio (database GUI) |
### Mobile build (Android APK)
```bash
npm run build
npx cap sync android
npx cap open android # opens Android Studio
```
Capacitor is configured in `capacitor.config.ts`. App ID: `com.muidle.adventure`.
`*.apk`, `*.aab`, `*.jks` are in `.gitignore` — the release-signing keystore never goes into the repo.
### Project structure
```
src/
├── app/ # Next.js routes (App Router)
│ ├── api/ # Endpoints (boss, characters, events, crafting, ranking...)
│ ├── boss-zone/ # Boss fight page
│ ├── chaos-machine/ # Item crafting / upgrades
│ ├── characters/ # Character list and selection
│ ├── events/ # Timed events
│ ├── ranking/ # Leaderboard
│ ├── vault/ # Storage
│ └── wiki/ # Game encyclopedia
├── components/ # React components (HuntingPanel, EquipmentPanel, InventorySlot, ItemModal...)
├── lib/
│ ├── game/ # Game logic (formulas, bosses, achievements, quests, endless-tower)
│ └── services/ # Service layer (character, inventory, equipment, item, stats)
├── store/ # Client state (Zustand)
└── types/ # TypeScript types
prisma/
├── schema.prisma # Database schema (Users, Characters, Items, Inventory, ...)
└── seed.ts # Seed data
```
### Deploy
Production: **Vercel + Neon PostgreSQL**.
```bash
vercel --prod
```
Remember to configure environment variables (`DATABASE_URL`, `NEXTAUTH_SECRET`, `NEXTAUTH_URL`) in the Vercel dashboard.

