VB.NET – Lights On

This post was written by Brandon on December 21, 2008
Posted Under: Visual Basics .NET

lightson
Edit: Here is a demo video!


This is a clone of the popular puzzle game Lights on. The purpose of the game is to turn all the lights on, or in this case; make all the buttons blue. Sounds easy, but once clicked the button clicked, the one above, below, to the left and right are inverted. That means if any of the ones around are already blue, they will become red. Its a fun challenging puzzle game.
More info in the full article!


This version allows you to make your own levels in .txt files and have them automatically loaded. It demonstrates creating 2D array button objects, instead of drawing 49 buttons manually, and controlling them all.

This is how a level file would look:

|||||||
||-||||
|--||||
|||--||
|||-|||
|||||||
|||||||

Where | are the blue ones and the dashes (-) are the ones that must be turned into blue. Levels can be created anyway, aslong as they are 7x7. There is 7 levels included, all I have been able to finish except level 7 (can any of you try to beat it?)

If you create any levels and would like to share them, please use the contact me form and they will be posted!

As always, its Open Source.
Download the binary and source here: LightsOn (781) - 192.62 kB
Or
Download from Ziddu and support BncApps

Reader Comments

Trackbacks

Add a Comment

required, use real name
required, will not be published
optional, your blog address