Race & Share
Race & Share is a race track building and sharing game where players get to build their own tracks, share their tracks and complete against their friends.
Track Building
One of the first things I remember learning about when looking into PCG was about generating meshes around a spline from a Unite 2015 talk by Freya Holmer. Since that point I must of recreated generating a road 4 or 5 times, improving the scalability, implementing flexible road width and curb widths, but I had yet to make a game that made use of generating a road yet. So I decided to create a game with the purpose of letting the player create their own racetrack and being able to play on it.
This track generator uses Nodes to generate the track off of. Each Node has a location, which is snapped onto a grid, with a forward and backwards position too. Each segment of the track creates a Bezier curve between 2 Nodes, to create a smooth curve with. I make use of a node manager to store the current Nodes in play, as well as to handle the logic for deleting, moving or changing the Node generation order, then pass the updated nodes into the mesh generator, which updates the segment of the track that corrosponds to those Nodes for efficiency rather than updating the whole track.
There are also a couple things that are done for the player to help make the whole process of creating a track feel easy and smooth. The first is a relativily simple thing, where the nodes snap to a grid. The scale of the grid can be changed, ranging from 1 unit spacing, 2 units and 4 units, which lines up with the grid texture that the player sees in the track editor. Nodes rotations are also calculated when creating new Nodes, using the angle to the new Node from the previous node to give a rough idea as to where the angle should be for the user. In terms of accuracy, in most cases the desired angle is within 30 degrees of the calculated angle from when I was creating tracks for the game. The final thing that helps players create a track is constraining where a Node can be place. Nodes can be placed anywhere in front of the previous Node, anything behind this causes the mesh to overlap with itself, and so contrainting where a Node can be placed helps generate tracks that look right and don't clip into each other.
There are some limitations with a system like this however. It only works on a closed circuit as each Node has to connect to the one before it, limiting the types of theme to really set around the track, and while with extra time a solution could be created to fit multiple connections to nodes, at that point a more prefab oriented approach could be faster and more efficent for generation. Redesigning the way in which the system works would lead to more complex track layouts, with the ability to create shortcuts between sections for the more skilled players, which in turn could improve the enjoyability of the game.
Racing
Now it wouldn't be much of a game without being able to actually drive around the track. Player controllers are something that I've not had much experiance with creating yet, and so the controller used for this game may have some flaws because of that. I remember seeing a tweet from @KenneyNL which showed a behind the scenes look at a car controller he had made, using a sphere that rotated which created the movement, and than a mesh that updated to the position of that sphere. The movement that was created feels good and responsive to the player, but by itself it just felt like it lacked something.
The thing that was really lacking in the current controller was really adding juiciness to it. One of the first things I added was particle effects when the car drifted, informing the player through visuals that they we're drifting as well as the direction they were drifting is. Just like Player Controllers, I haven't done much with particle systems before, and so wanted to keep it very simplistic as to what was actually being done, and while it doesn't look the best, it still adds to the controller. The next thing I added was the camera POV, which increased when the player got a speed boost to add to the effect of speed. Without this POV change, it was hard to notice any change in speed, but with this drastic POV increase and decrease it exagurated the change in speed.
Reflection
There is several things I really want to point out and reflect about for this project. Overall I'm really happy with the UI and the tweening that it does to make it feel less flat and more interactive. It's a very small aspect to think about, but I feel like just the little motion that it does feels really satisfying to see. I'm also happy with adding Localisation into the game. Even though I only added a few languages to choose from, it was my first time adding locationation in, and its a super easy process to do. The final thing I really like is the terrain. I generated it in a way that felt like it was funnelling the player down into the track, and was a rather simple terrain generator just to make racing feel less flat.
There are a couple things that I am not happy about in this project aswell, and these points revolve around the sound and music used in the game. Trying to find free sound effects and music that fit the feel of the game was rather difficult, nothing seemed to suit the pace of the game, which just ended up leaning to me picking something that sounded okay rather than great for the game. The same thing happened with the sound effects too. The sounds of the game is something I really want to change, I feel like they don't improve the game but actually make the game feel worse, but it's just trying to find the right sounds to fit the theme and pace of the game while not spending money on it.