Share your repls and programming experiences

← Back to all posts
🔴[NEW]🔴 **🎮Play 2048 2️⃣🅾4️⃣8️⃣ In The Terminal💻** (in C➕➕) With *SIXEL* Graphics
mat1 (4427)



😁 Fun fact:
⇪ Upvoting this post will multiply your skill by the current upvote number!


Use WASD to move the tiles in the direction you so choose.

  • W = up ↑
  • A = left ←
  • S = down ↓
  • D = right →


If you combine two tiles of the same type, they will combine! Crazy, right? 🙃

Try to get to the ✨ mystical 2048 tile ✨

(Above is a screenshot of the 2048 tile)

You lose the game when the board is completely filled up and there are no more similar adjacent tiles.

inspirational story or whatever

This game was my first ever real C++ project I've ever worked on so please comment with feedback and suggestions.
I made it using my Sixel and xTerm libraries but neither of them are perfect so they're not fully released yet.
Sixel is the thing that can actually render the pixels in better quality than usual, to make it look more polished.
xterm is the terminal thing and uses, but I just named my library after it because i've only ever tested it on xterm ¯\_(ツ)_

Please ⬆ upvote ⬆ this post if you think 2048 is cool!
or if you don't
i don't really care as long as you upvote it


DJWang (1354)


mat1 (4427)

@DJWang Yeah, they unfortunately removed Sixel and this no longer works.

cloudrex (1)

Asking too much for upvotes so I decided not to.

mat1 (4427)

@cloudrex you gotta do what you gotta do to get upvotes these days ;)

HappyFakeboulde (241)
very good
have an upvote
now i will multiply my skill by 40

Boopydoop (164)

Wow this is amazing!

amasad (3446)

love it! Can it work on my phone?

mat1 (4427)

@amasad It technically should work on phones with the WASD keys but it might be laggier than usual due to it using Sixels

minermaniac447 (283)

So what happens if you combine 2 2048s?

mat1 (4427)

@minermaniac447 If you combine two 2048 tiles then the whole universe implodes on itself.

jk, you just get a 4096 tile

JHightower835 (13)

@abdulrahmanmoha Sorry to bother you but there is no volume.Could you please fix it.Thank you

mat1 (4427)

@JHightower835 Hey, unfortunately, currently does not support playing sounds in the terminal.

HappyFakeboulde (241)

@JHightower835 also i don't get why you'd need sound for 2048

Dart (1200)

Finally, 2048 is blocked in my school now I can play again

mat1 (4427)

@Zexogon Sorry to let you down but this Repl doesn't work anymore since Sixel was removed and Rob no longer works at :(

AQDProjects (21)

I only get the message to upvote, no 2048

mat1 (4427)

@AQDProjects Yeah, they unfortunately removed Sixel and this game no longer works :(

slip1244 (257)

rip it's dead now

mat1 (4427)

@nithilan4 yeah unfortunately rob mode is broken now and there's nothing i can really do about it :(

SPQR (592)

Hey chief, if you don't mind could you help me out with the Sixels thing? I'm going to try to make a console RPG with them and I honestly haven't a clue how they work lol (alternatively, I could "borrow" the code in your sixels library (only if you're ok with that), I'd make sure to give you proper credit for it)

mat1 (4427)

@SPQR Yeah, you're allowed to borrow my Sixel code but if you post it on Repl Talk don't forget to credit me ;)
If you want to learn how Sixels work internally, you can read the Sixel Wikipedia article and the VT100 docs

SPQR (592)

@mat1 Thanks :D I'll put some comments in my code so I don't forget. If by some miracle I do forget to credit you, though, or if you don't feel it's clear enough, let me know and I'll fix it. This will take my game to the point of actually being really cool I think, so I want to make sure you get credit for it. :)

theprobobxd (0)

R.i.p I tried it on the iPad It didn’t work 🤣

JSer (84)

doesnt work oof

mat1 (4427)

@JSer oh crap I messed something up I'll fix it when I get home