Introduction
A simple complete open source free puzzle game
Background
vs C#.net 2005
Using the code
Addit is a simple puzzle game which could improve your pattern matching
abilities. Addit is implemented using C#.NET 2005. Here I'm published
the source code also. I only designed a few levels for the game. But
you can always design new levels and add them to the game (see Design
Levels link). You can also down load new levels from this site.
You can build new levels for Addit very easily. It's just a matter
of writing an xml file. If you have played Addit you might have seen
that it has 64 small squares in eight rows and eight columns, and you
have to remove all the numbered squares in the left side box using the
numbers provided in right side box.
Following figures show you the xml file for the level named "easy start" and how the level is shown during the game play.
<?xml version="1.0" standalone="yes" ?>
<Level Name="Easy Start" Finished="Yes">
<NumberSource paneWidth="1" paneHeight="5"><Number value="1" amount="5"/>
<Number value="2" amount="5"/>
<Number value="3" amount="3"/>
<Number value="5" amount="3"/>
<Number value="7" amount="3"/>
</NumberSource>
<NumberPad type="Basic" paneWidth="8" paneHeight="8" Time="0">
<Button row="0" col="0" value="9"/>
<Button row="0" col="1" value="9"/>
<Button row="0" col="2" value="2"/>
<Button row="0" col="3" value="2"/>
<Button row="0" col="4" value="2"/>
<Button row="0" col="5" value="2"/>
<Button row="0" col="6" value="9"/>
<Button row="0" col="7" value="9"/>
<Button row="1" col="0" value="10"/>
<Button row="1" col="1" value="10"/>
<Button row="1" col="2" value="10"/>
<Button row="1" col="3" value="10"/>
<Button row="1" col="4" value="10"/>
<Button row="1" col="5" value="10"/>
<Button row="1" col="6" value="10"/>
<Button row="1" col="7" value="10"/>
<Button row="2" col="0" value="8"/>
<Button row="2" col="1" value="2"/>
<Button row="2" col="2" value="8"/>
<Button row="2" col="3" value="2"/>
<Button row="2" col="4" value="8"/>
<Button row="2" col="5" value="2"/>
<Button row="2" col="6" value="8"/>
<Button row="2" col="7" value="2"/>
<Button row="3" col="0" value="10"/>
<Button row="3" col="1" value="10"/>
<Button row="3" col="2" value="10"/>
<Button row="3" col="3" value="10"/>
<Button row="3" col="4" value="10"/>
<Button row="3" col="5" value="10"/>
<Button row="3" col="6" value="10"/>
<Button row="3" col="7" value="10"/>
<Button row="4" col="0" value="10"/>
<Button row="4" col="1" value="10"/>
<Button row="4" col="2" value="3"/>
<Button row="4" col="3" value="3"/>
<Button row="4" col="4" value="3"/>
<Button row="4" col="5" value="3"/>
<Button row="4" col="6" value="10"/>
<Button row="4" col="7" value="10"/>
<Button row="5" col="0" value="10"/>
<Button row="5" col="1" value="10"/>
<Button row="5" col="2" value="10"/>
<Button row="5" col="3" value="10"/>
<Button row="5" col="4" value="10"/>
<Button row="5" col="5" value="10"/>
<Button row="5" col="6" value="10"/>
<Button row="5" col="7" value="10"/>
<Button row="6" col="0" value="10"/>
<Button row="6" col="1" value="10"/>
<Button row="6" col="2" value="2"/>
<Button row="6" col="3" value="5"/>
<Button row="6" col="4" value="10"/>
<Button row="6" col="5" value="5"/>
<Button row="6" col="6" value="2"/>
<Button row="6" col="7" value="10"/>
<Button row="7" col="0" value="10"/>
<Button row="7" col="1" value="10"/>
<Button row="7" col="2" value="10"/>
<Button row="7" col="3" value="10"/>
<Button row="7" col="4" value="10"/>
<Button row="7" col="5" value="10"/>
<Button row="7" col="6" value="10"/>
<Button row="7" col="7" value="10"/>
</NumberPad>
</Level>
The second line defines the name of the level and the "finished" attribute tells Addit, the current state of the level.
Number
source element in the third line defines the right had side box.
"paneWidth" property define the number of number columns and
"paneHeigth" property defines the number of rows.
The number value element (<Number value="2" amount="5"/>) defines each number and allowed amount of numbers.
Try to compare the "Number Source" element with selection bar in the picture.
Number pad element (<NumberPad type="Basic" paneWidth="8" paneHeight="8" Time="0"> ) defines
the left hand side box in the picture. Leave paneWidth and paneHeigth
properties as 8. If not it may result an unpredictable behaviors.
Each button element (<Button row="0" col="0" value="9"/>)
defines the value of button specified by the row and column. Values
from 0 to 9 are mapped to buttons with that value. The value 10 means
an empty button and value 11 means an irreplaceable button.
You know the basics and now you can add a new level to the game. To do it, follow the given instructions.
� Open the folder that Addit has been installed.
� Open the folder levels
� Copy the level001.lev file to the same folder.
� If the last .lev file in the folder is level006.lev then rename the newly copied .lev file as level007.lev
� Open it in word pad.
� Change the design of the level.
Download addit-bin.zip - 63.8 KB
Points of Interest
Find more open source games
http://www.cse.mrt.ac.lk/~pkdsomad/twuml/pageAddit.htm
for more details
History