Inspiration

Through high school, we struggled with eletricity and magnetism and wished that there was a better way to be introduced to it when finnicky real circuits can be counter-intuitive. We decided to make Lights Out! as an answer to that idea, as a game that allows for virtual lab simulations of simple circuits.

What it does

As previously mentioned, the game comes with 2 main game modes: Sandbox allows you to make custom circuits with wire, resistors, lightbulbs, and more, all while getting the real values for the current and voltage through each component. The other mode, Level, allows the user to solve puzzles with specific objectives with a limited amount of resources to do so.

How we built it

We used the PyGame module in Python due to our increased familiarity with the language. The front end looks like any other game-type application; however, the backend contains modified nodal analysis calculations to render the most accurate results, based off the calculations of Spice.

Challenges we ran into

The 'sandbox' portion was very hard due to having to program all the possibilities of combinations in terms of sprite interaction and circuit building on the backend. As such, we had to rely on many repetitive blocks of code to compute similar-looking blocks. Also, the wire rotation and fusion element were an absolute pain.

Achievements that we're proud of

The general pixelized style, specifically on the title screen with the lightning and the general spritework, is something we immediately wanted and are proud of its implementation. Also, the wire fusion element was such a pain that we're going to mention it here AGAIN :)

What we learned

We learned a lot about both circuits and Python during this project, mainly on Game Logic and the sheer magnitude of cases devs must plan for during pre-test coding. Furthermore, this was our first forray into Git and cooperative coding, so it taught us a lot about the upsides (and downsides) of being able to write code together.

What's next for Lights Out!

We're hoping we can expand the game and eventually make it a learning tool teachers can rely on to put a fun spin on a lot of student's most dreaded subjects.

Built With

Share this project:

Updates