Week 12

This was another big week for us since it was the final desk crit before our final presentation.

Puzzle system

In terms of programming, I did a lot of work on the system for puzzles. Previously, we did have a system for switches but it didn't quite have the functionality Dylan wanted for making more complex puzzles. The goal for this system was to allow the switches and other object that trigger interactions to be decoupled from the logic controlling what happens when they are activated. This also needs to be decoupled from the code controlling the actual objects that will react to switches (i.e. the script controlling a door opening and closing) so that it can be reused in multiple kinds of puzzles.

After talking to Dylan and Harrison about it, I ended up drawing up a class diagram detailing how the new system will work.
Here, all objects that can be interacted with like buttons and hit switches inherit from AbstractSwitch, which has an array of Triggers that it will call Activate() on when it is activated by the player. IInteractable and InteractableSwitch originally represented switches that prompt the player to press a button to activate when they are within a certain distance, although we're pushing that feature back due to time constraints and it being non-essential when we also have HitSwitches, hence why it's crossed out.

Trigger is loosely based on the concept of Triggers from the StarCraft II editor, and represents some piece of logic that should happen when a switch is triggered. The simplest form of this will just do an action immediately, but more complex puzzles can be implemented using this system. The example of this that we're including in the prototype is a door that is activated when the player activates a series of four HitSwitches in the correct order. Activating all four should reset the puzzle but only open the door if the sequence was correct. In future we will use this system to implement more complex kinds of puzzles as well, which I think will work well since an AbstractSwitch can be anything the player interacts with like a physics trigger area as well as an actual switch.

Gate and Circuit are simply examples of objects that Triggers will talk to. Originally we were going to have these inherit from a base class, but since all the logic for talking to them is inside the Trigger, it doesn't matter that we need to have specific kinds of Triggers for different triggerable objects.

Sounds

Throughout the week Harrison kept working on adding sounds to the prototype, which so far are sounding really good.

Art

Relatively late into the week, David Upcher decided to try a completely different system for building the level, using extruded hex tiles rather than rectangular planes.

Initially this completely broke our level and since it wasn't working at all on Thursday night I seriously thought we would have to just scrap it, but somehow we pulled through and managed to get it all working by the time for the desk crit and it's looking way better than what we had last week.

There are some issues with this approach though. First off, David Upcher made the level as a single mesh in Maya, which means that if Dylan wanted to tweak the layout of the level he would have to get David to re-export the whole thing as opposed to being able to just move things around in the Unity scene. If we end up sticking with everything being hex based I'd like to, over the holidays, spend some time building Unity editor extensions to allow tile based levels to be easily made in the editor.

The other issue we encountered was that we're running into issues with the performance of the lighting, since we currently have heaps of lights in the scene, all of which are fully dynamic and cast shadows. I think fixing this should be fairly easy though. With deferred rendering we can probably keep most of the lights as dynamic and just tun off their shadow casters, although since the level is static and most of the lights are static too we could probably get away with setting most of the lighting up as baked into textures, which would be much cheaper.

Going forward

Overall the feedback from this desk crit was fairly positive which was a massive relief considering we're basically out of time to make more adjustments. At this stage we just need to focus our efforts on the pitch and compiling our portfolio.