RENTAL CAR DERBY

A top-down driving game where you must dodge other cars and avoid hitting obstacles to survive the demolition derby.

Team Size: 4

Dev Time: 1 Week

My Contributions

Try the game for yourself! Download available on itch.io

https://team-quest.itch.io/rental-car-derby

Retrospective

Theme and Concept

This project was originally intended to be done as part of the Game Maker's Toolkit Game Jam 2023, but unfortunately, scheduling conflicts meant that we were unable to participate. A couple weeks later, we decided to make something anyway and use the theme from the jam, despite not being able to submit to the actual jam. The theme this year was Roles Reversed.

We came up with a few interesting ideas, and the concept we eventually chose was a driving game where the player has accidentally ended up participating in a demolition derby in their rental car, and must try to take as little damage as possible so that they don't end up in debt. I believe we did have a few other ideas that fit the theme a little better, but this one sounded like the most fun to us, which is the most important thing really.

Movement Physics

I was responsible for programming the car movement. We knew that the game was going to be in a top-down 2D perspective, with no movement on the vertical axis, but would be rendered in 3D space so that we could take advantage of the car models we had access too. For this reason, I decided to find a tutorial online for a 2D car movement system in Unity, implemented it, then translated it from using 2D physics to 3D physics.

The team asked me to design the car movement so that it controlled similarly to the Warthog vehicle from the Halo series, which if you don't know, drives forward in the direction the player faces with the mouse or joystick. I initially thought that a system where the car drives towards the direction of the mouse cursor's position on screen would best mimic this behavior, but then they also asked me to use the WASD keys for movement. By my interpretation, the best way to satisfy both of these criteria was a system where the car turns to face the direction of the button currently being pressed, e.g. if the player presses the W key, the car will start driving forward while also turning until it is facing the upwards direction.

Graphical Effects

I was also responsible for creating all of the 2D graphical effects in the game. I used Unity's particle system to create various effects, including the exhaust's on the back of all the cars, the fire that appears on the player's car after they wreck it, the explosion that occurs when a red barrel is hit, and sparks that appear when cars collide with obstacles. I also created the effect of tire tracks left behind when the player performs a drift.

Mechanics

At this point in development, the game was simply a player car avoiding AI controlled cars in an enclosed and empty space, and we decided that the game needed more things for the player to avoid than just other cars, so I set about creating a few different kinds of obstacles.

Firstly, I put down some static barriers to define a general layout out for the arena. After that, I started placing more barriers, this time comprised of multiple tires, which differ from the normal barriers in that they are not static and can be pushed around when cars collider with them. This creates a sort of soft barrier that the player can potentially move through after the tires have already been knocked around a few times. They were also given physics properties that make the player bounce away from them.

The second obstacle I made was the explosive barrel. These are placed all around the arena, and when a car hits one at a high enough speed, it explodes and deals a ton of damage. I added these because I wanted more opportunities to use the explosion effect I had made, as I think having explosions going off around you as you play helps sell the sense of thrill and danger that this game is going for. It also adds an extra element of challenge to the game, as hitting one has a devastating impact on the player's health and can easily ruin a good run.

The last obstacle I made was the mud puddle, which slows down any car that drive through it. To do this, I created a system where a car that enters the collision area of a puddle has it's movement properties changed. This involved taking all the fields that make up the movement properties of a car, putting them into a separate class that is referenced by the car's movement class, and then allowing that new class to be swapped out for another one during play.

I added this mechanic because I thought it would be a good idea to have an obstacle that slows the player down, allowing the AI controlled cars pursuing them to potentially catch up. After implementing this mechanic, I realized an unintended effect that I think made it even more interesting than I thought. If the player can take advantage of the AI's follow behavior, they can lead the other cars into a puddle and slow them down whilst avoiding the puddle themselves, giving them a chance to escape.

Assets

Now that the bulk of the game was complete, I started looking for assets. I sourced all of the sound effects in the game via free online resources. After implementing the car engine sounds, I noticed that it didn't sound quite right, because engine sounds in real life change depending on how fast the car is moving, so I added a system that alters the pitch of the car engine on the fly, based on it's current speed.

I also found most of the music used in the game. We decided on a vibe for the game, which was fast paced and exciting rock music to match the high energy nature of the game itself. All of the tracks used in the game were originally normal music pieces that I then edited to make them loop seamlessly.

