Skip to content

A Tetris-inspired game featuring dynamic blocks, power-ups, traps, and a vibrant score system, built with OpenGL, C++, and GLEW using GL_POINTS for rendering

License

Notifications You must be signed in to change notification settings

Mahrjose/Tetrix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project Name: Tetrix

Update (27 December, 2024)

I've completed a demo version of the project using Legecy OpenGL instead. This was a part of my Computer Graphics course project and with a tight deadline, I couldn't explore the modern OpenGL properly. Also, it was specially challenging to implement the whole game with only GL_POINT. Please checkout demo/ directory, and compile and run the code to play with the project. I'll get back to modern OpenGL implementation if I get time later. Thank you.

Description

A vibrant Tetris-inspired game where falling blocks and strategic power-ups collide, made entirely using OpenGL, C++, and GL_POINTS.

Features

  1. Falling Blocks: Blocks continuously fall from the top of the grid.
  2. Player Controls: Use keyboard inputs to move blocks left, right, or rotate them.
  3. Line Clearing: Complete rows are detected and cleared, with the remaining blocks shifting down.
  4. Varied Blocks: Blocks come in different colors and shapes.
  5. Scoreboard: Tracks your score in real-time.
  6. Power-Ups and Traps: Randomized blocks with special effects to add variety.

Technologies Used

  • OpenGL: For rendering graphics.
  • C++: Core game logic and structure.
  • GLEW: For managing OpenGL extensions.
  • GL_POINTS: Used exclusively for rendering all game visuals.

How to Build and Run

Prerequisites

  • A C++ compiler (e.g., GCC, Clang, or MSVC)
  • OpenGL development libraries
  • GLEW (OpenGL Extension Wrangler Library)

Steps to Build

  1. Clone the repository:
    git clone https://github.com/mahrjose/Tetrix.git
    cd Tetrix
  2. Compile and Run the code:
    chmod +x run.sh
    ./run.sh

Controls

  • Arrow Keys:
    • Left: Move block left
    • Right: Move block right
    • Up: Rotate block
  • Spacebar: Instantly drop the block

Gameplay

  • Blocks will fall from the top of the grid.
  • Use arrow keys to position and rotate the blocks.
  • Complete rows to clear them and score points.
  • Watch out for random power-ups and traps that change gameplay dynamics.

License

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

Acknowledgments

  • Inspired by the classic game Tetris.
  • Built as a course project to explore the fundamentals of OpenGL and C++ programming.

About

A Tetris-inspired game featuring dynamic blocks, power-ups, traps, and a vibrant score system, built with OpenGL, C++, and GLEW using GL_POINTS for rendering

Resources

License

Stars

Watchers

Forks

Releases

No releases published