Description:

Protons are attacking your circuit fort!  Rally electrons to fix the breaks!  Collect blue charges for random positive or negative effects!  Don't let the battery drain!

Use the arrow keys to move and collect electrons.  Take the electrons to breaks in the wire to patch them.

Dev Notes:

This was the final game I created for my Experimental Games class.  By now, I had embraced the arcade-style type of game my professor really loved, so I finished off the quarter with another: simple controls, resource management, and an ever-present countdown to game loss.  My idea was to create a super-serious game where a grizzled neutron general needed to rally his electron footsoldiers and defend their circuit fort from the evil invading protons.  The artist I was paired with...took the game's style in a different direction.

The cool trick in this game is the reflection that happens when the protons bounce off of the wires making up the circuit walls.  Initially, I thought I could just negate their velocity on collision, but that resulted in a direct reversal rather than a reflection.  My second attempt was to tag the sections of each of the four walls separately, then reverse either the x- or y-velocity only, depending on which of the walls was hit.  The code for that was very messy, however, so I did some research and found a Vector3.Reflect() method, that takes in an initial direction and the normal of the desired reflection plane.  The first was just the proton's current velocity (normalized), and the second was luckily provided by Unity's OnCollisionEnter() function, which is where the reflection code needed to go anyway.  This implementation behaved exactly as desired.

We wanted this game to include both power-ups and "power-downs", but our professor raised a good point when he asked why any player would ever purposely collect one of the latter.  We didn't have a good answer, so the solution we ended up going with was to make the pickups "blind": the sprites are the same, so you won't know if you're going to get a positive or negative effect unless you take the chance.  There are the same number of buffs and debuffs, and the one that spawns is always random, but we observed that players will almost always go for it anyway.

More: