Skip to content

saiteki-kai/2048

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

2048 C++ Clone

This is a C++ clone of the popular game 2048, created by Gabriele Cirulli. The game is built using the SDL3 and SDL3_ttf libraries.

About

This is the first serious project I've taken on in C++. I wanted to challenge myself by building a simple game while exploring low-level development and C++ tools.

game screenshot

Requirements

  • C++20 or later
  • SDL3
  • SDL3_ttf
  • CMake

Installation

Clone the repository and navigate to the project directory:

git clone https://github.com/saiteki-kai/2048.git

cd 2048/

Create a build directory and run CMake:

mkdir build
cd build/
cmake ..

Compile the project:

make

Run the game:

./2048

Next Steps

  • Style / layout refactoring
  • Game states for game over, win, start showing keyboard instruction
  • Move hardcoded variables to layouts
  • Adaptable font size
  • Improve UI
  • Refactor Game::MoveCol and Game::MoveRow
  • Handle inputs correctly (fix mouse freeze while playing)
  • Game tests
  • Improve memory usage (reallocations, rendering cache)
  • Rounded borders
  • Animations

About

A C++ clone of the game 2048

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published