Desert Zoodoku Game

Desert Zoodoku

Desert Zoodoku on the ASDM Digital Library

The current phase of grant funding for the ASDM Digital Library is targeted toward the inclusion of educational content, including children’s pages, games, and multimedia. This is an adaptation of the Japanese game Sudoku, using a 4×4 grid with pictures, rather than a 9×9 grid with numbers. The same logic as Sudoku applies; each image can appear only once in each row, column, and corner square. This particular puzzle also gives clues for which animal belongs in each square.

The game is written in JavaScript and uses basic HTML and CSS for display. The initial game settings are stored in JSON and jQuery’s UI-library is used to enable drag-n-drop functionality. The game uses an onload event to detect when all of the images have loaded before offering a Play button. Once the images have loaded, the game can be taken offline and played indefinitely.

In the original 9×9 Sudoku, there are 981 possible states with 6,670,903,752,021,072,936,960 solvable games. It has been shown that when symmetries are taken into account, there are only 5,472,730,538 actual patterns for distribution of the numbers. Likewise with a 4×4 grid, where there are originally 416 possible states, there are 288 solvable games. When symmetries are taken into account, there are actually only 11 possible patterns. Thus moving from a 9×9 to a 4×4 grid simplified the process of programming the game immensely.

To reduce the amount of programming necessary, these 11 patterns are hard-coded into the program and the corresponding images are randomly selected. A complete game is constructed and one of 5 templates for which squares to reveal is selected. A multidimensional array for each square is constructed and contains both the correct answer as well as the solution chosen by the player. Comparing these two values tells us whether the answers are right or wrong.

Designing this game was fun, challenging, and educational for me. It was a great experience and one I hope to repeat in the future.

Play the game here: http://www.desertmuseumdigitallibrary.org/kids/Games/Zoodoku.html.

This entry posted in Web Applications. Entry Tags: , , , , Bookmark the permalink. 

Comments are closed.