Show HN: I made a little puzzle game about a rogue chess knight
58 comments
·March 29, 2025gjm11
freetonik
Thanks a lot! I've used your latter suggestion and added a "full rules" section. And will work on better notifications later.
em-bee
a few more ideas:
* jumping onto a field under attack sends the knight to a random new location instead of deducting points
* configurable board size with the number of black pieces adjusted. the classic 8x8 board with 16 black pieces could be one preconfigured choice
* multiple white knights.
* a random black piece moves after each jump of the white knight
dylan604
Way back when Flash was a thing, one of the teachers at my kiddo's school started a chess club. They never played a full game of chess, but other games that taught the kids how to move the pieces and not burden them with the strategy of a full game. I decided to try to turn a few of those into Flash based games. It was fun making each of the pieces with the rules limiting their movement which became a game on its own just to show where pieces could go or not. Then adding more pieces to start playing the games. I never worked it up to the point of having player vs computer though. Glad to see other people also thinking chess based games could be made without needing a vs computer as well.
I think this game would be perfect for a young kids chess club. Nice job!
parsimo2010
This was fun. I played for a few minutes and like how there seem to be multiple ways to play the game-
1. just get through the level and not worry about losing points
2. get through the level without losing any points but not worrying about clearing all the pieces
3. absolute perfection where you clear all the pieces without losing any points
This flexibility makes it good for serious players but also kids/casual players. Great job!
em-bee
there is more. the number of moves left at the end is a multiplier for your points, so try to get through the level with a minimum number of moves while maximizing points by capturing high value pieces and also find streaks where you capture multiple pieces in a row.
i love looking at a board and try to figure out the best order of moves to get the most points.
not that i am very good at it, but it's fun and addictive.
michaelmior
Unfortunately sometimes it's impossible not to lose any points because all of the initial squares you can move to are under attack.
parsimo2010
You're right, I guess I should reword it to "not lose any unnecessary points." I remember a level like that with a queen in just the right spot that any legal move was attacked, but moving left/right changed your options for later moves.
nomilk
I just played for a few minutes and loved it. Chess variants can sometimes take too long to understand the rules so this was great (excellent ux). I think I'd have liked it a bit more if you get captured (lose and restart) when you move on a square that's being attacked (rather than losing a point).
I also enjoyed how it got a bit harder as the levels went on. And also how a stray pawn/piece might act as a hint (i.e. to capture on that square) - a bit like how side scrolling and adventure games might leave a trail of rings/bananas/collectables to guide the player along a desired path where it otherwise may not be obvious.
Lerc
Playing on my phone. Got to just under 12,000 before I got a txt and when I went back to the game it had restarted.
Two things that would be nice. Show the optimal score possible for any level, with a single puzzle mode (maybe puzzle of the day) to replay to try and achieve the best score on a single level.
A more significant penalty for moving into unsafe squares. Perhaps losing moves rather than points. An increasing penalty for second and third hit might mitigate the just blunder your way through approach.
I felt like I was in no danger of losing, but if it had a strongger penalty for being hit I think I would hit a limit in a reasonable amount of time.
freetonik
>I went back to the game it had restarted
Oh no! Your browser probably decided to clean up the RAM or something. I'm not sure if there's a way for the page to "ask" the platform not to clean it, perhaps I could simulate user input. Will research this later.
Puzzle of the day and increasing penalty are great suggestion, thanks!
Lerc
Storing the state between levels (just score and level number?) in local storage would do the trick. Erase the state at game over. If the page launches with a state in local storage you know a game didn't finish and can resume from the start of the most recent level
freetonik
Ah. I was thinking how to actually save all previous levels, but that is not needed, just the level number is needed, you're right.
Eric_WVGG
You’re standing in notable footsteps, one of Alexei Pajitnov’s follow-ups to Tetris was a similar game. https://en.wikipedia.org/wiki/Knight_Move
freetonik
Whoa, didn't know this. Gonna try to find a copy of that game.
CaesarA
This game is great. I played it for quite a few minutes. It reminds a lot of one the games that the inventor of Tetris designed for the Famicom. I can't remember the name of it at the moment.
freetonik
Thank you! Someone else in the comments also found it similar, and linked to the game you're remembering: https://en.wikipedia.org/wiki/Knight_Move
CaesarA
That's the one I was thinking of, thanks.
freetonik
Wrote a blog post about making the game: https://rakhim.exotext.com/knight-ride-a-game-about-rogue-ch...
yubiox
4872 first game. I got all the pieces on every level except the first because I didn't realize you could. Pretty fun and I don't even play chess. Are the levels designed by hand or generated?
vikingerik
They must be generated. Hand designed levels probably wouldn't have things like pawns on the first rank, or four opposing rooks, or situations where the first move unavoidably loses points.
HenryBemis
I had a similar thought, randomly generated in 'strength'/points and positions. Pawns on first row are impossible, and last row turn to Queens (or whatever).
There must be a 'relative position' though in the mix of the algorithm, because on some levels the pieces are scattered in the four corners and some others they are on 'perfect-knight-stepping-sequence' so I could take 5-6 pieces in 5-6 moves and then exit.
freetonik
Levels are generated randomly. The number of black pieces grows until level 10, then randomly fluctuates.
russian_bot
4872 is really good, u should play chess
ffsm8
I kept getting confused why I'm not getting any points. You really should give the other units the other color (black), o thought they were there too effectively block the spaces, not to be able to capture them for points.
tobyhinloopen
I have no clue what I'm supposed to do, am I stupid?
cognomano
Only white moves. Eat black. Go to green dot.
pithanyChan
welcome to life. stay calm & use only as much energy for work as necesary, use what's left for fun.
whenever given, read instructions carefully.
capture as many capturables as possible. get to the light at the end last.
PS: it's a knight and can only move like that one hockey club shaped Tetris block
tobyhinloopen
Thank you for your valuable life advice! I figured it out
snarf21
Is there a help screen with the rules or am I missing how to trigger it?
wonderwonder
Just click on the square where you want the knight to move. Has to be a legal move from the current position. Took me a bit as well
This could use a bit more explanation. For instance:
How many points and how many bonus moves do you get for a capture? Does it depend on what you capture? (It looks like it's one bonus move whatever you capture, but more points for more valuable pieces; 1 for a pawn, 3 for a bishop, so I'll guess it's 5 for a rook and 9 for a queen.)
Does "Beware of attackers!" mean (1) you aren't allowed to move the knight to a square that's attached, (2) you will get some points deducted when you do, or (3) nothing, it's just flavour-text? (It looks like it's #2, a loss of one point each time you move to a square that's attacked.)
The instructions don't mention the "clean board" bonus; I think they should.
I'd write it something like this:
Complete each level by reaching the target within the given number of moves.
Each piece you capture gives you one more move, and points according to the value of the piece.
You lose one point any time you move to a square that's attacked.
Your score for the level is the number of moves you had spare at the end, times the number of points you earned. Double if you captured all the pieces!
(... Except that it looks as if there's some further "streak" mechanic, which I haven't tried to figure out the details of.)
If that's too long, put it behind a clicky-button, and just say "Get your knight to the target square. Earn points for getting there quickly without being attacked, and capturing pieces on the way." plus a button labelled something like "Full rules".
Maybe make the notification when you capture a piece say something like "+3 points / +1 move"?
If the levels get fairly crowded then it might be expensive to get the computer to find the best possible score, but it shouldn't be hard to make it find a pretty good score. You could present that, either at the start or after the user finishes the level, as a target, and congratulate them when they meet or even beat it.