6 ms·
Show HN: Termichess – Play chess in your terminal
Hey everyone,
I have been trying to build a terminal based app for sometime now and this is an attempt at trying to build a chess app that one can play right inside terminal.
I was inspired by `chess-tui`[1] which is a rust based project and was looking to build something similar using python. Luckily I stumbled upon textual[2] recently and it made my task of building this far more easier than I thought.
[1] https://github.com/thomas-mauran/chess-tui https://github.com/thomas-mauran/chess-tui
[2] https://github.com/textualize/textual https://github.com/textualize/textual
- anthk 2y agognuchess did it before, and better. Also, telnet freshchess.org 5000. FICS rules.
- FergusArgyll 2y agoThe opening in your demo is disgusting, way to ruin a Sicilian.... Very cool program though :)
- qsort 2y agoOh come on, usual HN. It can't be that ba... > 2. Qf3 Well maybe it was jus... > 4. Nh3 I see...
- mtlmtlmtlmtl 2y agoAt least it's not the Alapin(2. c3). As a sicilian player from the black side this is like half my games now and I'm considering switching to some other defence because it's boring me to death. Not sure what I'd go for though, feels like the sicilian is the only non-dubious defence to e4 to offer real fighting positions. Caro-kann is passive, French is pretty passive unless they play Nc3 and you get the Winaver, Scandi is a snoozefest, and the Petrov is frankly disgusting in its lack of ambition. Two Knight's defence is very fun if they play Ng5 or d4 but now everyone's playing d3 to make the game as boring as possible. I guess I'm stuck with the Sicilian. If anyone knows a way to make the Alapin wild and tactical as black, I'm listening.
- FergusArgyll 2y agoI play e5, Archangel (6 Bc5) is fun in the spanish, ofc you're taking the risk of white playing an italian and you falling asleep...
- mtlmtlmtlmtl 2y agoArchangel does indeed look like a fun one. Lots of good options in the Ruy Lopez really. The Open Spanish and the Marshall gambit can be a lot of fun too. Funnily enough I actually play the Italian as white, but I don't play the boring c3 d3 lines. After 3. Bc4 Bc5 I play 0-0 and on Nf6 play d4. exd4 e5 transposes to the Max Lange and Bxd4 Nxd4 Nxd4 Bg5 gets into the Italian gambit which is very sharp. My main issue is that on 4. 0-0 d6, d4 doesn't really offer much. I've been playing a "deferred Evans" with b4 and getting some fun positions that way though. I'm also working on learning the minutiae of 2. Bc4 so I never have play a Petrov ever again...
- krishnasangeeth 2y agoChess speaks for itself :-D
- Brajeshwar 2y agoThe unbearable pixel graphics on such a large display make it unplayable. It's a nice one, though. I think I should shrink the size of my terminal window. Or can you make everything smaller? Need Keyboard support.
- krishnasangeeth 2y ago> I think I should shrink the size of my terminal window.Or can you make everything smaller? So the board shrinks down as you reduce the size of window. Currently there is an issue in the chess pieces scaling down in size if we reduce the size of terminal. Showing images properly is quite tricky in terminal, hope to get to it sometime later this week. > Need Keyboard support. That's also something on my mind. Do you have any specific scenario in mind. I was thinking of hotkeys or chess notation as input.
- Brajeshwar 2y agoArrow keys to navigate while using SPACEBAR/ENTER to pick/drop pieces should be enough.
- TheBlight 2y agoCool but you could always play ASCII chess in your terminal by telnetting into FICS.
- rosmax_1337 2y agoWhy reinvent a graphical interface in the terminal? If we are playing chess in the terminal, we are likely happy to accept abstractions and such. You could use normal letters for the different pieces, perhaps using lowercase for black and uppercase for white. Even the "grid" could be an optional setting, placing a slight emphasis on user skill in being able to visualize the grid on their own. A B C D E F G H 8 r n b q k b n r 7 p p p p p p p p 6 5 4 3 2 P P P P P P P P 1 R N B Q K B N R This to me feels more like truly playing chess in the terminal. Add a non-interactive session mode, for example "chesst game123 view" to produce a view of the game, and "chesst game123 e2 e4" to move the pawn infront of white king two squares up. Naturally moving a piece can by default also print the new board state, after the opponents move. Implicitly prompting you to move again, or to just leave the terminal and do something else.
- taeric 2y agoI'd assume you'd just use the unicode chess symbols, nowadays? (https://en.wikipedia.org/wiki/Chess_symbols_in_Unicode https://en.wikipedia.org/wiki/Chess_symbols_in_Unicode) I'd also assume people would use https://en.wikipedia.org/wiki/Algebraic_notation_(chess) https://en.wikipedia.org/wiki/Algebraic_notation_(chess) for the notation. No need to say "e2 e4" if "e4" is already non-ambiguous. Plus side for learning this notation is it can help read old games.
- rosmax_1337 2y agoI think the unicode chess symbols are not quite in the spirit of terminal applications. It is also more intuitive to move the rook using algebraic notation, if the rook is denoted by r, rather than "♜". But certainly, viewing the board using unicode symbols is a very reasonable user setting, but I would err that it would not be default. And "e2 e4" contains technically superflous information, yes. The application should be able to parse the most minimal algebraic notation possible, but also more verbose commands.
- taeric 2y agoTotally fair. It also reminded me that emacs has a chess package. Because of course it does. :D
- pixelmania 2y agoFantastic work on Termichess!
- pwnOrbitals 2y agoOn that same note, is there also an app to play chess wrong in my terminal ?
- krishnasangeeth 2y agoAaah, I wish i could edit that title now.
- sa-code 2y agoSlightly relevant, here's a version of Wordle in the terminal built using go: https://github.com/sa-/wordle-tui https://github.com/sa-/wordle-tui
- keyle 2y agoNice. I did one over curl 2 years ago http://curdle.me/ http://curdle.me/
- kazinator 2y agoIn the FOSS world there is a protocol between chess-like board games and user interfaces, the primary examples of which are the XBoard GUI client, and the GNU Chess engine. If you write an XBoard-compatible terminal client, then it can just work with GNU chess and other back ends.