Skip to content

mededus/game-arkanoid

Repository files navigation

Arkanoid

A browser-based Arkanoid clone built with Phaser 3 and Vite. All graphics and audio are generated programmatically — no external asset files required.


Running with Docker (recommended)

Prerequisites

  • Docker installed and running.

1. Build the image

docker build -t arkanoid .

This runs a two-stage build:

  1. builder — installs Node dependencies and runs vite build inside the container.
  2. runtime — copies only the compiled static files into a lean nginx image.

The final image is roughly 50 MB and contains no Node.js or source code.

2. Run the container

docker run -d --name arkanoid -p 5173:80 arkanoid

Open http://localhost:5173 in your browser.

Flag Meaning
-d Run in the background (detached)
--name arkanoid Give the container a memorable name
-p 5173:80 Map host port 5173 → container port 80

Change 5173 to any free port on your machine if needed.

3. Stop and remove the container

docker stop arkanoid
docker rm arkanoid

4. Remove the image

docker rmi arkanoid

Useful variations

Run on a different host port:

docker run -d --name arkanoid -p 3000:80 arkanoid

Run in the foreground (see nginx logs directly):

docker run --rm --name arkanoid -p 5173:80 arkanoid

Check container logs:

docker logs arkanoid

Rebuild after source changes:

docker build -t arkanoid .
docker stop arkanoid && docker rm arkanoid
docker run -d --name arkanoid -p 5173:80 arkanoid

Local development (without Docker)

npm install
npm run dev

Open http://localhost:5173.


Project structure

arkanoid/
├── src/
│   ├── main.js              # Phaser game config & bootstrap
│   ├── constants.js         # Shared numeric constants
│   ├── levels/              # Level layout definitions
│   ├── scenes/
│   │   ├── BootScene.js     # Generates all textures at startup
│   │   ├── MenuScene.js     # Title / start screen
│   │   ├── GameScene.js     # Main gameplay loop
│   │   └── UIScene.js       # HUD overlay (score, lives, level)
│   └── objects/
│       ├── PowerUp.js       # Power-up effects & timers
│       └── AudioManager.js  # Procedural SFX + background music
├── index.html
├── vite.config.js
├── Dockerfile
├── nginx.conf               # nginx config used inside the container
└── .dockerignore

Controls

Input Action
Mouse move Move paddle
Click Launch ball / fire laser (with laser power-up)
+ / - Increase / decrease ball speed

About

Browser-based Arkanoid clone built with Phaser 3 and Vite. All graphics and audio generated programmatically — no external assets required.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors