Login
Binary Sudoku
Title:Binary Sudoku
Category:Game/Logic
Release Date:
Language:English
Size:16K
Machine:PAL & NTSC
Code Type:Machine code
Distribution:Freeware
Game ending type:(n/a)
 Play Online!
Released by:Legion Of Doom (LOD)
Code by:Csabo
Notes:Solve logic puzzles. A 64K program that also runs on 16K.
  Download:
Download from Plus/4 World
Plus/4 World
Download from Othersi.de
Othersi.de
  Source code:
Download from Plus/4 World
Plus/4 World
  External links:
    YouTube Video

User Rating: 8.0/10 (2 votes)
User comments: Read comments
Binary Sudoku Title Screenshot

Binary Sudoku Screenshot


HVTC
VolBass 5x


Sounds/Music
LinkFilesizeDescription
[ Download ]
4.4 MBA remix of the original. (by Csabo)


Instructions
Rules:

1. Three of the same color tiles next to each other are not allowed.
2. Each row and column contains and equal number of colors.
3. Each row and column must be unique.

Controls:

Cursor Move
1, 2 Place tiles
Space Clear tile
C Toggle colors
G Toggle graphics (custom, PETSCII)
M Toggle music on/off
Q Quit to menu
S Show solution
? Show hint

Or either joystick port.


Author's Comments
Why this game?

Whenever I need to take a short break, I love playing puzzle games on my tablet. The ones I end up loving, I program them for the Plus/4, that's how we ended up with 2048, FloodIt, Candy Dots, etc. I'm always on the lookout for new games, that's how I came across one called "0h h1!". The game turned out to be known by many other names. I liked it, and I figured... "I can code this in one weekend" :-)

Boy, was I wrong! Sure, the basics of the gameplay (display a board with tiles, move a cursor, place tiles) are indeed very simple. Puzzle generation however is a different question. I've looked around for existing algorithms, but the ones I found were either recursive or used very advanced math, none of them were suitable for implementation on a small 8-bit computer.

There are two parts to this problem:
1) coming up with a unique, completely filled board that meets all the criteria
2) removing pieces from the board so that it remains solvable.

With a lot of trial and error, I came up with a quick, heuristic algorithm for the first problem. The second was much harder though. Removing pieces at random, and seeing if the board is still solvable took too long. Eventually, I wrote the "opposite" functions for each possible solve step (e.g. if there is a yellow tile next to two blue ones, the yellow one can be removed). This worked, but the initial implementations were way too slow: generating a new 12x12 puzzle took over 30 seconds! With a lot of optimizations, I managed to speed it up to an acceptable level: the small ones are instantaneous, and the largest puzzles (12x12) are now generated in about 6-7 seconds, which I think is acceptable.

About the music

The game features a one-of-a-kind tune called "VolBass 5x". As the name suggests, this is a "5x" music player, i.e. the music is called 5 times per frame. Why 5? Well, the "original" VolBass was a 4x player, which allows 50, 66.6, and 100 Hz sounds. (Think of dividing 200 by 2, 3 and 4.) The 50 and 100 Hz sounds are exactly one octave apart, but the 66.6 Hz sound is out of tune. With a 5x player, we can have 50, 62.5, 83.3, and 125 Hz sounds. (Think of dividing 250 by 2, 3, 4 and 5.) It just so happens that the 62.5 and 83.3 Hz sounds are 5 semitones apart, equivalent of C and E, which is very useful for a baseline. The music uses a custom frequency table, tuned to 444.9 Hz instead of the standard 440 Hz.

NTSC compatibility is a problem though. A 5x player on NTSC systems would produce tones that have a very different ratio. Because of this, the music is done with timer interrupts, instead of raster interrupts. This ensures that both systems sound exactly the same (though there is a custom frequency table for NTSC).

The other interesting feature of this tune is the use of overtones. Since we can change the TED registers so often, by changing the frequency on every call, we produce a tone that matches the base E tone, but with interesting overtones. Some of the overtones actually sound like two audible tones!

I hope you enjoy the music and solving the puzzles!

Thanks to Luca, siz, Chronos, Unreal, and Rachy for testing!

Copyright © Plus/4 World Team, 2001-2025. Support Plus/4 World on Patreon