[HN Gopher] Show HN: King Thirteen: 2048 with chess pieces, in u...
       ___________________________________________________________________
        
       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
        
       Author : animuchan
       Score  : 234 points
       Date   : 2024-09-23 08:41 UTC (3 days ago)
        
 (HTM) web link (js13kgames.com)
 (TXT) w3m dump (js13kgames.com)
        
       | gus_massa wrote:
       | It 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 wrote:
         | Thanks 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 wrote:
           | I 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 wrote:
             | Yup Knight-only was possible, but clunky. Queens sure
             | provide a nice power spike towards the end.
        
       | mdaniel wrote:
       | This 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...
       | 
       | 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 wrote:
         | Thanks 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 wrote:
           | Thanks 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.
        
           | mdaniel wrote:
           | > 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-
           | ap...
        
             | animuchan wrote:
             | Thank you! :) And yeah I'll ask the orgs why does the bot
             | request these permissions, might be an oversight.
        
             | alcore wrote:
             | The 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.
        
               | mdaniel wrote:
               | I hear you, and it's possible you're right, but that's
               | not what the dialog said and the very link that you
               | mentioned has -- as its very first sentence -- "Once you
               | authorize a GitHub App, the app can act on your behalf."
               | and shows an example of commenting as me
               | 
               | So, I guess just to vote on a cool game I should
               | definitely roll the dice with my github account and trust
               | that some Internet comment is right, or, I guess upvote
               | and be sad for them that they tried to be kewl by
               | creating a GH app instead of oauth2 like a sane person.
               | Naming it "Kilobot" for sure inspires confidence for its
               | fewer than 1k installed users, too
        
               | alcore wrote:
               | Once again, curious that you bothered to remember
               | something that is relevant to community inside jokes and
               | take dumps on that, even bothered to remember a number,
               | but did not bother to read up on what you're dumping on.
               | 
               | FYI #1 It very much is a standard oAuth2 flow. Just GHs
               | 'always on' message is unfortunate, and that's all there
               | is to it. There's been topics like
               | https://github.com/orgs/community/discussions/37117 on
               | this ever since they had been introduced. Which, again,
               | you could've encountered if you put your energy into good
               | faith, instead of focusing that bad faith mojo on a small
               | community. If you really feel like proving how "sane" and
               | above "kewl" you are, go take your dump on GitHub - i.e.
               | the one actually responsible for those misleading
               | messages.
               | 
               | FYI #2 Your vote would not count anyway, because only
               | community member votes actually get included in scoring.
               | Although as an outsider you'd been welcome to leave
               | feedback.
        
               | mdaniel wrote:
               | I didn't have to "remember," they're on the tab right
               | next to this one. I'm sorry you're butthurt about someone
               | wanting to vote who isn't a part of the l33t insiders
               | club. Anyway, right under the game in question it says
               | "Voting for this edition's games is in progress - sign in
               | to vote on this game." so how would any sane person know
               | that it's only for insiders?
               | 
               | Sorry I raised your bloodpressure about something that
               | doesn't matter to you since I'm an outsider. I'll send
               | you virtual flowers using my totally safe GitHub App
        
               | alcore wrote:
               | GitHub has been a partner of the competition for years
               | now. They help actively promote it, participate in
               | providing feedback to contenders, integrate it with the
               | platform (https://github.com/topics/js13kgames). The
               | competition is organized by
               | https://stars.github.com/profiles/end3r.
               | 
               | But yeah, sure, you're free to tell yourself whatever you
               | want.
               | 
               | And no, it's not only for insiders - thus the message.
               | Outside votes get whitelisted when they meet the compos
               | fairness criteria. It's not a popularity contest. Your
               | vote would not count on this basis (amongst others).
        
         | teolandon wrote:
         | Every version of 2048 I've played spawns 2s and 4s. 4s are more
         | rare.
        
       | lenerdenator wrote:
       | This is gonna destroy sooooooooooo many engineering school GPAs.
        
       | kazcaptain wrote:
       | this was a lot of fun, great job
        
       | tantalor wrote:
       | How to play:       * Join forces       * Claim the throne       *
       | Revel in glory
       | 
       | No really... how to play?
        
         | QuercusMax wrote:
         | It's just like the game 2048, except with chess pieces. There's
         | a 'play' link at the top of the page.
        
           | jsnell wrote:
           | It'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.
        
             | tantalor wrote:
             | Indeed, that was the first thing I tried (using arrow keys)
             | and when nothing happened I said, "Oh so it's not like 2048
             | at all, okay... let me check the game instructions since
             | I'm lost now."
        
               | 1oooqooq wrote:
               | and then there's no instructions :clownemoji
        
         | dzdt wrote:
         | agree! 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 wrote:
           | The 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.
        
             | sahmeepee wrote:
             | Apparently he is worth 1024 so you can take him when you
             | have a 1024 piece, and win. I didn't realise this (or that
             | he takes pieces when cornered - I avoided that, assuming a
             | stalemate would mean losing) so played it right through to
             | a regular 2048 which took a verrry long while.
        
         | aftbit wrote:
         | Yeah I am very confused. This isn't like 2048 at all. The
         | pieces move individually? And why are there multiple different
         | colors of knights? What is the king doing? How do I mute the
         | game entirely?
         | 
         | Interesting take but needs some more polish and a good demo
         | video or something.
        
         | gweinberg wrote:
         | The "notes on the game design" page tells how it works.
         | https://mvasilkov.animuchan.net/king-thirteen
        
       | jsnell wrote:
       | Very 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 wrote:
       | Was not expecting Touhou music!
        
         | chambers wrote:
         | Kobito of the Shining Needle ~ Little Princess
         | (https://www.youtube.com/watch?v=jv1yYDzvFtQ) is one of my
         | favorite Touhou songs.
        
       | pimlottc wrote:
       | Looks very nice, but definitely needs some explanation, not
       | everyone is familiar with 2048. Not that the website even
       | mentions 2048 :P
        
       | zug_zug wrote:
       | This song is amazing, it's like midieaval FTL. The game's good
       | too.
        
         | thrtythreeforty wrote:
         | What song actually is it?
        
           | WCSTombs wrote:
           | It sounds like a chiptune remix of "Kobito of the Shining
           | Needle ~ Little Princess" from Touhou 14.
           | 
           | https://www.youtube.com/watch?v=jv1yYDzvFtQ
        
             | animuchan wrote:
             | Didn't even know this melody was reused for several
             | different tracks in Touhou! Thanks for posting this.
        
           | animuchan wrote:
           | It's a variant of Magical Power of the Mallet, composed by
           | ZUN of Touhou fame.
           | 
           | https://www.youtube.com/watch?v=VAdcF2IdyZY
        
       | theideaofcoffee wrote:
       | Loved 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 wrote:
       | This is great. Good job.
        
       | edent wrote:
       | Really 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 wrote:
       | This 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 wrote:
       | Incredibly fun, and makes sense now that I have read the
       | design/instructions.
        
       | pyrolistical wrote:
       | As a colorblind person I didn't know there was multiple colours
       | until very late
        
         | gweinberg wrote:
         | I don't think the colors mean anything. But I don't know.
        
         | pimlottc wrote:
         | OMG, I had no idea either!
        
         | askvictor wrote:
         | I'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 wrote:
       | Fun 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 wrote:
         | The "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 wrote:
       | Hey, 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 wrote:
       | Really 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 wrote:
       | mmm 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 wrote:
       | Without reading any instructions, I really liked this game...
       | until my top piece got removed. :)
        
       | abound wrote:
       | Super 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
        
         | timvdalen wrote:
         | The king is worth 1024, so as soon as you have a 1024 piece on
         | the board you can capture the king to make 2048 and win the
         | game
        
       | mattmar96 wrote:
       | Love the styling and the music, great job!!!
        
       | mrgoldenbrown wrote:
       | I didn't see any rules/explanation of how to play Is that
       | intentional or maybe I'm missing it on mobile?
        
         | kapep wrote:
         | I also don't see any on desktop, neither on the linked page nor
         | ingame.
        
       | listeria wrote:
       | I 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 wrote:
         | If the king is trapped he eats the highest-scoring neighboring
         | piece and takes its spot.
        
           | Syntonicles wrote:
           | It'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 wrote:
       | This is awesome
        
       | zac256 wrote:
       | Please 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/
        
         | animuchan wrote:
         | Thanks for sharing this! I had no idea, will add this to the
         | repo's README.
        
         | StableAlkyne wrote:
         | Numberwang is the true OG
        
       | Syntonicles wrote:
       | This 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 wrote:
       | This 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
        
       | GeertB wrote:
       | This 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 wrote:
       | Dang 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 wrote:
         | Took 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 wrote:
       | Scored 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 wrote:
       | That's a really great game, congratulations!
        
       | smokedetector1 wrote:
       | This is incredibly well-done and fun and just plain works!!!!
       | Congratulations!
        
       | gowld wrote:
       | I 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 wrote:
       | Great 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?
        
       ___________________________________________________________________
       (page generated 2024-09-26 23:02 UTC)