Tuesday, November 24, 2009

Filemaker MineSweeper clone


Though about creating a board game in FileMaker to demonstrate the capabilities of FileMaker Pro.
Started it, finished in about 2 hours.


So here it is, actually it's pretty straight forward and fully unlocked so you can check it.

The main fields of the database are the Display, and the Game Repeating field.
The Display shows the board, while the Game contains the yet unrevealed fields, mines.

The Init method initializes the board, sets the random mines, counts the neighbor cells (how many one mine has), etc.
The ClickHandler method takes care of the clicks, by using hidden clickable layout elements behind the repeating fields.
(Actually these clickable elements weren't created by me one by one, setting up different script paramters 300 times, instead I created a script to generate the appropriate XML for me, and then pasted it on the layout using
Clip Manager 3 by MyFmButler. (Maybe I will show this technique in a separate article later if you're interested).

The rest of the methods are a bit harder to understand, but if you check them I'm pretty sure you will see how they're working.

This is a FM8+ demo, which you can download from here . (right click- save as)

Note1: I did't spend too much time on optimizing this. I'm pretty sure scripts could be more optimized, etc. This is just a demo file, to see how much you can do with Filemaker

Note2: Please also visit our site, http://crm.fm which has our main FileMaker product, and support us by buying it. Thanks!

The material on this document is offered as is. There is no representation or warranty, expressed or implied, nor does any other contributor to this post. Consequential and incidental damages are expressly excluded. FileMaker Pro is the registered trademark of FileMaker Inc.


2 comments: