Penguin Village
ROLE
Gameplay Programmer
DESCRIPTION
Penguin Village is casual game I'm developing along with four others for my final year project. Our team consists of two artists, two programmers, and one designer. We develop at an industry standard using agile practices. I've become a valued team member and my main contributions are: penguin movement controller both swimming and walking, a modular quest system, catching fish and their AI.

Gameplay & Mechanics
Penguin Movement Controller
This is the mechanic I've spent the most time on, it has been through several iterations of feedback and adjustments to get it's polished feel. The main challenges were seamlessly transitioning from walking above water to jumping-in and swimming, also being sure not to overcomplicate the controls.
The final system used the mouse to look around, both on land and in water, and wasd to move relative to the cameras direction. I combined the built-in in horizontal orbital camera with custom vertical orbit behaviour, to get classical third person controller on land and a smooth feeling swimming controller in the water.
Dialogue & Quest System
An essential part of penguin village is it's dialogue system, needed for conveying the narrative and directing the player. The base system was built by my colleague, representing the npc's dialogue as a list of strings. To intergrate the quest system I built, I used a tag-based approach, similar to markdown or html, to mark when quests should appear in the speech (I.e <Quest>). This would stop the dialogue and bring up the quest description. The bulk of complexity came from dealing with every different scenario happening on the dialogues end. Some of the other tags were: <Stop> - used to break the speech up mid-way through dialogue, <Level>'n' - was used to restrict the speech until the map progressed to the given level. Others were cosmetic, <Name> and <Img> for the displayed character sprite and name. Other features included, small talk for when there is no remaining dialogue and a repeating toggle to reset both the dialogue and quests.
The quest system itself is quite simple, built around a base 'quest-giver' class. Which uses a list of Quests, a custom class containing required items, description, etc. A manager classed was used to display the UI and another class was used to display the quest's requirements at the top of the screen. Mainly callbacks were used to communicate with the dialogue system. Completing the quest has the option to trigger map progression.
Level progression was another core feature of the game, allowing the player to build the village. It's split into main levels, these follow the narrative and must be built in order, and side levels which can be completed at any time and order. Levels themselves just contain references to objects needed to be enabled and disabled. The building sequence features camera changes and a programmed animation.
The first video is a good example of all three systems working in unison.
Fish AI Systems, Camera Tracking
The Fish use a simple AI to randomly navigate around the cave and avoid the player. It works similarly to the old DVD screensaver, when a fish runs into a wall it bounces off, and directly swims away from the player when they come within range. To combine both avoidance vectors I just normalise their sum. To smooth directional changes I just lerp from a global swim direction to the wanted direction.
Our game originally started as 2D swimming, for which I programmed the fish to use a boid system to navigate. This looked great and natural, but for our transition into 3D we needed a quick fish AI for testing, and found that the simpler AI worked better gameplay-wise and still held up on visuals.
Catching fish became it's own mechanic once we moved to 3D, as the difficulty increased. It evolved from a teleporting to nearby fish to targeting and catching with a mini game. On holding right click the player will target the closest fish; The camera tracks the fish, using trigonometry on the fish's offset from the player. A quick time event then appears, using the fish's pre-set times, for the player to beat to catch the fish.
Market & Player Customisation
Another two major mechanics I've created are the market, to buy and sell items, and customisation menu, to decorate the player's penguin. These mechanics tested my ability to integrate other people's work, as the inventory system was created by my programming colleague and customisation required high collaboration with artists.
Using the market, the player can sell and buy items. The functionality itself didn't take long to implement, but the UI interaction took some time perfect. Each item, including the sellers wares, is displayed as a tile which the player could pick up and move using the mouse. The player can drag the items into their inventory to buy and to the sellers to sell.
The customisation system allows the player to wear items they collected from quests or the market. This mechanic used a lot of the UI functionality from the market adapting to display the customisation-items on the tiles. The player's penguin occupies half the screen, with slots to equip items. In scene the item gets added to the players object, gets positioned, rotated, and scaled and deleted when un-equipped.