27 ms·
Show HN: King Thirteen: 2048 with chess pieces, in under 13 KB
The game is vanilla JS, with SVG for graphics. Written for the js13kGames coding competition.
Notes on the game design: https://mvasilkov.animuchan.net/king-thirteen https://mvasilkov.animuchan.net/king-thirteen
- mdaniel 2y agoThis is just incredibly fun, congratulations! It reminds me of "Really Bad Chess" which I also love: https://play.google.com/store/apps/details?id=com.noodlecake.reallybadchess https://play.google.com/store/apps/details?id=com.noodlecake... Two things, one on-topic and the other off-topic: The thing which makes 2048 moderately easy to reason about is that incoming pieces are always "1". However, this game appears to spawn in random pieces, with random point values. I tried to follow the to-and-fro of the design blog in order to find out why this is, and I get the impression it's for avoiding getting the player stuck, but it does have the disadvantage of making planning incredibly hard. The good news is that by reading the blog I finally understood what was going on with the screen shake off-topic: that "Subscribe to me blog" modal is not only bad UX (imho, of course), but also doubles down on the UX tire-fire by resetting my reading position to the top of the page. It's almost enough to warrant a command-w right there. Just one datum, but it for sure made me sad
- animuchan 2y agoThanks a lot for the kind words! I was afraid people would abandon good runs if too long, so started spawning 4 and 8 sometimes to speed it up somewhat. (There's 180-odd entries participating in the compo, so even 10 minutes of play time per entry is a huge commitment for people looking to vote on most / all games.) Re: Subscribe popup: this is the sole reason I'm looking to migrate from Hashnode! All of their UX "improvements" are egregious, but this one surely takes the cake. I very much agree with your sentiment. When I joined, it was a nice technical writing-oriented site, but these days it has entirely succumbed to terrible product managers. E.g. their blog post editor's main function is seemingly to upsell their generative AI wrapper.
- cjpearson 2y agoThanks for sharing! I'm seconding the "incredibly fun" comment, but I would keep the occasional big numbers. It probably took me an hour to finish the game and I wouldn't want to slow it down further. The little extra bit of randomness/luck it adds is nice too. When it comes to the UI, I was a bit confused about how the gameover and piece removal works. I guess if there are no legal moves it removes a piece? Also, the multiple move mechanic where the last piece to move is automatically preselected sometimes tripped me up a few times and caused me to accidentally downgrade a piece.
- rob74 2y agoThe king will "kill" one of your pieces if he has no other legal moves, but only if you are not one move away from losing. I also noticed this very late, same as noticing that you only need one piece with value 1024 to win the game, because another one is already on the board ~
- mdaniel 2y ago> a huge commitment for people looking to vote on most / all games. I wanted to say that I went to vote for your game but they seem to only support GitHub login and their GH app does crazypants shit like "Act on your behalf" versus the much more sane "user:email"[1] or whatever which would prove that I'm a person without granting some rando website "sure, bro, take GitHub actions for me" So, my HN upvote will have to suffice for Internet Points of Appreciation 1: https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/scopes-for-oauth-apps#available-scopes https://docs.github.com/en/apps/oauth-apps/building-oauth-ap...
- animuchan 2y agoThank you! :) And yeah I'll ask the orgs why does the bot request these permissions, might be an oversight.
- alcore 2y agoThe site only requests read access to your email, as the login flow message _actually_ shows. The "act on your behalf" statement is GitHub's standard message for all GitHub apps, regardless of whether they actually ask to be granted any permissions that would let them perform such actions. There's a "learn more" link right at that statement, that would've explained pretty much exactly this. I find it curious that you bothered to venture into docs and link them, but did not bother to click _that_ one to understand what's actually going on. It says, i.a.: "The GitHub App can only do things that both you and the app have permission to do.". Since the site only asks for read access to your email address, it cannot actually do anything else. As simple as that.
- teolandon 2y agoEvery version of 2048 I've played spawns 2s and 4s. 4s are more rare.
- deleted 2y ago[deleted]
- lenerdenator 2y agoThis is gonna destroy sooooooooooo many engineering school GPAs.
- kazcaptain 2y agothis was a lot of fun, great job
- tantalor 2y agoHow to play: * Join forces * Claim the throne * Revel in glory No really... how to play?
- QuercusMax 2y agoIt's just like the game 2048, except with chess pieces. There's a 'play' link at the top of the page.
- jsnell 2y agoIt's not just like 2048 though, since you only move one piece at a time. In 2048 you move all the pieces in the same direction at the same time.
- dzdt 2y agoagree! how to play??? I found I can click and join knights by knight move with the same subscripts. but what is the king doing? there are no directions and its not obvious!
- ynoxinul 2y agoThe king has just taken my largest piece after no moves were left. I guess when you reach 2048, you can take the king and win.
- jsnell 2y agoVery nice work, congrats! The combo UI just doesn't work for me. I didn't understand what was happening until reading the blog post, the game just felt broken since it was inconsistent whether a piece maintained focus or not. And even after knowing about it, I was constantly making misplays due to clickin on a unit I wanted to move, and instead having the pre-selected unit capture the clicked unit. It might be worth trying out a model where the combo piece is highlighted graphically, but you still need to first click on that unit first if you want to move it.
- Straw 2y agoWas not expecting Touhou music!
- chambers 2y agoKobito of the Shining Needle ~ Little Princess (https://www.youtube.com/watch?v=jv1yYDzvFtQ https://www.youtube.com/watch?v=jv1yYDzvFtQ) is one of my favorite Touhou songs.
- pimlottc 2y agoLooks very nice, but definitely needs some explanation, not everyone is familiar with 2048. Not that the website even mentions 2048 :P
- zug_zug 2y agoThis song is amazing, it's like midieaval FTL. The game's good too.
- thrtythreeforty 2y agoWhat song actually is it?
- WCSTombs 2y agoIt sounds like a chiptune remix of "Kobito of the Shining Needle ~ Little Princess" from Touhou 14. https://www.youtube.com/watch?v=jv1yYDzvFtQ https://www.youtube.com/watch?v=jv1yYDzvFtQ
- animuchan 2y agoDidn't even know this melody was reused for several different tracks in Touhou! Thanks for posting this.
- animuchan 2y agoIt's a variant of Magical Power of the Mallet, composed by ZUN of Touhou fame. https://www.youtube.com/watch?v=VAdcF2IdyZY https://www.youtube.com/watch?v=VAdcF2IdyZY
- theideaofcoffee 2y agoLoved the little twist on the mechanics of 2048, instead of just mindlessly pushing down-left-down-left most of the time, you actually had to think about the proper moves of the pieces. Nice to add a second dimension onto the play, had my rusty wheels turning for a little bit before it bit me.
- nvr219 2y agoThis is great. Good job.
- edent 2y agoReally enjoyable. Only after my 1024 piece got captured did I see the undo button. Managed a score of 6,000 ish. What a nifty twist on a couple of old games.
- tln 2y agoThis is fantastic I hope you post again when you've made a standalone page and/or mobile versions, this game deserves lots of success :)
- donaldihunter 2y agoIncredibly fun, and makes sense now that I have read the design/instructions.
- pyrolistical 2y agoAs a colorblind person I didn’t know there was multiple colours until very late
- gweinberg 2y agoI don't think the colors mean anything. But I don't know.
- pimlottc 2y agoOMG, I had no idea either!
- askvictor 2y agoI'm not colourblind, but found the colours weren't useful at all (compared to 2048). They're just too similar and you need to rely on the numbers, which takes more thinking
- rkagerer 2y agoFun game! Won on my first try and it felt a satisfying playthrough. Still don't fully understand the rules. Eg. Are new pieces random? Since the king can eat clutter does that prevent you from losing?
- rkagerer 2y agoThe "game design" link above offers insight into the rules and nuances of the game. Eg: The King resorts to violence only when he is cornered and has nowhere else to go. It's below him to kill commoners otherwise. If there's no unobstructed path for the King, he will take the highest-value piece in his vicinity. However if you might lose due to the board being full, then the King won't help you by clearing the board; he'll just skip his turn. Also, free tip: The King's value is 1024 if you want to contemplate regicide.
- johannes1234321 2y agoHey, fun Game. Took me a few rounds to find the right strategy (which is spoiler ... The 2048 strategy to aline powers of two on the border, which for me often lead to a sequence of Queens) and then it's unfortunately leading to the 2048-problem that one plays relatively simple strategy with annoyance by random generator ... it is a bit better as one needs "powerful" figures on the sequence (while not having a queen once can be fixed by the next queen ...) and can be interesting to force the king into a corner and locking it there. Were quite a few fun rounds, but I think I am "through" especially as it stops on the 2048, just like the original 2048 did.
- NoboruWataya 2y agoReally fun game, well done. People are complaining about the rules not being clear enough but IMO figuring out the rules as I went along was (unexpectedly) part of the fun. I had no idea how to win (or if the game even could be won) until I realised that my queen was now the same colour as the king, and then the penny dropped.
- davidguetta 2y agommm honestly at some point i was wondering if it was actually possible to lose. i tried actively and it took me sooo long. Felt like the numbers were actually coming specifically to help you have moves
- neilv 2y agoWithout reading any instructions, I really liked this game... until my top piece got removed. :)
- abound 2y agoSuper cool game! I sunk well over an hour into it, but I rage quit when the king stole my 1024 piece...I didn't realize that was an option. In retrospect, I guess that's what the shaky screen meant. This was my game just before I stopped (the 1024 was next to the 256): https://ibb.co/gv0QR89 https://ibb.co/gv0QR89
- mattmar96 2y agoLove the styling and the music, great job!!!
- mrgoldenbrown 2y agoI didn't see any rules/explanation of how to play Is that intentional or maybe I'm missing it on mobile?
- kapep 2y agoI also don't see any on desktop, neither on the linked page nor ingame.
- nosioptar 2y ago> How to play: > Join forces > Claim the throne > Revel in glory It's on the page before you start the game. I also cannot find any instructions once the game is started. It might as well not have any instructions because it really doesn't tell you anything about the rules or win conditions.
- listeria 2y agoI thought I'd lose if the king was trapped—like some sort of stalemate—so I played through the game with that in mind. It might make for a fun variant. I should add I didn't expect to find the rules in the Post-mortem, so I gave up on that after skimming through the page and jumped right into the game.
- qq66 2y agoIf the king is trapped he eats the highest-scoring neighboring piece and takes its spot.
- Syntonicles 2y agoIt's worth noting if the board is full this doesn't happen. This was helpful in my strategy because I could set up several pathways like I was playing checkers without fear of losing anything.
- noitpmeder 2y agoThis is awesome
- zac256 2y agoPlease consider crediting Threes, not 2048 as the "ancestor". The designers of threes have a well-written blog post on how they feel 2048 ripped them off. It's a good discussion on iteration in game design, among other topics. https://asherv.com/threes/threemails/ https://asherv.com/threes/threemails/
- animuchan 2y agoThanks for sharing this! I had no idea, will add this to the repo's README.
- StableAlkyne 2y agoNumberwang is the true OG
- Syntonicles 2y agoThis game was way too good. I stuck with it until I beat it and loved everything - the music, the idea, and the moves felt so satisfying - especially the final one. The first time I played I thought king would take my pieces with some probability if they weren't guarded. I spent way, way more effort than was necessary playing with higher stakes.
- usr1106 2y agoThis is how sustainable software development should work. Not a 100 MB iPhone app or a 60 MB Android app. Or 600 MB as in https://news.ycombinator.com/item?id=41459629 https://news.ycombinator.com/item?id=41459629
- GeertB 2y agoThis game is so fun! I spent entirely too much time playing it just once last night, and got to the 1024 piece in the first run. I don't know how long it took me, but it was long. With 2048 my runs are far quicker.
- conartist6 2y agoDang that king is bloodthirsty. I played for a while and it ate all the best blocks I ever made (a 512). Can my high score be the best I was doing before I lost it all?
- anentropic 2y agoTook me a while to realise, but I think the king only eats blocks when it is completely cornered and has no other space to move ... ?
- ebfe1 2y agoScored 9876 and won it on first run but i did use the undo button! :) I stumbled the first half a bit but got the hang of it in the end and after finishing it I think i had more fun than original 2048. This is because this game requires you to carefully place the pieces each time while in original 2048, you could get to 1024 with just a lot of repeated movement (down+left for me) to group all biggest numbers to a corner
- sacado2 2y agoThat's a really great game, congratulations!
- smokedetector1 2y agoThis is incredibly well-done and fun and just plain works!!!! Congratulations!
- gowld 2y agoI don't understand the rules for when a piece is allowed to capture another piece. EDIT: Oh, a piece can merge with any piece that has the same numerical value. This makes the game far more playable.
- sahmeepee 2y agoGreat idea for a game and very playable. As others have said, it is much more interesting than 2048 due to the reduced repetition. It still seems beneficial to stack high value pieces out of the way (e.g. your biggest in the corner and then next biggest on an adjacent edge square). Towards the end it was getting quite frustrating having rooks appear in corners, but a good kind of frustrating! Could the score be visible during the game to give a sense of the scoring rules? I didn't know the king eats pieces until I read the comments here... I would expect that to lose you points, but hard to tell unless the scoring is maybe documented somewhere I missed?
- carlsverre 2y agoI had so much fun finishing this. Much more interesting than other 2048 variants I've tried. I got a score of 9341.
- rob74 2y agoReally nice little game! I instantly got addicted to it, but managed to "beat" it already on the second of two very long tries, so maybe a tad bit too easy? Some observations: - I noticed very late that the king will actually "kill" (or capture in chess terms) my pieces if "cornered". While this is a nice feature, even if it doesn't happen when the player is just one step away from losing, it still prolongs the game even more. - I also noticed very late that I can win the game by capturing the king with a 1024 piece (in my case it was a queen). I only found out because I got into the habit of selecting all pieces in turn to check what moves were possible. I hope I'm not spoilering right now :) - Would be nice if you could capture a screenshot of the final board without the "you win" overlay. I don't have a Twitter account and no, I'm not going to create one just for this game ;) - Also would be nice if the score (maybe also the current highscore, like in 2048) would be shown somewhere during the game, not just at the end. - One nice feature is that the game remembers the current state if you leave the browser tab open, so you can shut down your PC and return to it the next morning - badly needed also, because the games are really long...
- jshdhehe 2y agoYou could code this on to an old 8 bit microcomputer ("micro" as in "not mainframe"!). I would have loved playing this in 1988!
- deleted 2y ago[deleted]
- gus_massa 2y agoIt would be nice to disable sound completely. When the board is almost full, it's difficult to know which pieces can move. Perhaps add some green shade to the ones that can move.
- animuchan 2y agoThanks for playing! :) Both are on the list of improvements for the final version — couldn't get the fixes in time for the compo deadline.
- gus_massa 2y agoI won my second game :) Then I read the instructions :) (I think it's worth reading the instructions / design discussion, even for someone that is not going to play the game.) [spoiler alert?] I didn't realize the "combo" mechanics, but I intuitively made many combos because I usually used the bigger piece to capture the smaller piece. So, for e it's a success in the design. Is it possible to win only with knight? My strategy was to keep alive as many queens as possible.
- animuchan 2y agoYup Knight-only was possible, but clunky. Queens sure provide a nice power spike towards the end.