Project Rider
Overview
I worked on a 2D warehouse arcade prototype game in the last couple months. I had a lot of fun making this one since I got to design a vehicle control movement system for the first time ever. It was a blast! I intended for the gameplay loop to be simple but with some added challenge to it and I am happy with how it turned out.
Goal
The objective of the game is to pick up an order which contains a certain amount of items to pick throughout the level and get those items delivered to the drop off zone. There is a timer that counts down and the player should try and complete as many orders as they can before the timer is up.
Gameplay loop flowchart
Player Movement
This was the part that I was most excited to work on as I have never created a vehicle movement system before. I took a while exploring various other arcade games and saw how they felt to drive around. I landed on a somewhat tank control movement where the player has a gas and a reverse button and can only steer using the left and right direction. The player also can only rotate when the gas or reverse button is held down. You can see how the movement look in any video that I will post in this blog entry.
Controller Support
Playing this game with controller was something that I wanted from the get go. With unity’s new input system it made it very easy to implement controller support. I just had to assign what buttons worked for moving forward, backwards and steering. Currently only have the player movement working with controllers and I am happy how well it has worked out at this point in the prototype.
Random Pick Spawner
I made a system where a random amount of items are spawned at a random location in a list of locations available. How this system works is I have an item prefab and when the player picks up a new order it will randomly choose between a min and max number of items to spawn. The locations are stored in a list and those items will spawn at one of those locations that are not currently taken. It does randomly choose the locations also instead of spawning them in the same order over and over. The video below is a showcase of the spawner system at its early stages.
The blue box is where the player must enter to pick the order up and that will trigger the spawner system to spawn them items.
The white squares are the locations where the items will spawn at.
The yellow squares are the actual item being spawned at the spawn point locations.
Pick Spawner Code Sample
This is the script that handles how the items are spawned and where they will be spawned at. I have a array of transforms which is all of the spawn points and a game object which is the prefab to spawn at those spawn points. I have two functions on how it is handled. One function to choose the location which chooses a random location to be spawned at and the other function to handle the actual spawning of the prefab.
Gameplay Loop Testing
I got the player movement working, I got my spawner working. Only thing I need to complete is a full gameplay loop where the player picks the orders up, gets the items, and then drops them off.
How I handled getting orders and dropping off orders is by creating trigger zones. The zone that is blue in the video is picking the order up, while the green zone is dropping the order off. This was really easy to get up and running as I had the zones detect if the player has entered that zone. If the player entered that zone, handle the functionality.
Countdown Timer
The game was pretty fun as it was but, I felt it was still missing something. That is when the countdown timer was born. It added a feeling of the game being frantic and a need to finish the orders before the time is up. I designed the timer to start when the player clicks a button to start the level and stop when reaching zero. When the timer reaches zero the player will stop moving and the game over screen will display any stats for that current run.