Skip to content

About

made with me and BlackBox.ai

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

ย 

History

4 Commits

Folders and files

Repository files navigation

๐Ÿš€ Space Game Engine

A simulation-grade space exploration and docking game built with modern web technologies. Inspired by the SpaceX ISS docking simulation, this game engine provides realistic physics, engaging gameplay, and full controller support.

Version License TypeScript React

โœจ Features

๐ŸŽฎ Core Game Engine

  • Professional Architecture - Modular game engine with entity-component system
  • Fixed Timestep Loop - Consistent physics simulation
  • Scene Management - Efficient scene graph and entity hierarchy
  • State Management - Zustand for predictable state updates

๐Ÿ”ฌ Physics Engine

  • Newtonian Mechanics - Realistic F=ma physics simulation
  • 6DOF Control - Six degrees of freedom spacecraft movement
  • Inertia & Momentum - Authentic space physics
  • Collision System - Accurate collision detection and response

๐ŸŽจ Rendering Engine

  • Three.js Integration - High-performance 3D graphics
  • React Three Fiber - Declarative 3D scene composition
  • Multiple Camera Modes - Cockpit, chase, and free camera views
  • Visual Effects - Particle systems, trails, and post-processing

๐ŸŽฎ Input System

  • Keyboard Controls - Full keyboard support with customizable bindings
  • Gamepad Support - Native controller integration via Gamepad API
  • Analog Precision - Smooth analog stick controls
  • Vibration Feedback - Haptic feedback for immersive gameplay

๐Ÿš€ Gameplay Features

  • Docking Simulation - Precision docking mechanics with alignment indicators
  • Space Exploration - Open space environment with celestial bodies
  • Asteroid Fields - Navigate through challenging asteroid obstacles
  • Mission System - Various mission types with progression
  • Multiple Spacecraft - Unlockable ships with different characteristics

๐Ÿ› ๏ธ Technology Stack

  • Frontend Framework: React 18 with TypeScript
  • 3D Graphics: Three.js with React Three Fiber
  • Physics: @react-three/rapier
  • State Management: Zustand
  • Build Tool: Vite
  • Styling: Tailwind CSS
  • 3D Helpers: @react-three/drei

๐Ÿ“ฆ Installation

Prerequisites

  • Node.js (v18 or higher)
  • npm or yarn package manager

Setup

# Clone the repository
git clone https://github.com/yourusername/space-game-engine.git
cd space-game-engine

# Install dependencies
npm install

# Run development server
npm run dev

# Build for production
npm run build

๐ŸŽฎ Controls

Keyboard

  • WASD - Translation (forward/back/left/right)
  • Q/E - Roll
  • Shift/Ctrl - Up/Down
  • Arrow Keys - Rotation
  • Space - Boost
  • ESC - Pause menu

Gamepad

  • Left Stick - Translation
  • Right Stick - Rotation
  • Triggers - Up/Down
  • A Button - Boost
  • Start - Pause menu

๐Ÿ“š Documentation

Comprehensive documentation is available in the /docs folder. Open docs/index.html in your browser to view:

  • Getting Started - Installation and quick start guides
  • Engine Architecture - Core systems and design patterns
  • Physics Engine - Detailed physics implementation
  • Gameplay Systems - Spacecraft, docking, and missions
  • API Reference - Complete component and hook documentation

View Documentation Locally

# Open documentation in browser
open docs/index.html
# or on Windows
start docs/index.html

๐Ÿ—‚๏ธ Project Structure

SpaceGame/
โ”œโ”€โ”€ docs/                      # Complete documentation
โ”‚   โ”œโ”€โ”€ index.html            # Documentation homepage
โ”‚   โ”œโ”€โ”€ assets/               # Documentation assets
โ”‚   โ””โ”€โ”€ pages/                # Documentation pages
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ engine/               # Core game engine
โ”‚   โ”‚   โ”œโ”€โ”€ core/            # Game loop, entities, scenes
โ”‚   โ”‚   โ”œโ”€โ”€ physics/         # Physics simulation
โ”‚   โ”‚   โ”œโ”€โ”€ rendering/       # Rendering system
โ”‚   โ”‚   โ””โ”€โ”€ input/           # Input management
โ”‚   โ”œโ”€โ”€ game/                # Game-specific code
โ”‚   โ”‚   โ”œโ”€โ”€ entities/        # Game entities
โ”‚   โ”‚   โ”œโ”€โ”€ systems/         # Game systems
โ”‚   โ”‚   โ””โ”€โ”€ config/          # Configuration
โ”‚   โ”œโ”€โ”€ components/          # React components
โ”‚   โ”‚   โ”œโ”€โ”€ game/           # Game canvas components
โ”‚   โ”‚   โ””โ”€โ”€ ui/             # UI components
โ”‚   โ”œโ”€โ”€ hooks/              # Custom React hooks
โ”‚   โ”œโ”€โ”€ utils/              # Utility functions
โ”‚   โ”œโ”€โ”€ types/              # TypeScript types
โ”‚   โ””โ”€โ”€ assets/             # Game assets
โ”œโ”€โ”€ public/                 # Static assets
โ””โ”€โ”€ package.json           # Project dependencies

๐Ÿšง Development Status

Phase 1: Foundation โœ…

  • Project setup and structure
  • Documentation system
  • Build configuration

Phase 2-13: In Progress โณ

  • Core game engine
  • Physics engine
  • Rendering engine
  • Input system
  • Spacecraft system
  • Space environment
  • Docking system
  • Mission system
  • Progression system
  • User interface
  • Audio system
  • Polish & optimization

๐ŸŽฏ Roadmap

Short Term

  • Implement core game engine architecture
  • Build physics simulation system
  • Create basic spacecraft controls
  • Develop docking mechanics

Medium Term

  • Add multiple spacecraft models
  • Implement mission system
  • Create asteroid field generation
  • Add visual effects and polish

Long Term

  • Multiplayer support
  • VR compatibility
  • Advanced mission types
  • Modding support

๐Ÿค Contributing

Contributions are welcome! Please read the Contributing Guide for details on our code of conduct and the process for submitting pull requests.

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ™ Acknowledgments

  • Inspired by the SpaceX ISS Docking Simulator
  • Built with amazing open-source technologies
  • Thanks to the Three.js and React communities

๐Ÿ“ž Contact

For questions, suggestions, or feedback, please open an issue on GitHub.


Built with โค๏ธ and โ˜• for space enthusiasts

About

made with me and BlackBox.ai

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages