Hashi - Japanese bridge-building number puzzle Hashiwokakero with 144 puzzles

Hashi - Japanese number puzzle Hashiwokakero

hashi.v1.2.hex (78.7 KB)

hashi.v1.2

Game description

Hashiwokakero is a Japanese number puzzle which can be played on paper. Given a set of islands on a 2D grid, each island having a number between 1 and 8, the goal is to build bridges connecting all islands. There are a number of restrictions on how these bridges can be build:

  • Bridges can only be drawn horizontally or vertically;
  • Bridges are not allowed to cross each other;
  • One can draw one or two bridges along each direction (single or double bridge);
  • The total number of bridges leaving an island need to match the number assigned to that island.

Arduboy-specific Hashiwokakero

The game includes 144 puzzles created by Vegard Hanssen:
there are puzzles for three sizes (8-by-8, 12-by-8, and 16-by-8), and for each
size there are four different difficulty levels (“easy”, “medium”, “hard”, and
“expert”), each having 12 puzzles.

The puzzles have been created by Vegard Hanssen. There are more Hashi puzzles created by him here: Hashiwokakero puzzles, including very difficult large-sized puzzles.

Changes

Changes in version 1.2, released 21st July 2022

  • Display unoccluded solution: after solving a puzzle, once the “Solved!” text is displayed, the user can press any directional button (left/right/up/down) to hide the “Solved!” text and thus view the solution without occlusion.
  • Improved navigation in instructions: the four text panels can be navigated using LEFT/RIGHT buttons. The A-button behaves as RIGHT as well. Using the B-button navigates back to the main menu as does moving RIGHT from the last instruction panel.
  • Fixed misuse of the Japanese word “hashi” in the instructions: “hashi” only means bridge, now we use the full “hashiwokakero” in the text, which means “to build bridges”.
  • Remove unused functions from Arduboy2: to save ~700 bytes of ROM the setup now does not use all Arduboy2 initialization methods such as those for sound and the Arduboy logo.
  • Bring back the controls from v1.0: both the island-centric controls and the bridge-centric controls work now, allowing easy addition/removal of bridges where ever the cursor is.

Changes in version 1.1, released 19th July 2022

  • Different controls: adding and removing bridges is now island-centric, that is, moving the cursor on top of an island and holding down the A-button displays possible bridge additions; while holding the A-button one can use the direction button to add bridges in the respective direction. Likewise holding the B-button removes bridges.
  • Menu navigation: the A-button selects menu items and the B-button moves Backwards to the previous menu.
  • Exiting a puzzle: holding the A-button and B-button simultaneously will terminate a puzzle and navigate back to the start menu.

Code

Released under MIT license at this gitlab.com/nowozin/hashiarduboy/.

6 Likes

Another wonderful puzzle game! :smiley: Having in-game help is wonderful and the puzzle interface was really straightforward to figure out.

After playing around a bit, one wish that I have is that one of the A/B buttons could be used as a “back” button, both in the menus (e.g., accidentally selected wrong difficulty) and in-game, to prompt whether to abandon the puzzle and return to the menu.

EDIT: I now see that during gameplay, the A/B buttons differ in whether to prioritize horizontal or vertical bridges, which is required functionality in certain situations. Adding interface for abandoning a puzzle would probably be more involved. Maybe press and hold a button or press both A/B together? Not sure…

Great point about missing “Back” functionality, both when selecting difficulties as well as during a game. Let me think about it and add this feature for version 1.1.

The other main functionality that is missing is to store which puzzles the player has already solved so far and indicate this during level selection (and perhaps display the reference solution in case the player has already solved it).

1 Like

I just played one level and really liked it. Great job!

As for the bridge placement controls, I think I’d like a scheme where you hit the A button while over a number and press in a direction to increment the bridge count in that direction. I found selecting the space to be confusing, especially when I didn’t remember which button did which direction, and I found myself often destroying parts I’d already worked on.

1 Like

I like this, it’s similar to Simon Tatham’s approach. Perhaps a slight change: while holding down the A button over a number, press in a direction to increment bridge count in that direction. That reduces the amount of input movement needed to construct multiple bridges from the same number, a situation that seems to happen a lot.

2 Likes

Yeah, I didn’t make the “hold A” explicit in my description, but that was definitely what I was thinking.

1 Like

I just uploaded version 1.1 which adopts the “holding A” and “holding B” button controls on top of islands to add/remove bridges. I.e. holding A and then tapping one of Up, Right, Down or Left will add a bridge in the respective direction, if possible.

3 Likes

Another great looking game… that makes me feel mentally inadequate! :sweat_smile:
Is there room for a series of very basic training levels?

2 Likes

This new version controls quite well. I like the way you use flashing to indicate possible bridges.

1 Like

Would you like me to add this version to the cart?

Yes, please put in on the cart, I think version 1.1 is final.

1 Like

I created it in both the FX and XL carts.

1 Like

Minor nitpicks:

  • You can’t go back in the instructions, so if you accidentally skip ahead too far you have to go all the way to the end to exit and then re-enter. It would be better if left was ‘back a page’, right was ‘next page’ and B was ‘exit’.
  • The instructions say ‘hashi’ means ‘building bridges’, but on its own it only means ‘bridge’ (橋). It’s the full form ‘hashi wo kakero’ (橋をかけろ) which means ‘(to) build bridge(s)’.
  • It would be nice if the ‘solved’ box didn’t cover the board after solving, to make it easier to share solutions.
    • (I was thinking about screenshotting some solutions to see if it would help @acedent get the hang of things.)

Otherwise, it’s nice to see a brand new puzzle game.
(At least, I’m fairly sure nobody has done this before on the Arduboy.)

(Incidentally, are you that Sebastian Nowozin?)


Tips:

  • Persistance pays off.
  • Don’t be afraid to backtrack.
  • Look for the islands that have the fewest options and tackle them first.
  • Related to the above, focus on the lower numbers first, because you tend to have less freedom with what you do with those.
    • (I.e. sometimes lower number values have to connect to certain other islands to make sense.)
  • Higher numbers provide you with more freedom to pick and choose where you place bridges.
  • A 1 will never link to another 1 because that would create a closed loop.

I will admit though, I think it’s a bit mean that even the easy puzzles involve needing to make double-bridges.

Thanks for the suggestions, I implemented all your three fixes in version 1.2. The “Solved!” text can now be hidden if any directional cursor key is pressed.

Also, in addition to the island-centric controls I brought back the traditional bridge-centric controls as I personally prefer them. They do work nicely with each other and often one is more convenient to use than the other, for example when one wants to remove a particular bridge the bridge-centric controls work better in my opinion.

Regarding the homepage, yes that is my homepage. Arduboy is just a spare time activity though to remember some 8bit programming from my childhood :slight_smile:

3 Likes

I will upgrade the cart … unless version 1.3 is on the horizon? :stuck_out_tongue_closed_eyes:

@filmote, version 1.2 is final unless bugs are discovered, please upgrade the cart to version 1.2, thanks!

1 Like