/3D-Tetris

WebGL project for Computer Graphics Course

Primary LanguageJavaScript

3D TETRIS FROM SCRATCH USING WEBGL


Click To Play Game (Google Chrome Recommended)


Screenshots

Gameplay

WASD or Mouse Drag on object: Movement
SPACE: Fast drop
Q: Rotate 90 degrees around the y-xis
E: Rotate 90 degrees around the x-axis
Mouse Wheel Scroll: Zoom in/out to the point of cursor 
Mouse Wheel Button Drag: Move camera position
Arrows or Mouse Drag: Rotate camera perspective

Options

Height: Changes ground's length on z-axis and changes Invisible Walls' location based on it 
Width: Changes ground's length on x-axis and changes Invisible Walls' location based on it 
Difficulity: Changes game difficulity by increasing falling speed
Enable Alpha: Enables opacity and displays walls
Object Depth: Enables objects that can grow along z-axis

Features

Collision detection: Game doesnt allow rotation or movement if object can collide after that action.
Lighting using shaders
Fully configurable camera perspective with mouse
Random Object Generation
Color Transition based on main object's color
Game Pausing on not focusing window
Direction Fix: Keyboard Inputs stays accurate by fixing movement based on camera angles even after changing camera perspective
Optimized Plane Scanning for detection filled x-z plane  
Sound effects on Movement, Rotation, Fast drop, stacking, plane destruction
Responsive website