Skip to content

alfredang/pixelartgame

Repository files navigation

Godot's Dungeon

A top-down pixel art action dungeon crawler built with HTML5 Canvas and vanilla JavaScript.

Play the game live here!

HTML5 JavaScript Canvas

Screenshot

Gameplay Screenshot

Gameplay

Control the Godot mascot through dungeon rooms, fight haunted weapons, collect gems, and cast elemental spells to defeat all enemies.

Controls

Key Action
WASD / Arrow Keys Move
Mouse Click Cast spell toward cursor
1 / 2 / 3 Switch spell (Fire / Ice / Lightning)

Features

  • 3 Elemental Spells - Fire (rapid), Ice (powerful), Lightning (fast) - each with unique projectiles and sound effects
  • 2 Enemy Types - Haunted Swords charge at you; Haunted Shields block from their front (flank them!)
  • 4 Dungeon Rooms - Connected rooms with increasing difficulty
  • Collectibles - Gems for score, hearts for health, spell pickups to unlock new abilities
  • Sound Effects - Shooting, impact, pain, death, pickup, and spell switching sounds
  • Particle Effects - Hit sparks, death explosions, spell trails

Tech Stack

  • Rendering: HTML5 Canvas 2D
  • Language: Vanilla JavaScript (ES6 classes)
  • Audio: Web Audio API
  • Assets: Pixel art from GDQuest Godot Tours 101
  • Deployment: GitHub Pages

Project Structure

pixelartgame/
├── index.html          # Game entry point
├── css/style.css       # Canvas styling
├── js/
│   ├── game.js         # Main game loop & state management
│   ├── player.js       # Player movement, health, spells
│   ├── enemies.js      # Enemy AI (patrol, chase, charge, block)
│   ├── spells.js       # Projectile system & particle effects
│   ├── pickups.js      # Collectible items
│   ├── level.js        # Room generation, walls, props
│   ├── camera.js       # Viewport & screen shake
│   ├── input.js        # Keyboard & mouse input
│   ├── audio.js        # Sound effects manager
│   └── ui.js           # HUD, start/game over screens
└── assets/             # Pixel art sprites & audio

Running Locally

# Any static file server works
python3 -m http.server 8080

# Then open http://localhost:8080

Running with Docker

You can also run the game using Docker:

# Pull the image from Docker Hub
docker pull tertiaryinfotech/pixelartgame:latest

# Or build the image locally
docker build -t tertiaryinfotech/pixelartgame:latest .

# Run the container
docker run -d -p 8080:80 tertiaryinfotech/pixelartgame:latest

# Then open http://localhost:8080

Credits

About

A top-down pixel art dungeon crawler built with HTML5 Canvas and vanilla JavaScript. Fight haunted weapons with elemental spells across 4 dungeon rooms.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages