top of page

Retail Wars

ROLE

Programmer

DESCRIPTION

As salespeople at a retail store fight each other to earn the most and win the favour of your boss. A 4-player local multiplayer beat’em up. Playing as retail workers help customers find items they are looking for while lobbing stock at your co-workers to hinder and steal sales off them. 

My role for the development of this project was programming most of the gameplay and systems which make the game fun and enjoyable. Lots of effort has been put into creating clean and designer friendly systems to create a fast development environment for rapid prototyping and productions.

GENRE

Competitive

Party Game

PLATFORM

PC, XBOX

Systems

Sound System

SoundSystem.png

To make development of Retail Wars easier, I decided to create an audio system similar to one I've used before. This system uses enums instead of direct references to audio clips to remove the risk created by using direct references. This is because the enums mean each audio clip is only referenced once in the entire project, so if a new clip is needed, it only needs to be replaced in one spot.

To assign the audio clips scriptable objects are used, when the game starts, it iterates over all clips to get their enums and adds them into a dictionary.

When playing a sound, one call to the SoundManager's PlaySound function is made with the enum as a parameter. A position or transform can also be passed in to place the sound at a position or make it move with a transform. The AudioSources are also pooled to increase performance and new ones are created up until a limit as needed.

A custom editor window has also been created to streamline the audio process even more.

Items

ItemsStand.png

The items in Retail Wars are all spawned in at runtime, each shelf manages its own items and spawns them at defined spawn points. When an item is picked up, it calls a respawn function which will create another of the same item in the spot the item was taken from. This respawning mechanism ensures that there are always items to take while still making it look like the item was taken.

When picking up an item, the player does a collision check with a sphere to find all nearby items, then the items in range are iterated through to find the closest item. This item then gets highlighted and when the pickup button is pressed, the item becomes a child of the player and disables the ability to be picked up as well as removing all collisions. The use of a collision check means the engine can utilise its built-in collision quadtree to reduce the number of items iterated through, majorly increasing performance.

bottom of page