Files
whalehunting/README.md
Thomas Richter 0064773eaa Add Docker-based production deployment
- Multi-stage Dockerfile with Node builder and nginx server
- Nginx configuration with gzip, security headers, and caching
- Docker Compose setup with health checks
- Updated README with deployment instructions

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-16 23:34:05 +01:00

127 lines
3.2 KiB
Markdown

# Whale Hunting - A Point & Click Adventure
A Monkey Island-style adventure game based on 18th century whaling history, including the dark practice of burning penguins as emergency fuel when traditional fuel ran out.
## Setup
### Install Dependencies
```bash
npm install
```
### Run Development Server
```bash
npm run dev
```
The game will be available at `http://localhost:5173` (or another port shown in the terminal).
### Build for Production
```bash
npm run build
```
The built files will be in the `dist/` directory.
## Docker Deployment
### Using Docker Compose (Recommended)
```bash
# Build and start the container
docker-compose up -d
# View logs
docker-compose logs -f
# Stop the container
docker-compose down
```
The game will be available at `http://localhost:8080`
### Using Docker directly
```bash
# Build the image
docker build -t whalehunting-game .
# Run the container
docker run -d -p 8080:80 --name whalehunting whalehunting-game
# View logs
docker logs -f whalehunting
# Stop and remove container
docker stop whalehunting
docker rm whalehunting
```
### Production Deployment Notes
- The Docker image uses nginx to serve static files
- Includes gzip compression for better performance
- Health checks are configured for container monitoring
- Security headers are enabled
- Static assets are cached for 1 year
## Project Structure
```
whalehunting/
├── index.html # Main HTML file
├── package.json # Dependencies and scripts
├── src/
│ ├── main.js # Game initialization and configuration
│ ├── scenes/ # Game scenes
│ │ └── ShipDeckScene.js # Ship deck scene (starting point)
│ └── game-objects/ # Reusable game objects (future)
└── assets/ # Images, sounds, etc. (future)
```
## Current Features
- **Ship Deck Scene**: Explore the deck of your whaling vessel
- **Interactive Objects**: Click on barrels, the ship's wheel, and other objects
- **Inventory System**: Track fuel, whale oil, and penguins
- **Message System**: Get feedback when interacting with objects
## Game Concept
The game simulates 18th century whaling expeditions where:
- Whalers hunt whales to produce whale oil
- Fuel management is critical for the voyage
- When fuel runs out, desperate measures (burning penguins) become necessary
## Next Steps
Future development could include:
- Whale hunting mini-game/scene
- Port scene for resupply and selling oil
- Decision system for fuel management
- Narrative elements and character dialogues
- Penguin catching mechanics
- Multiple voyages with progression
- Art assets to replace placeholder graphics
## Technology
- **Phaser 3**: Game framework
- **Vite**: Build tool and dev server
- **JavaScript (ES6 modules)**: Programming language
## Controls
- **Mouse**: Click to interact with objects
- Point-and-click adventure style navigation
## Development Notes
This is a prototype with placeholder graphics (colored rectangles). Art assets can be added later by:
1. Adding images to `assets/sprites/` or `assets/backgrounds/`
2. Loading them in the scene's `preload()` method
3. Replacing rectangle shapes with sprites