Doctor's Note

My Role: Programmer
Technology
-
Unity
-
C#
-
-
Visual Studio
-
Photoshop
Genre: Puzzle game
​
Platform: Android Tablet
​
Development Time: 2 Months
Summary of the Game
Doctor’s Note is a puzzle game where the objective is to place cogs on various types of pegs, such that the pipe pieces get moved into an interconnecting chain. I was one of the two programmers on the team, and was responsible for bug fixing, creating the basic sliding pipe and rotating pipe code generalized, and rewriting the gear script code. Project was actively worked on from October 2015 to December 2015. I put in 93.6 work hours into the project.
You, the player step into the shoes of revenge driven mad scientist Antony Sarchovsky, formerly a participant of the USSR’s darkest and most-covert experimentation, now a disgraced and exiled rogue element loose in the world. Fulfill Sarchovsky’s final vengeance upon those that wronged him by bringing your ultimate creation to life. By leveraging the use of gears to connect pipes in this uniquely dark take on a tablet puzzle game, the player will construct their grisly creation's circulatory system, breathing life and power into it.
​
I contributed the more generalized code used in the game, such as the Gear rotation handling systems and the original version of the gear rack code.
The Red Gears and Blue Gears
Summarized Bullet Points:
-
Blue and Red gears have the same base script, only difference is that blue gears think they are already on a peg, and can not be moved by the player.
-
Whether the gears are locked up or rotation or not is calculated from the cogs on the powered pegs first.
-
Goes through neighboring cogs, chaining down until hits no already encountered cogs.
-
If a point comes where the cogs hit each other and they have the same rotation, it locks the system up.
-
If a rotating cog is next to a non-rotating cog, the non-rotating cog now rotates in the opposite direction.
-
​
Due to the nature of how the game functions, one can not assume the exact order the player may place the red gears on the pegs or wear. Thus when the gears are placed on pegs, it needs to be told that it is on a peg, what type of peg it is, if that peg is powered, and if it is powered, which way it wants to rotate. Once the cogs have that information, another special game object, which handles updating the red gears on whether they can rotate, which way to rotate, and if they lock up, will take over from there. Whenever there is a gear neighboring a turning gear, that neighboring gear, if not already turning, will start to turn in the opposite direction of it's neighbor. Thus what this red gear handling script does is first find the gears that are powered, then progressively move down through the powered gears neighboring gears and tell them which way to turn. If there is a conflict (aka, two neighboring gears that are rotating and in the exact same direction) all of the gears will lock up in that set.
The information about which way to turn is then passed back to the red gears, which handle actually rotating themselves, or if locked up, will shake every couple seconds. As far as blue gears are concerned, they the exact same as the red gears, and run on the same scripts. The only difference is the player can not move nor tamper with the blue gears directly.

This is an image of level one with a cog placed onto the powered peg.

This is level one of the game without any cogs placed on it.

DirtyRedGearHandler part 5 of 5. Part 5 contains the final part of the DirtyRedGearHandler's update method, as well as a utility function (isThisObjectAlreadyInDirtyList).

This is an image of level one with a cog placed onto the powered peg.
Personal Contributions
Rack Gear Pieces
Summarized Bullet Points:
-
Rack gear piece only moves if there is a rotating cog along it's teethed edge.
-
Uses the normalized direction from the rack gear to the cog to determine if in right direction.
-
Then determines if the cog is in range for it to matter.
-
​
Rack gear pieces are different from the cogs in that they are a straight piece, that when a rotating cog next to it's teeth, will move towards the relative direction the rotating piece dictates. These pieces are part of the puzzle in that they hold the pipe pieces on them necessary for completely the pipeline.
The rack gear pieces determine that a cog is in a valid position to move it by first checking the direction the cog is in relation to it's relative downwards direction (where the teeth of the rack gear are). If the cog is not towards the downwards direction, then it ignores the cog. If the cog is in the downwards direction, it uses mathematics similar to how one would perform circle versus a box collision to determine if the cog is in valid range to the gear rack to be able to move it.

Also in level one is a rack gear piece which is used to move the pipe pieces into it's connecting position.

This is an illustrated explanation for how the rack gear pieces work.

Also in level one is a rack gear piece which is used to move the pipe pieces into it's connecting position.
What Went Well
-
Got all the pieces that we initially wanted working and bug free, even if if it did take going back and tearing out old code for almost entirely new code.
-
Communication between the departments was very strong; though that could also be contributed to the small team size.
-
At the second half of the project, me and the other programmer were synchronized and working at full speed.
Challenges
-
When we rushed code it came back to bite us later. Had to take the red gear script and make it almost from scratch in Alpha.
-
First time encountering balancing act between getting it generalized (taking time, but pretty much bug free) and functional (rushing it for deadline and specialized case, but potentially lots of bugs).
-
To start, me and the other programmer were still trying to figure out how we best work together.
What I Learned
-
Both the generalized and functional programming methods have their pros and cons, however when the time is available to do so, it is better to go generalized.
-
There are remainders of code from both methods still in the game (Red Gear Script is now of the generalized variety, while the rack gear pieces were transformed into specialized cases).
-
-
When trying to communicate with anyone, don't just talk about it, grab a pen and paper and draw it out. It can save so much time.
-
Try to envision every possible way any tool or game piece can be used. This will save a lot on having the time used for discovering and fixing a bug.