When it came to making the arena around the level, I originally intended to use Unity's ProBuilder system to make it, however art is not my strong suite, and as I was not satisfied with the results, I thought I might look online for a solution. Fortunately, the same website where our team had already sourced the car models from also has models for an arena that was perfect for our game, so I switched to that instead. It was a shame to let that earlier work go to waste, but this would ultimately make the game look much better.

Level Design

Now it was time to use the arena and all the obstacles I had made earlier to figure out a final layout for the level. I started by laying out the static barriers, as these would inform the general flow of movement through the level, given that you cannot pass through them.

Then I added the tires, forming more barriers to help break up the map into smaller sections. In some cases, I deliberately made the gaps between tires slightly larger to give the player a chance of squeezing through them with enough precision. Also, I found during testing that driving around the edge of the arena was a pretty decent way of avoiding other cars, so I also made sure to put a few barriers around the edge to prevent this.

I tried to place the explosive barrels in places where I thought the player would frequently go. I looked at the way in which traffic flows through the level based on the existing barriers and identified the gaps between those barriers where the player would often be funneled through. Also, I mentioned before that I wanted to prevent the player from just driving around the edge of the arena the whole time, and for that same reason, I put lots of explosive barrels around the edge to make it a more dangerous place to be. I often made sure when placing groups of barrels to leave gaps just big enough for the player to maneuver through them.

Lastly, I placed the mud puddles in any areas left over that had large open spaces. I didn't want the player to find an area big and empty enough that they could just drive in circles and still avoid other cars, so it was important to fill out the space as much as possible. This is also why I made the puddles quite large.

Additional Work and Polish

By this point, the two days that we had allotted to this game jam were up, and I was not satisfied with were the game ended up, mainly because I knew it was very close to being finished. After communicating this to my team, we all decided we would continue working on the game after the deadline until we felt it was good enough to really show off. This took a bit longer than everything before it, as most of the team has other commitments, but we spent what free time we could spare over the course of the next week or so polishing up the game.

One of the big things I wanted to add was a crowd in the arena stands watching the derby. As I mentioned earlier, art is not my strong suite, so after a bit of research and some careful consideration, I decided to go for a very abstract, minimalist approach with the crowd, using a basic circle sprite to represents the heads of people. For the sake of variation, I added a system that randomly generates a skin tone for each individual head in the crowd when the game starts up. Also, while each head uses the same basic bobbing animation, I added code that gives each one a unique starting time, so the movement doesn't look too uniform.

Another big feature I wanted to add was the stunt system. The objective of the game is to take as little damage as possible, which is measured by how much debt you owe for damages to the car. I had the idea that the player could earn prize money by performing stunts, like going at top speed, driving close to other drivers and explosive barrels, etc, and the money earned would offset their debt in the end. This adds an element of risk and reward, as it incentivizes the player to do dangerous stuff that could cause them a lot of damage, but if they succeed, they can potentially get a better score at the end of the game.

I also updated the UI so that when you take damage, it shows you exactly how much debt was added in each instance of damage taken, making it easier to see how much damage you are taking. In a similar vein, I then also added the names of each type of stunt you could do to the UI and have them display each time you perform that stunt, so you can tell more easily what exactly you are earning money for.

Conclusion

For a game jam project, I'm quite pleased with how this game turned. It certainly ended up looking a lot better than I was expecting it to, given that we had no artists on the team. I'm also quite pleased with how it plays, driving around and avoiding stuff does actually feel quite fun and exciting. If we were to develop the game further, I think my main goal would be finding ways to make it more re-playable, firstly by adding more levels, and then possibly adding procedurally randomized elements to those levels.

One big takeaway I had from this project is that, while I am very glad we decided to keep developing the game after the initial deadline, I regret that we didn't agree to do that ahead of time, as there was a lot of code we had written that was rushed for the sake of meeting said deadline, and as such, not of the best standard. This made it quite difficult to work with later on when we went back and tried to add new stuff to the existing systems, and required a lot of reworking of older code. It certainly would've been a lot easier to finish had we built the game for extensibility from the start, and that is something I will be taking into consideration in all future projects, even short-term ones such as this.