This is my first PICO-8 cart! Enjoy!
It is a simple implementation of the classic board game Peg solitaire. I made this as an exercise to familiarize myself with PICO-8.
Rules
You can jump a peg over an adjacent peg into a hole, removing the jumped peg.
Your goal is to empty the board, except for a single peg in the marked hole.
Move count
Consecutive jumps with the same peg are counted as a single move.
Try to solve the puzzles in the least number of moves!
Keys
Arrows: Move your cursor
Arrows while holding X: Move a peg
Z: Undo last move
Tip: To make consecutive jumps with the same peg, just hold X and press the arrows you need.
Credits
Many board designs, especially those based on hexagonal grids, were inspired by this very nice website by George Bell:
http://www.gibell.net/pegsolitaire/index.html
Changelog
v1.1:
- Added support for boards based on hexagonal grids
- Added the triangular board
v1.2:
- Fixed: a board was not solvable
- Added boards based on hexagonal grids
- Minor graphical improvements
v1.3:
- Added the possibility of editing the starting configuration of the pegs
- Minor fixes
Hi! I just tried this, but for some reason X+arrow doesn't move a peg for me. The highlight changes to blue when I press and hold X, so it does seem to know I'm hitting the right key, but the peg doesn't move.
@megashub: Hi! Thank you for your feedback! To move a peg, you need to hold X while you press an arrow key. I modified the "Keys" section in the hope to make it clearer.
If the move you are trying is not legal, nothing will happen.
Understood. That's what I'm doing (holding X while pressing an arrow key). The move is legal, just moving a peg to an orthogonally adjacent open hole (the first move).
neeevermind. I'm an idiot. I always need to jump pegs. Works fine.
You've got a lot of choices but I didn't see the Cracker Barrel triangle puzzle, @hathi. That's the one I really wanted to see and play. Can you add it ?
@dw817: I added the triangular board. Since in this variant the grid is not orthogonal, I'm afraid the commands may be a little tricky. Please let me know what you think about it.
@hathi, how marvelous ! I see you have. It's not orthogonal but still has the same feel - at least to me. Well done. Gold star effort. You first gold star in fact.
Here is a variant where the opening is in the center, just like the original Cracker Barrel puzzle plays.
@dw817: I'm happy to know that you liked it. And thank you for the golden star!
I plan to submit a (last?) version of the cart with some more triangle-based boards. I have already done the work of adding support for this variety, so...
I think I will include the Cracker Barrel version with the opening in the center.
Very nice, @hathi ! I see you added the Cracker Barrel Puzzle proper as well as a bunch of interesting others. ❤️ Favorited !
Here is some more information that may assist you:
https://en.wikipedia.org/wiki/Peg_solitaire
https://www.youtube.com/watch?v=965h3pp9_kQ
I might suggest something else, @hathi. For the puzzle where the movements are diagonal. While you can indeed hold down two arrow keys to get that movement, you might allow the cursor to move diagonally up and down just by pressing the UP and down arrow keys.
Where when you press that single arrow it will locate the nearest peg or hole even if diagonal, and select it.
Thank you for the feedback, @dw817. I made a test cart inspired by your suggestion. Here it is:
However, I'm not sure the new controls are really practical to use. For example, consider this situation:
Here, moving the central peg e.g. to the lower right with a jump could be tricky, because it requires very precise timing in pressing two keys at the same time. Without correct timing, the peg could jump to the right or to the lower left instead.
In the cart you can find a board with the situation depicted here, so you can try it yourself.
Let me know what you think about it.
Hi @hathi:
In the example above, you could press UP and the cursor would move both up and right. If you press DOWN the cursor would move both down and left.
If you press either LEFT or RIGHT, the cursor moves respectively a full LEFT or RIGHT peg position.
...
Oh wait, I see what you are saying. OK do this. If it is possible for the peg to jump either up and left or up and right, highlight both. Then in pressing LEFT or RIGHT from here will determine that extra movement of LEFT or RIGHT when jumping UP.
[Please log in to post a comment]