这是indexloc提供的服务,不要输入任何密码
Skip to content

mvsusp/puzzle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Panel Pop - Three.js Implementation

A faithful recreation of Panel de Pon / Tetris Attack / Puzzle League using Three.js and TypeScript.

🎮 About

Panel Pop is a modern web implementation of the classic puzzle game series, featuring:

  • Authentic gameplay mechanics - Modeled after the original SNES version
  • Modern web technologies - Built with Three.js, TypeScript, and Vite
  • 60 FPS gameplay - Fixed timestep game loop for consistent performance
  • Multiple game modes - Endless, VS, and Demo modes
  • High code quality - Comprehensive testing and linting

🚀 Development Status

Phase 1: Foundation & Core EngineCOMPLETED

  • ✅ Project infrastructure and build system
  • ✅ Three.js scene with orthographic camera
  • ✅ Asset loading system with progress tracking
  • ✅ Fixed timestep game loop (60 FPS)
  • ✅ Basic sprite rendering system
  • ✅ Development environment with hot reload
  • ✅ Comprehensive test suite

Phase 2: Board System & Block RenderingCOMPLETED

  • ✅ 6x24 grid board system with proper indexing
  • ✅ Block class with color and state properties
  • ✅ Tile data structure with type, block, and garbage references
  • ✅ Block mesh generation using Three.js materials
  • ✅ Grid background rendering with visual guidelines
  • ✅ Board renderer with visual state effects
  • ✅ Integration with scene manager
  • Success Criteria Verified - Visual display at localhost:3001 ✅

Next: Phase 3 - Input System & Cursor (Days 11-15)

📁 Project Structure

├── src/
│   ├── core/           # Game engine core
│   ├── game/           # Game logic  
│   ├── rendering/      # Three.js rendering
│   ├── input/          # Input handling
│   ├── assets/         # Asset management
│   └── utils/          # Utilities
├── public/
│   └── assets/         # Game assets
├── tests/              # Test suites
└── docs/               # Documentation

🛠 Development

Prerequisites

  • Node.js 18+
  • npm or yarn

Quick Start

# Install dependencies
npm install

# Start development server
npm run dev

# Open http://localhost:3000

Development Commands

# Development
npm run dev              # Start dev server with hot reload
npm run build           # Build for production  
npm run preview         # Preview production build

# Code Quality (run before every commit)
npm run lint            # Check code style
npm run lint:fix        # Auto-fix style issues
npm run type-check      # TypeScript compilation check
npm run format          # Format code with Prettier

# Testing
npm run test            # Run all tests
npm run test:watch      # Run tests in watch mode
npm run test:coverage   # Generate coverage report
npm run test:ui         # Run tests with UI

Quality Assurance

Before committing code, ALWAYS run:

npm run lint && npm run type-check && npm run test && npm run build

🎯 Phase 2 Success Criteria

All Phase 2 objectives have been completed:

  • ✅ Board displays initial random block configuration (6x24 grid with 5 colors)
  • ✅ All 5 block colors render correctly (Purple, Yellow, Red, Cyan, Green)
  • ✅ Grid aligns properly with blocks (32x32 tile system)
  • ✅ Buffer row remains hidden (row 0 not visible)
  • ✅ Visual state effects working (floating, matched, exploding states)
  • ✅ Tests pass: 41/41 game logic tests ✅ 22/22 core system tests

🧪 Testing

The project maintains high testing standards:

  • Unit Tests: Core game logic and systems
  • Integration Tests: Component interactions
  • Coverage Target: Minimum 80% line coverage
  • Framework: Vitest + Testing Library

Run tests:

npm run test           # Run once
npm run test:watch     # Watch mode
npm run test:coverage  # With coverage

📋 Implementation Plan

This project follows a detailed 15-phase implementation plan:

  1. Foundation & Core Engine (Days 1-5)
  2. Board System & Block Rendering (Days 6-10)
  3. Input System & Cursor (Days 11-15)
  4. Core Game Mechanics (Days 16-25)
  5. Chain & Combo System (Days 26-30)
  6. Animation System (Days 31-35)
  7. Garbage Blocks (Days 36-40)
  8. Visual Effects & Particles (Days 41-45)
  9. Game States & UI (Days 46-50)
  10. Audio System (Days 51-55)
  11. Game Modes (Days 56-60)
  12. AI System (Days 61-65)
  13. Configuration & Persistence (Days 66-68)
  14. Optimization & Polish (Days 69-72)
  15. Testing & Release (Days 73-75)

See implementation_plan.md for detailed specifications.

🔧 Technology Stack

  • Rendering: Three.js with orthographic camera
  • Language: TypeScript with strict mode
  • Build Tool: Vite with hot reload
  • Testing: Vitest + Testing Library
  • Code Quality: ESLint + Prettier
  • Game Loop: Fixed timestep at 60 FPS

📖 Documentation

🎨 Game Features (Planned)

  • Authentic Mechanics: Original SNES Panel de Pon gameplay
  • Chain System: Complex chain reactions and scoring
  • Multiple Modes: Endless, VS, and Demo gameplay
  • Visual Effects: Particles, animations, and screen shake
  • Audio: Dynamic music and comprehensive sound effects
  • AI Opponent: Multiple difficulty levels
  • Mobile Support: Touch controls and responsive design

🤝 Contributing

This project follows strict development practices:

  1. Code Quality: All code must pass linting and type checks
  2. Testing: New features require comprehensive tests
  3. Documentation: Update relevant documentation
  4. Commit Standards: Follow conventional commit messages

See CLAUDE.md for detailed development guidelines.

📜 License

MIT License - see LICENSE for details.


Current Status: Phase 2 Complete ✅
Next Milestone: Input System & Cursor Implementation
Target: Frame-perfect Panel de Pon recreation

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published