lucky-wheel-phaser
v1.0.0
Published
Lucky Wheel Game using Phaser
Readme
Lucky Wheel Game with Phaser
This is a simple lucky wheel game built with Phaser 3. The game features a wheel with 8 segments, each representing different prizes. When the player clicks the "Spin the Wheel" button, the wheel spins and eventually stops on a random segment, revealing the prize.
Features
- Interactive wheel with 8 prize segments
- Smooth spinning animation
- Prize display after the wheel stops
- Responsive design
Getting Started
Prerequisites
- Node.js (v14 or higher)
- npm or yarn
Installation
- Clone this repository
- Navigate to the project directory
- Install dependencies:
npm install
# or
yarn installRunning the Development Server
npm start
# or
yarn startThis will start the development server at http://localhost:9000
Building for Production
npm run build
# or
yarn buildThis will create a production-ready build in the dist directory.
Game Structure
src/index.ts- Main entry pointsrc/scenes/GameScene.ts- Main game scene with wheel logicsrc/types/game.ts- TypeScript interfaces for game objects
Customization
You can customize the wheel segments by modifying the segments array in GameScene.ts. Each segment has:
color: The background color (hex code)text: The text to display on the segmentprize: The prize value (used for result display)
