*** LIGHTS OUT for the Palm Computing Platform *** v1.1 *** *** By Andy Scheffler (ascheffl@hamusutaa.com) Contents: 0. Freeware Notice 1. How to Play 2. Layout of the screen 3. The Menus 4. Differences from the toy 5. Version History 6. What's planned for the future 7. Edit Mode 8. Technical Notes 9. Philosophy of Lights Out 10. Contacting the Author **************************************** 0. Freeware Notice **************************************** This program is freeware. No one can charge for it, and it cannot be distributed without this readme. Although I'm not charging for it, if you send me an email just to let me know how you like it, I'd appreciate it. **************************************** 1. How to Play **************************************** Lights Out is a handheld device made by Tiger Electronics, about the size of a VHS tape. It has 25 lights/buttons on it which can either be on or off. The object is to get all of the lights off, hence the name of the game. Whenever you hit a button, if that button is off, it turns on. If that button was on, it turns off. But, the four buttons that are on the top, bottom, left and right of that button also switch states like this. Also, I should mention that you have to do it in a certain number of moves. Each puzzle has a magic number of moves that is the minimum number of moves necessary to solve it. If you solve it in this number, the screen will give a little spiral animation. If you take anywhere up to 10 extra moves, it will instead flash a number of buttons equal to the number you were over. Any more than 10 extra moves, and it flashes a big "X" and you have to start that level over. There are three modes of play. The main mode is the Puzzle mode. There are 50 puzzles built into the game. In this mode, when you finish one puzzle, you advance to the next. The next mode is Random mode. In this mode, a puzzle is automatically generated at the specified difficulty. Your progress will be saved if you turn off your Palm device. The last mode is Edit mode. In this mode, you can create your own puzzle, and then play it. **************************************** 2. Layout of the screen **************************************** The main portion of the screen is made up of the lights. If you tap one, it will switch states of it and its four neighbors. Along the right side, there are the following, from top to bottom: * Number of Moves taken so far in this attempt * Minimum number of moves necessary to solve this level * Level number of current puzzle (only in Puzzle Mode) * Restart button - restarts the current puzzle * Hint button (only works in Puzzle Mode) * Play / Edit switch button (replaces the Hint button in Edit Mode) These should be self-explanitory except for the Hint button. The Hint button only works in Puzzle Mode, and only if you haven't hit any lights yet. If you hit it, it will flash a light as a hint to start you off, and then it will make the move for you. You can do this up to twice on each level, and only on the first 25. In Edit mode, the Hint icon changes from a "?" to a "P/E". This button is used to switch between Edit Mode (edit) and Edit Mode (play). For more information, see Section 7: Edit Mode. In addition, when selecting a Random level (or you have just completed one) a spinning bar will appear in the lower left corner to let you know the program is trying to find a new Random level. This should never be noticable except in levels 14 and 15. **************************************** 3. The Menus **************************************** Game Menu --------- Select...: Select a new puzzle In Puzzle mode, you can select any puzzle you have already completed. In Random mode, you can select the difficulty of a new puzzle. Keep in mind that when you select a new level, your current puzzle will be lost. Restart: Restart the current puzzle Same as pressing the restart button, restarts the puzzle to what it was when you first got it. In Edit Mode (edit), this clears the screen. Reset: Reset progress in Puzzle mode After a confirmation, this will reset you back to Puzzle #1 in Puzzle Mode. Mode Menu --------- Puzzle: Selects Puzzle Mode Selects the Puzzle Mode. You will lose your current Puzzle. Random: Selects Random Mode Selects the Random Mode. You will lose your current Puzzle. Edit: Selects Edit Mode Selects the Edit Mode. You will lose your current Puzzle. For more information on Edit Mode, see section 7. Help Menu --------- Hint: Same as pressing the hint button. Solve: Solve the current puzzle. The last resort of the truly frustrated. This button will display the solution on top of the current puzzle. To solve it, hit all of the buttons marked with an "x" in any order. About: Display version info. **************************************** 4. Differences from the toy **************************************** 1) There is a solve feature. 2) Random puzzles can be selected at any level at any time. In the toy, you can only select a random level of difficulty no harder that the current level you are on in the Puzzle mode. 3) Random puzzles of difficulty 14 and 15 take much longer to figure out. 4) Levels in Edit mode keep track of moves and have a minimum. In the handheld, you could take as long as you liked. 5) Progress in current puzzle is saved when pilot it turned off. The toy only saves progress from puzzle to puzzle. 6) Easier interface. **************************************** 5. Version History **************************************** v1.1 Nov 9, 1999 ------------------- Added Edit Mode, re-added Random Levels 14 and 15, with a spinning status indicator in the lower-left corner. Fixed a bug that was causing Random Mode to take much longer than necessary to find a suitable level and was not working quite right anyway. This version completes my vision of the game, and all further releases will most likely be bug-fixes. v1.0.3 Nov 2, 1999 ------------------- Fixed bug caused by 1.0.2 fix that caused no progress to be saved. Silly me. v1.0.2 May 10, 1999 ------------------- Fixed bug where solving level 50 would go to nonexistant level 51 instead of back to level 50. (In the future, to more properly mirror the function of the original, it should sit at a cross pattern with none of the buttons doing anything, until a new game is selected, but this was a quick fix.) v1.0.1 Mar 2, 1999 ------------------- Fixed bug in help code that didn't press the buttons correctly for you, and didn't flash correctly. v1.0 Jan 19, 1999 ------------------- Everything. **************************************** 6. What's planned for the future **************************************** * Better random puzzle selection process * My next game **************************************** 7. Edit Mode **************************************** This new mode, introduced in version 1.1, completes the functionality of the orignal hand-held. When Edit mode is first selected, you are in Edit Mode (edit). The Moves Made indicator is replaced with "-Edit-" and now, button presses do not have the normal effect, they instead only turn the clicked button on or off. You are now editing the level that you wish to play. If you press the reset button, or select "Reset" from the menu, the current level will be cleared so you can start editing over. When you are ready to attempt the level you currently have, hit the "P/E" button in the lower right corner. (It has replaced the Hint button) You will now switch to Edit Mode (play). If the level that you have constructed has no solution, however, the program will pop up a dialog informing you of this. You may still play the level, of course, but you will never be able to solve it. If the level does have a solution, the Minimum Number of moves is displayed on the right, and the level continues as normal. If you press the "P/E" button again, you will go back to Play Mode (edit). **************************************** 8. Technical Notes **************************************** * Lights Out stores its data entirely in the Preferences, using up almost all of its entitled share. * The solve feature uses an iterative algorithm that finds the best possible solution after trying all possibilities. It's O(1), because it always tries everything. It never should take any noticable amount of time. * This was compiled using the GCC cross compiler and Palm's Header Files. It was compiled with OS 2 in mind... it works in OS 3, but has not been tested in OS 1. **************************************** 9. Philosophy of Lights Out **************************************** As you may have inferred from the solve feature, in any given puzzle in Lights Out, it does not matter in which order you press the buttons, only which buttons you press. In most cases, if you press a certain pattern of buttons, the easiest solution is to press all of those buttons again. This isn't always the case, which is why the 14 and 15 difficulty puzzles took too long to figure. It had to find a puzzle which didn't have a shorter solution. I'm curious to know how the handheld figures this out... This was the first Lights Out toy. There are two sequels, Lights Out Cube, where the lights are on a cube, and the switching effects wrap around the cube, and Lights Out Deluxe, with a 6x6 grid and a whole lot of other options. The same solution algorithm can be applied to LOD in most of its modes, but not the cube. I'm still trying to figure it out. **************************************** 10. Contacting the Author **************************************** My email is ascheffl@hamusutaa.com and I appreciate any sort of bug-reports, compliments, suggestions etc. You can find the most recent version at: http://www.hamusutaa.com/pilot/lightsout.html **************************************** This document, as well as the source code for Lights Out, was edited in GNU Emacs. v1.1 11/09/99