Skip to content

camenduru/TostEngine-cinder-tetrisgame

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🍞 TostEngine Cinder Tetris Game

A classic Tetris game built using the Cinder C++ creative coding framework, with audio synthesis using Cinder's native audio API.

Screenshot 2026-01-04 012942

Features

  • 7 Tetromino shapes: I, O, T, S, Z, J, L
  • Next piece preview: Shows upcoming piece
  • Scoring system: Points based on lines cleared (100/300/500/800 × level)
  • Levels: Speed increases every 10 lines cleared
  • Sound effects using Cinder audio:
    • Background music loop
    • Rotation sound
    • Piece placement sound
    • Line clear sound (ascending tones)
    • Game over sound (descending tones)

Controls

Key Action
Arrow Left / A Move left
Arrow Right / D Move right
Arrow Down / S Soft drop
Arrow Up / W Rotate
Space Hard drop
P Pause
Escape Quit
Space (on game over) Restart

Building

Prerequisites

  • Windows 10+
  • Visual Studio 2022
  • CMake 3.16+

Build Steps

cd TetrisGame
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Debug
cmake --build . --config Debug

Project Structure

TetrisGame/
├── src/
│   └── TetrisGame.cpp    # Main game source
├── CMakeLists.txt        # CMake build configuration
└── README.md             # This file

Audio Implementation

Uses Cinder's native audio API (cinder/audio/audio.h):

  • audio::Context::master() - Audio context
  • audio::GenSineNode - Sine wave generator for tones
  • audio::GainNode - Volume control
  • Context::makeNode() - Create audio nodes

All sounds are synthesized procedurally - no audio files needed.

License

MIT License

About

A classic Tetris game built using the Cinder C++ creative coding framework, with audio synthesis using Cinder's native audio API.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors