/moonlanderv2

Created with CodeSandbox

Primary LanguageJavaScript

🚀 MoonLander v2

CodeSandbox React three.js @react-three/fiber @react-three/cannon CSS

Welcome to MoonLander v2, a scientific 3D simulation project of a moon landing! 🌕🚀

Instructions

or

  1. Clone the Repository: To get started, clone this repository to your local machine using the following command:

    git clone https://github.com/YOUR_USERNAME/moonlanderv2.git
    
  2. Install Dependencies: Navigate to the project directory and install the required dependencies using npm or yarn:

    cd moonlanderv2
    npm install
    
  3. Start the Development Server: Launch the development server to view the project in your browser:

    npm start
    
  4. Controls: Use the arrow keys to control the moon lander. Press the arrow keys to move and the space bar to activate the thrusters.

📄 Description

MoonLander v2 is a 3D simulation of a moon landing developed using React and three.js libraries. The project aims to provide an interactive and realistic experience of piloting a moon lander on the lunar surface. Users can control the moon lander's movement and perform a simulated landing on the moon.

🛠️ Technologies Used

  • React
  • three.js
  • @react-three/fiber
  • @react-three/cannon
  • CSS

🌟 Key Features

  • Realistic 3D moon landing simulation.
  • User-controllable moon lander movement.
  • Responsive arrow key controls.
  • Thruster activation using the space bar.
  • Error handling with React ErrorBoundary.
  • Dynamic camera following the moon lander.

🚧 Project Struggles & Challenges

Development presented several challenges, including control responsiveness, camera settings, third-party library integrations, positioning, and error handling. Each obstacle was overcome through iterative debugging and problem-solving.

During the development of this project, we faced several challenges, including:

  • Unresponsive Controls: Correcting event listeners and state management issues to ensure smooth control functionality.

  • FOV and Camera Problems: Adjusting the camera's field of view and positioning to capture the entire scene properly.

  • Library Integration: Dealing with compatibility issues and frequent updates of third-party packages.

  • Positioning and Layout: Ensuring proper alignment and resolving CSS conflicts for a visually pleasing experience.

  • Error Handling: Spending time on error detection and employing various debugging techniques.

📝 License

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


Version 1 (Sam's code, the aesthetic formulation):

Version 2 (Sagar's code, the physics implementation and proof of concept):

Version 3 (Malik's code, the addition of controls and visually the best):

Webpage Demo (Sam's code, a relevant side-project to add to our educational goal):


Let's embark on this thrilling lunar journey together! 🌌🚀