TASKS
- UI Management System
- LED System
- Leaderboards (including working with the Steamworks, Nintendo NEX and PlayFab SDKs)
- Scene Management
- Localization Management
- Settings (including display, sound and language)
- Input System & Input Rebinding
Role
Programmer

Tools/Technology
Unity, C#
Release Date
Various

Links

Nintendo Store
Pinball Lockdown is the predecessor to Pinball Freedom. These are two separate games sharing similar mechanics, I have worked across both projects. Pinball Freedom is due for release imminently. 
LEADERBOARDS

The problem we were faced with the Leaderboard system was that we had a total of 3 different leaderboards, a local leaderboard that would use player save data, a Steam leaderboard for PC users and a Nintendo leaderboard for Switch users. Upon installing the SDKs for Steamworks and NEX (Nintendo) I discovered each of these had their own implementation of how data was displayed onscreen. I created a system using abstraction that would not only break the dependencies between the display and the data, but also gather the data from each SDK and display it in a way that I wanted, unifying the leaderboards into one system.

To do this I created a base Leaderboard class with three children, one for each leaderboard. The Leaderboard classes would extract the data from the relevant server (or save data in the case of local) and store that data. An additional class LeaderboardDisplay was created which would house the implementation for initializing and displaying the data each leaderboard held within, following the Model-View-Controller pattern.

One challenge I faced with the Leaderboard system was the data we were requesting from the servers needed to be called asynchronously. This clashed with the polymorphism within the system and violated the SOLID principles. Multiple functions would need to account for this by creating a duplicate function, one of the async operations and one for the non-async operations. My solution to this was to make all leaderboards asynchronous, the impact on performance was minimal and it helped to maintain structure.

Recently I have resumed work on the Leaderboard system in preparation for Pinball Freedom's launch. The goal is to use PlayFab in place of the Steam and Nintendo frameworks, further unifying the system.

UPDATE: I have since implemented PlayFab leaderboards replacing the need for Steamworks/NEX. I centralized a lot of the work to a LeaderboardManager class that is now responsible for initialising and managing the leaderboards themselves, and have employed dependency injection where possible to cut down on coupling. It still uses polymorphism at its core, but now classes such as the LeaderboardDisplay and ScoreEntry are only responsible for transforming the data passed to them.
Leaderboard Manager class

Leaderboard Display in game

LCD SYSTEM

The LCD is the graphical display that shows the player their score and updates them throughout the game with events that have occurred, for example: ball lost, mission progress. When I started work on Pinball Lockdown it included a rudimentary implementation of an LCD System, only basic text was available for use and the associated code was quite deeply baked into the main Game Manager class with heavy use of random access.

I rewrote the system, removing the code from the Game Manager and in turn breaking that dependency. I created an LCD Manager class that stores each item to be shown within a queue. The items to be shown were no longer basic strings, but rather a reference to a GameObject, allowing me to make use of Unity's Prefab system. Now we could show almost anything within the LCD and add additional logic if needed, particle emitters, player input, mini-games to name but a few. However, we made the most use of it with animations.

The LCD Manager class itself it's straightforward. It holds all GameObjects to be displayed within the queue, each GameObject has a duration, once the duration has passed it is removed from the queue and the next item is shown. I also implemented the idea of a base screen, the base screen would be shown if the queue was empty meaning the LCD would never be blank, a perfect place to put the player score. The manager has two methods it uses to display GameObjects, QueueScreen and OverrideScreen. Queue will simply add the GameObject to the queue awaiting display, Override will clear the queue and display the GameObject immediately, useful for things such as Game Over or Tilt. 

LCD Manager Class

Pinball LCD Before and After LCD Manager

INPUT REBINDING

I implemented the input system shared across both games, I created a finite state machine that allows for different input dependant upon it's current state. This in conjunction with Unity's input system allowed actions to be bound to different keys/buttons for multiple platforms, with the ability to change the action performed at runtime.
Due to player feedback, I also created a system that allowed to keyboard rebinding. Some players had a set-up that replicates using a real pinball table, but the input prevented them from using this with our game. The system used Unity's Input System rebinding extension as a base, but heavily modified to suit our needs. I created a wrapper class that would leave the core functionality of the rebinding to the extension and created an abstraction that would allow the user to interact with the system.

UI MANAGER

I created a UI Management system based around a base class UIScreen. UIScreen and it's children hold information pertaining to each individual screen, whether it be a pause menu or player HUD. The UIScreenManager then polymorphically manages which screen is currently being displayed to the player. I was also responsible for the design, creation and layout of each UI element within both games.

Each UIScreen used virtual function for input and events such as entering or exiting the screen. This allowed me to tailor each screens functionality by simply overriding the relevant function. A good example of this is the Pause Menu class that needs to pause and unpause the game upon entering and exiting.

Each UIScreen also has a List of Screen Prompts associated with it, Screen Prompts are a list of actions the player can take and the associated button they must press to take that action, for example Esc to exit the screen. An example of this can be seen in the Leaderboard screenshot above. 

UI Screen Manager class

GALLERY
Sci-Fi Table
Sci-Fi Table
Sci-Fi Table
Sci-Fi Table
Fairytales Table
Fairytales Table
BMX Table
BMX Table
Vegas Table
Vegas Table
Leaderboards
Leaderboards
Language Settings
Language Settings
Table Guide
Table Guide

You may also like

Back to Top