Download Lights Out

Role

Scripting, UI Design

Project Duration

2 Days

Technologies Used

  • Unity 2020
  • Visual Studio Community 2019
  • Trello

Lights Out

My task for this assignment was to recreate the Tiger Electronics game Lights Out, in which toggling one light also toggles the four orthogonally adjacent lights, with the goal of turning all of the lights in a 5×5 grid off. Having just recently completed Tic-Tac-Toe using Unity’s UI, I wanted to try a different method of interaction here, so I chose to use raycasting from the camera to determine which window was clicked.

Each window keeps track of its own state, and a psuedo-Singleton game manager object tracks the overall game state. This game manager is also responsible for toggling the correct combinations of lights, creating puzzles, and checking for the win condition when all lights have been toggled off. Puzzles are guaranteed to be solvable because they are generated by randomly selecting a number of lights to toggle as if they had been clicked by the player, with the number of lights affecting the game’s difficulty.

Like the Tic-Tac-Toe project, a significant part of this project was also the use of Trello to document the game and track the work in a Scrum-like fashion. A template Trello board was provided by the course instructor, which we were expected to fill in and update as we proceeded through the process, simulating integration with an existing workflow, albeit without additional team members in this instance.