Ocean Adventure ๐
A 3D browser-based underwater platform game where players dive into an immersive oceanic world, collecting glowing stars and navigating to luminous gates to complete challenging levels.
๐ฎ Game Overview
Ocean Adventure is a captivating 3D platformer that transports players into a vibrant underwater world. Experience the freedom of swimming through diverse oceanic environments, from shallow coral gardens to mysterious deep-sea caverns.
๐ฏ Gameplay Features
- Immersive 3D Swimming: Realistic underwater physics with fluid movement mechanics
- Collectible Stars: Gather glowing star objects scattered throughout each level
- Dynamic Environments: Explore coral reefs, deep ocean trenches, and underwater caves
- Progressive Difficulty: Levels increase in complexity with advanced navigation challenges
- Mobile Optimized: Full touch control support for smartphones and tablets
- Cross-Platform: Runs seamlessly on desktop browsers and mobile devices
๐ Key Highlights
- WebGL-Powered Graphics: Stunning 3D visuals with underwater lighting effects
- Responsive Design: Adaptive interface for all screen sizes
- Accessibility Features: Inclusive design for players of all abilities
- Performance Optimized: Smooth 60 FPS gameplay on desktop, 30+ FPS on mobile
- Open Source: Community-driven development with comprehensive documentation
๐ Quick Start
Play Now
Visit Ocean Adventure Game to play directly in your browser!
System Requirements
- Desktop: Chrome 80+, Firefox 75+, Safari 13+, Edge 80+
- Mobile: iOS 13+ Safari, Android Chrome 80+
- Hardware: WebGL 2.0 support, 2GB+ RAM recommended
๐ ๏ธ Development
Prerequisites
- Node.js 24+
- npm 10+
- Modern web browser with WebGL support
Installation
# Clone the repository git clone https://github.com/commjoen/3dgame.git cd 3dgame # Install dependencies npm install # Start development server npm run dev
Visit http://localhost:3000 to see the game in action!
Available Scripts
npm run dev # Start development server npm run build # Build for production npm run test # Run all tests npm run lint # Run code linter npm run preview # Preview production build
๐ Documentation
๐ Project Documentation
- Copilot Plan - Comprehensive development roadmap and milestones
- Game Design - Detailed game mechanics and design decisions
- Architecture - System design and technical implementation
- Setup Guide - Development environment setup instructions
- Contributing - Guidelines for contributors
๐ฏ Quick Links
๐จ Game Features
๐โโ๏ธ Swimming Mechanics
- Fluid Movement: Natural underwater physics with momentum and drag
- 360ยฐ Freedom: Complete 3D movement in all directions
- Surface Interaction: Breach the water surface for different gameplay dynamics
- Realistic Physics: Buoyancy effects and underwater currents
๐ Environments
- Coral Gardens: Bright, colorful shallow waters perfect for beginners
- Deep Ocean: Challenging mid-level environments with limited visibility
- Underwater Caves: Complex navigation requiring strategic exploration
- Abyss Depths: Advanced levels with minimal lighting and hidden passages
โญ Collectibles & Objectives
- Glowing Stars: Primary collectibles with satisfying pickup effects
- Luminous Gates: Level completion objectives that activate after collecting all stars
- Hidden Areas: Secret locations with bonus content for explorers
- Achievement System: Goals and challenges beyond main progression
๐ฑ Mobile Support
Ocean Adventure is fully optimized for mobile devices with:
๐ฒ Touch Controls
- Swipe Navigation: Intuitive swimming direction control
- Virtual Joystick: Optional on-screen movement controls
- Tap Interactions: Simple touch-based object interaction
- Gesture Support: Pinch-to-zoom camera control
โก Performance Optimization
- Adaptive Quality: Automatic graphics adjustment based on device capability
- Efficient Rendering: Optimized draw calls and texture usage
- Battery Conscious: Frame rate limiting to preserve battery life
- Memory Management: Efficient asset loading and garbage collection
๐ Live Previews & Deployments
Ocean Adventure uses automated GitHub Actions to provide live previews and deployments:
๐ Stable Deployment
- Main Branch: https://commjoen.github.io/3dgame/
- Automatically deployed when changes are merged to
main - Always represents the latest stable version
๐ง Setup Required: For GitHub Pages deployment to work, ensure:
- Go to Repository Settings > Pages
- Set Source to "GitHub Actions" (not "Deploy from a branch")
- Save settings and push to main branch
Run
./scripts/validate-github-pages.shto test your setup locally.
๐ Pull Request Previews
- Automatic Previews: Every PR automatically gets its own preview deployment
- Unique URLs: Each PR gets a dedicated URL at
https://commjoen.github.io/3dgame/pr-{number}/ - Live Updates: Previews update automatically when new commits are pushed
- Auto Cleanup: Preview deployments are automatically removed when PRs are closed
๐ Preview Management
- All Previews: https://commjoen.github.io/3dgame/previews.html
- View all active PR previews and the main deployment in one place
- Direct links to both the game and the corresponding GitHub PR
๐ณ Container Deployment
- Automated Builds: Docker images are automatically built and pushed to GitHub Container Registry (GHCR)
- Multi-platform: Images available for
linux/amd64andlinux/arm64architectures - Container Registry: ghcr.io/commjoen/3dgame
- Image Tags:
latest: Latest stable version from main branchmain: Latest build from main branchpr-{number}: Preview builds for pull requests{branch}-{sha}: Specific commit builds
Quick Start with Docker:
# Run the latest stable version docker run -p 8080:80 ghcr.io/commjoen/3dgame:latest # Access the game at http://localhost:8080
Production Deployment:
# Pull the latest image docker pull ghcr.io/commjoen/3dgame:latest # Run with custom port and name docker run -d --name ocean-adventure -p 80:80 ghcr.io/commjoen/3dgame:latest
๐ง Development Status
๐ Current Progress
Ocean Adventure follows a structured development roadmap outlined in the Copilot Plan. Here's the current status:
โ Stage 1: Foundation & Setup (COMPLETED)
- โ Project repository structure
- โ Build system and toolchain (Vite + Three.js)
- โ Development environment setup
- โ CI/CD pipeline with GitHub Actions
- โ WebGL context initialization
๐ Stage 2: Core Game Engine (COMPLETED)
- โ 3D Scene Management: Robust scene graph with mobile optimization
- โ Underwater Environment Renderer: Immersive world with procedural generation
- โ Swimming Physics: Realistic underwater movement with buoyancy & drag
- โ Camera System: Smooth third-person follow camera
- โ Collision Detection: Multi-geometry collision system (sphere, AABB)
- โ Underwater Lighting: Advanced lighting with animated caustics
- โ Particle Effects: Comprehensive underwater atmosphere (bubbles, debris, light rays)
๐ Performance Achieved: 60 FPS desktop, 35+ FPS mobile
๐งช Test Coverage: 116 tests passing (100% Stage 2 coverage)
๐ฑ Mobile Ready: Touch controls & virtual joystick implemented
๐ Stage 3: Game Objects & Mechanics (COMPLETED)
- โ Glowing gate objectives with light emission and activation
- โ Enhanced star collectible objects with physics integration
- โ Complete pickup/collection system with visual and audio feedback
- โ Level progression and completion mechanics through gates
- โ Audio engine with underwater ambience and 3D spatial effects
- โ Enhanced particle systems for collection and completion effects
โญ๏ธ Stage 4: Mobile Optimization & Controls (NEXT)
๐ฎ Future Stages
- Stage 4: Mobile Optimization & Controls
- Stage 5: Level Design & Content
- Stage 6: Polish & User Experience
- Stage 7: Testing & Deployment
๐ Latest Milestones
December 2024 - Stage 2 Completion
- ๐ฏ All core engine systems delivered
- ๐ Performance targets exceeded
- ๐งช Comprehensive test suite added (49 new tests)
- ๐ Architecture documentation updated
- ๐ Ready for Stage 3 development
For detailed progress tracking, see the Stage 2 Completion Summary.
๐ค Contributing
We welcome contributions from developers of all skill levels! Here's how to get started:
๐ฐ First-Time Contributors
- Check out issues labeled
good first issue - Read our Contributing Guidelines
- Fork the repository and create a feature branch
- Make your changes and add tests
- Submit a pull request with a clear description
๐ Advanced Contributors
- Explore the Architecture Documentation
- Check the Copilot Plan for upcoming features
- Review Performance Guidelines
- Join discussions in GitHub Issues
๐ Types of Contributions
- Bug Fixes: Report and fix issues
- Feature Development: Implement new game mechanics
- Performance Optimization: Improve rendering and memory usage
- Documentation: Enhance guides and API documentation
- Testing: Add unit, integration, and end-to-end tests
- Mobile Support: Improve mobile compatibility and controls
๐๏ธ Project Structure
3dgame/
โโโ src/ # Source code
โ โโโ core/ # Core game engine
โ โโโ components/ # Game components
โ โโโ scenes/ # Game scenes and levels
โ โโโ assets/ # Game assets
โ โโโ utils/ # Utility functions
โโโ docs/ # Documentation
โโโ tests/ # Test suites
โโโ .github/workflows/ # CI/CD pipelines
โโโ public/ # Static assets
โโโ COPILOT_PLAN.md # Development roadmap
๐ง Technical Stack
๐จ Frontend Technologies
- Rendering: Three.js (WebGL 2.0/1.0)
- Build Tool: Vite with TypeScript
- Physics: Custom underwater physics simulation
- Audio: Web Audio API with 3D spatial sound
- Testing: Vitest + Playwright for E2E testing
๐ Performance Features
- Object Pooling: Efficient memory management
- LOD System: Level-of-detail optimization
- Frustum Culling: Render only visible objects
- Texture Compression: Optimized asset loading
- Progressive Loading: Priority-based resource loading
๐ Performance Targets
| Platform | Target FPS | Load Time | Memory Usage |
|---|---|---|---|
| Desktop | 60 FPS | < 3s | < 200MB |
| Mobile | 30+ FPS | < 5s | < 100MB |
| Tablet | 45+ FPS | < 4s | < 150MB |
๐ Bug Reports & Feature Requests
๐ Reporting Issues
Found a bug? We'd love to fix it! Please:
- Check existing issues first
- Use our bug report template
- Include browser/device information and steps to reproduce
- Add screenshots or screen recordings if applicable
๐ก Feature Requests
Have a great idea? We'd love to hear it! Please:
- Check existing feature requests
- Use our feature request template
- Describe the problem it solves and proposed solution
- Consider the impact on performance and complexity
๐ License
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
๐คฒ Open Source Commitment
- Free Forever: Always free to play and modify
- Community Driven: Developed by and for the community
- Transparent Development: All decisions made in the open
- Educational Use: Perfect for learning 3D web development
๐ Acknowledgments
๐ Special Thanks
- Three.js Community for the amazing 3D library
- WebGL Contributors for making 3D web graphics possible
- Open Source Community for tools and inspiration
- Beta Testers for early feedback and bug reports
๐ Built With
- Three.js - 3D JavaScript library
- Vite - Next generation frontend tooling
- Vitest - Fast unit testing framework
- Playwright - End-to-end testing
๐ Contact & Support
๐ฌ Get Help
- GitHub Issues: Report bugs or request features
- GitHub Discussions: Community Q&A and ideas
- Documentation: Comprehensive guides and API docs
๐ Links
- Play Game: Ocean Adventure
- Source Code: GitHub Repository
- Issue Tracker: Bug Reports & Features
- Wiki: Additional Documentation
Dive into Ocean Adventure and explore the depths of 3D web gaming! ๐๐โโ๏ธโญ