Click here to Skip to main content
13,501,866 members
Click here to Skip to main content
Add your own
alternative version


13 bookmarked
Posted 16 Aug 2007

Addit – A Simple Puzzle Game

, 16 Aug 2007
Rate this:
Please Sign up or sign in to vote.
A complete Simple Puzzle Game in


A simple complete open source free puzzle game


vs 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"/>

<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"/>

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 - 63.8 KB

Points of Interest

Find more open source games

for more details



This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Thilina Hasantha
Web Developer
Sri Lanka Sri Lanka
No Biography provided

You may also be interested in...

Comments and Discussions

GeneralMy vote of 1 Pin
fredatcodeproject6-Jul-12 7:20
memberfredatcodeproject6-Jul-12 7:20 
GeneralError in zip"" Pin
StephanG21-Aug-07 3:32
memberStephanG21-Aug-07 3:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.180417.1 | Last Updated 16 Aug 2007
Article Copyright 2007 by Thilina Hasantha
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid