whatisgithub

What is tetris?

allquixotic/tetris — explained in plain English

Analysis updated 2026-07-26 · repo last pushed 2014-01-12

C++Audience · developerComplexity · 2/5DormantSetup · moderate

In one sentence

A Tetris clone written in C++ that uses SDL and OpenGL for graphics and input. It is a complete, playable remake of the classic block-stacking puzzle game.

Mindmap

mindmap
  root((repo))
    What it does
      Playable Tetris clone
      Handles keyboard input
      Draws falling blocks
    Tech stack
      C Plus Plus
      SDL library
      OpenGL
      WebGL
    Use cases
      Learn game loops
      Study input handling
      Modify game rules
    Audience
      Game dev beginners
      C Plus Plus learners

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Study the source code to learn how a simple game loop and rendering pipeline fit together.

USE CASE 2

Modify the existing game rules to create a custom variant of Tetris.

USE CASE 3

Use it as a starting point to experiment with OpenGL graphics in a small C++ project.

What is it built with?

C++SDLOpenGLWebGL

How does it compare?

allquixotic/tetrisachanana/mavsdkalange/llama.cpp
Stars0
LanguageC++C++C++
Last pushed2014-01-122024-05-20
MaintenanceDormantDormant
Setup difficultymoderatemoderatemoderate
Complexity2/54/54/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

There are no build instructions in the README, so you need to know how to compile a C++ project with SDL and OpenGL dependencies.

The license is not mentioned in the README, so it is unclear what permissions you have to use or modify this code.

So what is it?

This repository contains a working Tetris clone, the classic block-stacking puzzle game where you rotate and arrange falling shapes to clear lines. It's a playable remake of the familiar game, built from scratch in C++. The game uses a combination of SDL (a library that handles things like window creation, keyboard input, and drawing graphics) and OpenGL (a system for rendering 2D and 3D graphics). The description also mentions WebGL, which suggests the game can run in a web browser alongside the desktop version. At a high level, the program takes player input from the keyboard, updates the game state as blocks fall and lines clear, and draws the result on screen using OpenGL graphics. This project would appeal to someone learning game development who wants to study how a simple, complete game is structured. A beginner could read through the code to see how game loops, input handling, and rendering fit together in a real project. It's also a straightforward starting point for anyone who wants to modify a Tetris game, say, changing the rules, adding new features, or experimenting with graphics. The README doesn't go into much detail beyond confirming what the project is and who wrote it. There's no documentation about controls, build instructions, or how to run it, so a user would need some familiarity with compiling C++ projects to get it working. The code itself, written in 2013, is a fairly traditional approach to a small game: one language, standard graphics libraries, and a well-understood game to implement.

Copy-paste prompts

Prompt 1
Help me compile this C++ Tetris project that uses SDL and OpenGL on Windows. What dependencies do I need and what build command should I run?
Prompt 2
I want to modify this Tetris clone so that clearing multiple lines at once gives bonus points. Walk me through where to find the line-clearing logic and how to add a scoring system.
Prompt 3
Explain how the game loop in this C++ Tetris project works, specifically how it handles keyboard input and updates the falling block positions each frame.

Frequently asked questions

What is tetris?

A Tetris clone written in C++ that uses SDL and OpenGL for graphics and input. It is a complete, playable remake of the classic block-stacking puzzle game.

What language is tetris written in?

Mainly C++. The stack also includes C++, SDL, OpenGL.

Is tetris actively maintained?

Dormant — no commits in 2+ years (last push 2014-01-12).

What license does tetris use?

The license is not mentioned in the README, so it is unclear what permissions you have to use or modify this code.

How hard is tetris to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is tetris for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.