Zillions of Games
|
|
A little
while ago I was looking for an abstract games
generator. A comment I received to my post, pointed me at
gtkboard, which in turn referenced
Zillions of Games.
I downloaded the
demo version
of Zillions of Games a few weeks ago, and started playing
with it. It wasn't long before I realized I wanted this. Badly. I also
thought that Duncan would get some fun out of some of these games to,
so I ordered
the CD version for |
Last night, the folks at Zillions Development sent me the key to unlock the demo version while I wait for the CD to arrive.
So what's it all about? Why am I so excited? To quote the Zillions web page:
Zillions of Games -- an exciting game package for Windows that uses an absolutely unique "universal gaming engine" technology, allowing you to play nearly any abstract board game or puzzle in the world.
The demo version comes with about 40 games and puzzles. When you unlock it to get the full version, you have about 350 board games, puzzles, and variants. What's even more interesting is that there have a user community that have created over a thousand more games.
There is a scripting language that you use to create the games. These are saved as Zillions Rule Files (ZRF). You use your favorite text editor to write the scripts. There is also a plugin architecture for those games where you need to drop in a more powerful game engine (in the form of a Windows DLL).
Last night I decided to write my first "game". Actually it's a variant of the old sliding puzzle that I'm sure you're all familar with. I got out the digital camera, asked Duncan and Dusti to pose in front of the Christmas tree, then took a photo.
Then I used an image program to tidy up the image. I got rid of the worst of the red-eye on Duncan (there didn't seem to be an option to get rid of the blue-eye on Dusti). I made the image 600x600 so it would be easy to divide into nine equal parts.
That was the next problem to solve. Dividing the JPEG of Duncan and Dusti into nine smaller JPEG's. Thanks to Paul Greidanus, Tim Bray and Rich Berlin for help with this. I used the convert program from Imagemagick to crop out each of the nine sections, then Irfanview to convert them into BMP format.
Then I took the 15_Puzzle ZRF file, copied it to a new rule file called Duncan_Slide.zrf and stripped out all the variants and alternate board sets and reduced it's simplest form for solving the 8_Puzzle (i.e. 3x3 grid instead of a 4x4 grid).
Then I had to adjust it to:
- use 8 of the nine BMP files for Duncan and Dusti rather than the numeric digits 1-8.
- use images that were 200x200 rather than 50 by 50.
- have the empty square end up in the top left corner, which was where the uninteresting part of the original image was.
- put the various images files in the right place
It really was straight forward. Zillions of Games comes with a good online help reference manual. There are several places linked off their web pages for getting supplemental information (such as this ZRF Guide). They also host a discussion board where I could have gone if I'd got stuck. The only problem I really had was my initial scrambled layout for the picture produced an unsolvable version. I quickly toggled the initial position of two pieces and the game was then solvable.
There are still a few small cleanups I need to do, such as give it full game description, history and strategy. Plus write the solution file for those who'd like to see the perfect answer.
Here is what the script looks like. Very readable.
; *** Duncan Slide - Copyright 2004 Rich Burridge
; *** Based on 15 Puzzle - Copyright 1998-2002 Zillions Development
; v.2.0
; You need to purchase Zillions of Games to load this rules file
; Visit the Zillions web site at http://www.zillions-of-games.com
(version "2.0")
(define step ($1 (verify empty?) add))
(define def-tile
(name $1)
(help "Slide this tile to any free adjacent space")
(moves (step n) (step e) (step s) (step w))
)
(game
(title "Duncan Puzzle")
(solution "Solutions\Duncan_Slide\8_Puzzle.zsg")
(description "This is where to put the game description")
(history "This is where to put the game history")
(strategy "This is where to put the game strategy")
(option "prevent flipping" true)
(move-sound "Audio\\Click3.wav")
(release-sound "Audio\\Click3.wav")
(players Self)
(turn-order Self)
(board
(image "images\Duncan_slide\9puzzle.bmp")
(grid
(start-rectangle 3 3 201 201); top-left position
(dimensions ;3x3
("a/b/c" (200 0)) ; columns
("3/2/1" (0 200)) ; rows
)
(directions (n 0 -1) (e 1 0) (s 0 1) (w -1 0))
)
)
(piece (image Self "images\Duncan_Slide\2.bmp") (def-tile p2))
(piece (image Self "images\Duncan_Slide\3.bmp") (def-tile p3))
(piece (image Self "images\Duncan_Slide\4.bmp") (def-tile p4))
(piece (image Self "images\Duncan_Slide\5.bmp") (def-tile p5))
(piece (image Self "images\Duncan_Slide\6.bmp") (def-tile p6))
(piece (image Self "images\Duncan_Slide\7.bmp") (def-tile p7))
(piece (image Self "images\Duncan_Slide\8.bmp") (def-tile p8))
(piece (image Self "images\Duncan_Slide\9.bmp") (def-tile p9))
(board-setup
(Self (p4 a1) (p8 a2) (p7 b1) (p3 b2) (p5 b3) (p9 a3) (p2 c2) (p6 c3))
)
(win-condition
(Self)
(and
(absolute-config p2 (b3))
(absolute-config p3 (c3))
(absolute-config p4 (a2))
(absolute-config p5 (b2))
(absolute-config p6 (c2))
(absolute-config p7 (a1))
(absolute-config p8 (b1))
(absolute-config p9 (c1))
)
)
)
I'm now going to start to try to understand the Reversi (Othello) script so I can see how easy it would be to substitute the game logic of our Reve program.
( Dec 21 2004, 09:41:17 AM PST ) [Listen] Permalink
Comments are closed for this entry.











