Last year I posted a small MFC application on my blog, called Colors Game, about covering with a single color a grid initially colored in six colors. It wasn’t a big deal of an application, but it was fun and recently I decided to write a WPF version of that MFC game. This is the result:

The game is about covering in a single color a grid that starts with each cell colored randomly with one of six possible colors. You must expand the working region initially defined my the top-left cell throughout the entire grid. You select to color this working region with a new color that should match the color of neighboring cells. These cells are then merged into the working region. The game ends when you covered the grid in a single color. However, each level has a maximum allowed number of moves (or colorings) that you can do, and you only complete (or win) the level if you don’t exceed this number.

The image below shows how the working region expands towards the entire grid.

This new game has a more appealing interface and a richer set of features:

  • can select any of the available levels
  • you can change color themes for windows and for the grid
  • view statistics about your previous plays in any level
  • progress and settings are stored on disk and automatically reloaded when starting the application again

The game is described in details on this dedicated page. If you download an install the game, you should read that before playing.

If you find the game too easy, then I propose to use one of the more challenging color themes such as the Back and White one. Here is a screenshot:

Download the latest version of the game from here and enjoy it!

Hits for this post: 2793 .

Alchemy 1.3 is the latest update of Alchemy for Windows that brings 50 new exciting elements (taking the total to 350) and new features such as hints. The new elements in this release are focused on games; they include games such as Starcraft, Warcraft, Need For Speed, Tomb Rider, Resident Evil, characters such as Mario, Luigi, Yoshi, Jim Raynor, Zeratul, Queen of Blades, Lich King, and the races Zerg, Protoss, Terran, Fire Elemental.

Alchemy 1.3 new elements

The new elements are:



Aluminium Phoenix
Ant Protoss
Boo mushroom Queen of Blades
Computer game Resident Evil
Diet Robot
Easter egg Rust
Faberge egg Salamander
Fire elemental Sniper
Frog Spinning wheel
Infestation Starcraft
Insects Sushi
Jim Raynor Team
King Termite
Lara Croft Terran
Leach Tomb Raider
Lich King Undead
Lighthouse Vinegar
Luigi Vulture
Mantis Warcraft
Mario Weevil
Mosquito Yarn
Need for Speed Yoshi
Obesity Yoshi egg
OneUP Zeratul
Paint Zerg

You can find the list with all the 350 elements in Alchemy 1.3 here.

One new cool feature is the availability of hints. Press the new Hints button and a window pops-up displaying one possible element you can create, indicating also one of the two elements used to create it. To close the hints window, just click anywhere on it.

Another feature available in version 1.3 is adding elements to the desktop area by double clicking on them in the unlocked elements list. Terminal elements cannot be added to the desktop.

Note: if you already played Alchemy, just replace the old executable with the new one. Don’t delete the user settings file having your account name and extension .aus, or you loose the elements and combinations you unlocked so far.

Download the latest version from here.

, , Hits for this post: 18969 .

I have played recently a great game on Android, called Alchemy, created by Andrey Zaikin. You start with four basic elements, Fire, Water, Air and Earth and you can combine them to get more and more elements. The game was so catching that after finishing it I decided to write my own version for Windows. I chose WPF because I wanted to learn it and because I realized the stuff I wanted to create was too hard to do in MFC. This is my first real application in WPF, and what you see is the result of 4 days of work; in MFC it could have been 4 months, I believe.

You start with the four basic elements: air, earth, fire and water. You can combine them by dragging onto each other on the central area of the window, “the desktop”. When new elements are created they are added to one of the two lists from the left area. The top list has elements that can be combined again. The bottom list contains terminal elements, i.e. elements that can no longer be combined. You can drag elements from the non-terminals list back to the desktop area, but not from the terminals list.

You can quickly bring onto the desktop the four basic elements by double clicking on an empty area of it. Double clicking on an element from the desktop creates a duplicate of it. You can remove an element from the desktop by dragging it over the trash can icon. You can remove all the elements from the desktop by double clicking on the trash can.

When the number of elements gets too big scrolling through the list might be cumbersome. You can use the search textbox to filter the elements in the list. As you type only the elements that contain the typed text are displayed. It you press the X button of the textbox or clear its content, the list displays again all the unlocked elements.

