Jun 20
Jun 20
Jun 20
Jun 20
Jun 20
Jun 20

Members:
Lamin Gitteh – 2101711103
Felix Anggara – 2101693851
Alfi Mohamed Redzwan – 2101693574

Application Description

The Car Simulation is a game that simulates the car’s interaction between the environment. Use the keyboard to move the car and when it hits an object, it slows down or stops. Textures for each material are rendered using images. Camera’s are used to follow and switch views of the car when it moves.

Contributions

Alfi- Documentation

Felix – Main mechanism

Lamin – Adding materials

Modeling technique

  • PhongMaterial: For the color
  • Standard: Adding shapes to build the car and color

Third Party API and Framework

  • Cannon JS: Modeling and Materials to add and texture
  • Three JS: Main Program
  • HTML: To run the game using browser

Interactivity

Keyboard is used. Arrow keys and WASD to move, Q and E to change view, spacebar to brake and h to flip the car.

Application Manual

  1. Main program using three.js

The main function of the game to run by using the audio for the music, car setup to build and texturing for the car.

Car setup and collisions between meshes.

Adds wheels and quaternion to rotate the wheels.

Adds ground, wall and ramp so that the car can interact by using collision.

Sets the color for the walls. 

Controls for the game. Arrow keys or WASD keys to accelerate, brake or turn.  Q and E is to zoom in or out of the car and H is to flip the car. Events are used when the car moves the audio of the sound it plays and stops when the car stops.

2. Cannon.js

Basic function of the Cannon js. Tells about how camera works and how it the skybox loads.

Camera variable

Camera configuration, skybox textured using images and fog used for the skybox.

Lights and renderer use for setting up the screen and sky.

Follows the camera whenever the car moves.

Camera follows the car when it moves and camera switches backward when it reverses and switches forward when it moves forward.

  1. Gameplay Sample

 

Code: https://github.com/ilamin/Car-Simulation

Video Demo: https://drive.google.com/file/d/17uVtKB19ssO-7xeTMiR_V8Bw7XD6c_zj/view