Gems

Gems

Using HTML canvas to create a 3d game for players to enjoy.

This program uses the HTML canvas element in order to draw and simulate a 3D gem-eating game.

IDEA

The purpose of this project was to find out the hidden workings behind 3D image displaying. This could be divided into 4 major steps :

๐Ÿ’ก
In a map with a player and various gems, We can follow these steps to get an image from the player's viewpoint :

1. Shift entire map so that the player comes to (0,0)
2. Rotate the map so that the player faces 90 degrees relative to the +X axis
3. Filter gems that the player can't see
4.Display on canvas

TESTING

0:00
/