On the right area of the window you find a help pane. When you select an element from one of the two lists on the left side, you can see a list of all the unlocked combinations in which the elements appears (either as input or output).

There are also several buttons: Cheat, Wikipedia, Help and About. Button Cheat opens a new window that displays the list of all available elements. So if you get stuck and don’t know what elements are left to discover you can cheat and see the list.

Button Wikipedia starts a search on Wikipedia for the currently selected element. Buttons Help and About display information about the game.

Note that your game progress is saved when you close the game and loaded when you start again. The information is stored in a file with your Windows user name and extension .aus. Don’t delete the file or you lose your game progress.

Here is the alphabetical list of all the 210 elements available in version 1.0:


Air Cochineal Gunpowder Ozone Soldier
Airplane Coffin Hippopotamus Panda Star
Alcohol Combustion engine Hourglass Paper Starfish
Algae Computer House Pearl Steam
Arable Concrete Hunter Penguin Steam engine
Arm Continent Hut Penicillin Steamer
Ash Corpse Hydrogen Perfume Stone
Assassin Country Ice Petroleum Storm
Bacteria Darth Vader Jedi Pie Sulfur
Barbeque Desert Kerogen Pinocchio Sun
Beach Diamond Knife Pizza Swamp
Bear Dinosaur Lava Planet Tequila
Beast Dough Library Plankton The Beatles
Beer Dragon Lichen Plesiosaur Thunderstorm
Beetle Dragonfly Life Poison Tiger
Bicycle Dust Light Poisoned weapon Time
Bird Earth Lightbulb Polar Bear Tom and Jerry
Bitumen Egg Lightsaber Pressure Tool
Boat Electricity Lime Pterosaur Tornado
Boiler Energy Limestone Radar Tortoise
Book Fern Livestock Radio Transistor
Bread Fire Lizard Rain Tree
Brick Firearm Locomotive Rainbow Turtle
Butterfly Fish Man Sand Uncut diamond
Cactus Fisherman Manure Santa claus Universe
Car Flour Meat Scarab Vodka
Carbon dioxide Flower Metal Scientist Volcano
Carmine Flu Milk Scissors Wagon
Cat Fly Mite Scorpion Warrior
Caviar Fondue Mold Seed Water
Cement Forest Monkey Shark Watermelon
Cheese Fossil Moon Shell Whale
Chicken Fruit Moss Silicon Wheat
Chip Fugu Motorboat Sith Wheel
Christmas tree Galaxy Motorcycle Sky Wind
City Gasoline Mouse Skyscraper Wine
Clay Geyser Mud Snail Wood
Cloth Ghost Mushroom Snake Wooden ship
Clothing Glass Ocean Snow Wool
Cloud Grape Old man Snowman Worm
Coal Grass Omelette Soda water Yeast
Coca cola Grove Oxygen Solar system Yogurt

Note: In order to run the game you need .NET framework 3.5 SP1.

Stay tuned, updates with more elements are coming!

Update: Download the latest version from here.

, , Hits for this post: 18927 .

When you create a WPF application, the start-up window is by default one from the same project (by default called Window1.xaml).

< Application x:Class="WpfApplication1.App"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    StartupUri="Window1.xaml" >
    < Application.Resources >

    < /Application.Resources >
< /Application >

But what if you want to use a window from another project (class library)? The pack URI scheme, used by WPF, allows you to identify and load files from:

  • the current assembly
  • a referenced assembly
  • a location relative to an assembly
  • the site of origin for the application

The format of the pack URI is pack://authority/path. The authority identifies the type of package and the path the location of a part inside a package. There are two authorities supported by WPF:

  • application:/// identifies application data files (known at compile time)
  • siteoforigin:/// identifies site of origin files

To use resource files from a referenced assembly you need to use the application:/// authority, and the path must have the form AssemblyShortName[;Version][;PublicKey];component/Path. Version and PublicKey are optional.

Let’s say you want to use a XAML called SampleWindow.xaml from a referenced assembly called WpfDemoLib. The App.xaml file should look like this:

< Application x:Class="WpfApplication1.App"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    StartupUri="pack://application:,,,/WpfDemoLib;component/SampleWindow.xaml" >
    < Application.Resources >

    < /Application.Resources >
< /Application >

You can learn more about pack URIs in WPF from MSDN.

, , , , Hits for this post: 12982 .