Share your repls and programming experiences

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

2048

YOU HAVE TO PLAY 2048 AT 🎮 https://2048.mat1.repl.run/rob/ 🎮 OTHERWISE IT WILL NOT WORK

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

Controls

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

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

Gameplay

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 Repl.it and Repl.run 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

-mat

Commentshotnewtop
▲
2

👏🏻 incredible job!

▲
2
▲
2

Asking too much for upvotes so I decided not to.

▲
1

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

▲
2

Wow this is amazing!

▲
2

love it! Can it work on my phone?

▲
2

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

▲
2

So what happens if you combine 2 2048s?

▲
4

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

jk, you just get a 4096 tile

▲
1

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

▲
2

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

▲
3

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

▲
1

rip it's dead now

▲
1

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

▲
1

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)

▲
2

@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

▲
2

@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. :)

▲
1

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

▲
1
▲
1

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