make a dungeon crawler game where I can play levels but also design my own dungeons in a…
- User
make a dungeon crawler game where I can play levels but also design my own dungeons in a level editor with many complex and fun parts. complex physics animations and visuals, physics based, velocity based, satisfying movement and combat, mobile support. Give me parts that makes sense for creative gameplay like a door and colored key, turrets, boulders, other weapons, fun enemies like dragons and spiders, and obstacles like rotating bases. It doesn't nessesaryly have to be a standard grid
Assistant
I will start by exploring the existing project structure to see what files and dependencies we have available.
I will read
package.jsonto inspect the installed dependencies and see if we have Lucide icons or other helpful libraries installed.I will install
lucide-reactto provide clean icons for the game's UI, level editor tools, weapon selector, and mobile controls.I will read
index.htmlto inspect its title and structure.I will update
index.htmlwith an appropriate title, Google Fonts for fantasy/arcade aesthetic, and mobile-friendly viewport meta tags.I will read
src/index.cssto check the CSS setup.I will enhance
src/index.csswith custom scrollbar styling, touch-action utilities for mobile joysticks, and font family helper classes.I will create
src/types/game.tswith comprehensive TypeScript types for the physics engine, entities, weapons, keys/doors, enemies, level editor, and visual effects.I will create a synthesized audio engine in
src/utils/sound.tsusing the Web Audio API for responsive sound effects (swords, hammer slams, magic staff fireballs, rolling boulders, bounce pads, dragon roars, spider webs, and key pickups).I will create
src/data/presetLevels.tswith 4 campaign levels showcasing the creative dungeon parts, non-grid rotated obstacles, colored keys/doors, rotating bases, turrets, spiders, and the fire-breathing dragon.I will create
src/game/PhysicsEngine.tscontaining the physics, collision detection (including rotated non-grid obstacles using OBB/SAT and circle-rectangle collisions), velocity-based movement, weapon attacks, enemy AI (dragon fire, spiders, slimes, goblin charges), and interactive puzzle logic (keys, doors, levers, boulders, conveyors, bounce pads, and portals).I will fix the unused variables in
src/game/PhysicsEngine.tsand usesourceXandsourceYto apply directional physics knockback when the player takes damage.I will create
src/game/GameRenderer.tsto render all gameplay elements, non-grid rotated obstacles, colored keys and doors, rotating bases, rolling boulders, dragon boss, spiders, conveyors, weapons, and particle effects using HTML5 Canvas.I will create
src/components/LevelEditorPalette.tsxto provide a categorized palette of all dungeon parts (walls, pits, ice, conveyors, rotating bases, sawblades, boulders, turrets, keys, doors, switches, dragons, spiders, slimes, and weapons) with non-grid rotation controls, grid snap toggling, and instant test-playing.I will update
src/components/LevelEditorPalette.tsxto fix unused imports and add a grid size selector dropdown so users can change grid spacing or turn off snapping for free-form placements.I will create
src/components/MobileControls.tsxfor mobile touch joysticks, attack, dash, and weapon switching buttons.I will update
src/components/MobileControls.tsxto display the current weapon name on the mobile attack button and clean up unused imports.I will create
src/components/LevelSelectModal.tsxto allow players to choose campaign levels, manage saved custom dungeons, import JSON levels, or start designing a new level.I will remove the unused imports in
src/components/LevelSelectModal.tsx.I will create
src/components/HUD.tsxto display the player's health, stamina, collected colored keys, equipped weapon, score, level title, and quick action controls (level select, editor mode, restart, mute).I will update
src/components/HUD.tsxto display the player's score and clean up unused imports.I will create
src/components/GameEndModals.tsxfor Victory and Defeat dialogs with score breakdowns, next level navigation, replay options, and editor access.I will create
src/App.tsxto bind together the physics engine, HTML5 Canvas renderer, Level Editor palette, HUD, mobile controls, sound synthesizer, localStorage saving, and modal dialogs.I will now test building the project to check for any TypeScript or Vite compilation errors.
I have created CHRONO DUNGEON: KINETIC CRAFTER, a physics and velocity-based Dungeon Crawler and Level Editor web application with mobile touch support and non-grid free-form placement.
✨ Key Features & Gameplay Highlights
-
Velocity-Based Movement & Combat Physics:
- Smooth Acceleration & Inertia: Momentum-driven player movement with speed caps and friction.
- Kinetic Dash: High-speed dash with temporary invulnerability, cooldown, screen shake, and spark trail effects.
- Directional Knockback: Taking damage or striking enemies applies physics knockback forces.
- Ice Floor & Conveyor Belts: Slide across ice patches with low friction, or ride conveyor belts that push players and boulders along custom angles.
- Bounce Pads: High-velocity spring pads that launch players and boulders with sound and shockwave particles.
- Rotating Base Platforms: Turntable platforms that apply angular velocity to anything standing on them, orbiting you around the platform's center.
-
Creative Dungeon Parts & Hazards:
- Colored Keys & Locked Doors: Red, Blue, and Gold keys that unlock matching doors.
- Heavy Rolling Boulder: Physics boulder with mass and roll lines; push it onto switches to open doors or disable Laser Gates, or roll it into enemies to crush them.
- Spinning Sawblade: Rotates continuously, damaging anything that touches its teeth.
- Turrets: Arrow Turrets and Fire Turrets that rotate and shoot projectiles.
- Lever / Plate Switches & Laser Gates: Can be toggled by player attacks or boulder weight and linked directly to Laser Gates or Doors.
- Teleport Portals: Step into Portal A to instantly warp to Portal B with particle rings.
-
Fun Enemies with Unique AI:
- Fire Dragon Boss: Large wyvern boss that roars, flies over pits, and breathes a cone of fire particles.
- Spider Minions: Crawl toward you and spit sticky slowing webs that slow your movement.
- Bouncing Slimes: Bounce rhythmically and split into particles on hit.
- Goblin Chargers: Charge at high speed when in line of sight.
-
4 Distinct Weapons:
- Sword: Slashing melee arc that fires a slash wave and breaks destructible walls.
- Bow: High-velocity piercing arrows for long-range attacks and toggling levers from a distance.
- Thunder Hammer: Heavy ground slam that creates a radial shockwave to knock back enemies and boulders.
- Magic Plasma Staff: Fires glowing plasma balls that bounce off walls up to 3 times before exploding.
-
Full Level Editor (With Non-Grid Support):
- Freeform or Grid Snap: Toggle between Grid Snapping (25px, 50px, 100px) and Freeform placement (
Snap: Free). - Rotate Any Part: Rotate walls, sawblades, turrets, or conveyors freely at any angle.
- Link Target: Click "Link" on any Lever Switch or Teleport Portal to connect it to a target Laser Gate, Door, or another Portal.
- Instant Test Play: Switch directly between editing and testing your dungeon with the TEST button.
- Save & Share: Save custom levels to
localStorage, or export/import level JSON files.
- Freeform or Grid Snap: Toggle between Grid Snapping (25px, 50px, 100px) and Freeform placement (
-
Mobile Touch Support:
- Responsive virtual joystick on the bottom-left for 360° movement and aiming.
- Touch buttons for Attack, Dash, and Weapon Switch on the bottom-right.
Files built:
index.html,src/index.css,src/types/game.ts,src/utils/sound.ts,src/data/presetLevels.ts,src/game/PhysicsEngine.ts,src/game/GameRenderer.ts,src/components/LevelEditorPalette.tsx,src/components/MobileControls.tsx,src/components/LevelSelectModal.tsx,src/components/HUD.tsx,src/components/GameEndModals.tsx,src/App.tsx-