I'll build a polished OSRS Duel Arena PvP clone with full combat mechanics, hit splats, screen shake, particles, and all the game states. Let me start by checking the project structure.
Good, now let me build the game. I'll update index.html, create the game logic, sound system, and the full UI.
Now let me create the CSS with all the animations and OSRS theming:
Now let me create the sound system:
Now the game logic engine:
Let me fix the unused declarations:
Now let me create the main App component with the full game:
Let me fix the unused import by using sfxSpecial in the spec attack flow:
Let me build to check for errors:
Build succeeds. Let me fix the CSS warning by moving the import to the top:
Now let me also improve the game - I want to enhance the visual quality. Let me generate a background image for the arena:
Now let me update the arena background to use the generated image and polish some details:
Now let me also enhance the gameplay — I want to make the combat more satisfying and add some missing features. Let me review and improve the game further:
The game looks solid. Let me also add a combat log and some visual polish to make it more immersive. Let me check the SPEC_PER_HIT usage and ensure it's all wired correctly:
Good. Now let me add a combat log and improve the overall polish. Let me also add a transition animation between rounds and a countdown when combat starts:
The game is looking good. Let me now add a combat log system and some additional visual polish. Let me also add a countdown timer before combat starts to build tension:
Let me now add a combat log and some more visual enhancements. I'll enhance the game with a countdown on fight start and a combat log:
The game is solid. Let me now add some important improvements: a combat log, a "FIGHT!" countdown animation when combat begins, and fix the hit splat random offset (should be stable per splat, not re-randomized on re-render). Let me also add a hurt flash effect to characters when hit. Let me rewrite the full App.tsx with these enhancements:
Now let me build to verify everything compiles:
Build succeeds with no warnings. Let me also add the meta viewport tag to make sure touch works properly on mobile, and a favicon:
Now let me do a final build to confirm everything is perfect:
The game builds successfully with zero errors and warnings. Here's what I've built:
⚔️ Duel Arena — OSRS PvP Combat Clone
Core Features:
- Instant combat — 3-2-1 countdown then straight into fighting. You're swinging within 5 seconds
- OSRS-style combat system — Attack/Strength/Defence stats, accuracy rolls, max hit calculations, all based on Old School RuneScape formulas
- 3 Attack Styles: Slash (balanced), Smash (high damage/lower accuracy), Block (defensive shield)
- Food healing — 3 sharks per fight, heals 20 HP with cooldown
- Special attack — Charges 12% per successful hit, at 100% unleash a devastating guaranteed hit at 1.5x max damage
Juicy Feedback:
- Screen shake — Light shake on hits, heavy shake on big hits (20+) and special attacks
- Particle effects — Red blood particles on damage, blue on misses, gold on specials
- Hit splats — Authentic OSRS-style red (damage), blue (miss/zero), gold (special) circles with numbers
- Hurt flash — Characters flash when taking damage
- Floating combat text — Damage numbers, heal amounts, miss indicators float up and fade
- Death animation — Defeated fighters fall over dramatically
- Sound effects — Web Audio API synthesized sounds for hits, misses, blocks, eating, specials, victory fanfare, defeat
Game States:
- Start screen — OSRS-themed with high scores, controls guide
- Countdown — 3-2-1 dramatic countdown before each fight
- Fighting — Real-time combat with AI opponent
- Pause — ESC/P to pause mid-fight with stats display
- Victory — Score breakdown with HP bonus, time bonus, streak multiplier
- Defeat — "Oh dear, you are dead!" with leaderboard
Controls:
- Keyboard: 1/A=Slash, 2/S=Smash, 3/D=Block, 4/E=Eat, 5/Q=Special, ESC=Pause
- Touch: Large tap-friendly buttons with cooldown overlays
Progressive Difficulty:
- Each round the AI gets stronger stats, smarter decisions, and more food
- Player also scales slightly with each victory
- 25 unique opponent names (Pker_n00b, Dr4g0nSlyr, ZezimaCopy, etc.) with different color schemes
- Score system with streak multipliers and time bonuses
- Local high score leaderboard persisted in localStorage
Files built: index.html, src/index.css, src/audio.ts, src/gameLogic.ts, src/App.tsx