Thomas Richter 6c9d9a149d Decouple UI controls from ocean camera movement
- Set scrollFactor(0) on all UI elements to fix them to screen
- HUD, crosshair, harpoons, buttons, and messages now ignore camera sway
- Only whale and ocean background move with camera
- Updated collision detection to convert whale world position to screen space
- Harpoons shoot straight relative to screen, not world
- Creates stable aiming interface while ocean/whale sway dynamically
- Much better gameplay feel with separated control and world layers

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-15 03:54:44 +01:00

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

npm install

Run Development Server

npm run dev

The game will be available at http://localhost:5173 (or another port shown in the terminal).

Build for Production

npm run build

The built files will be in the dist/ directory.

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
Description
Whale hunting browser game
Readme 214 KiB
Languages
JavaScript 95.5%
Shell 2.3%
HTML 1.4%
Dockerfile 0.8%