FSGD Final Project Week 10: Fixing Scale, Player Positions and Scoreboard

So this is a couple weeks old. You know how it is. Right now is technically the end of week 12, so I want to talk about week 10 and 11 to be up to date. Week 10 really was just me trying to get minor gameplay features into the game, so our game feels like a legitimate game.

The first thing I decided to do was to make the scale of the game correct. Up until this point, we were using a mage, a test asset, that was about 3 meters tall. This is about 10 feet tall. This meant that all of our other assets (the hexagon and arena) looked really small compared to the mage. So I decided to scale the mage down to 1.8 meters, so that everything was scaled correctly. While it’s easy to scale the mage down, we had to change several different things for our game to be back to normal.

First off, I made the arena soccer field sized because it was way too big given the mage was much smaller. Because the mage’s speed was still the same as before, he was zipping past super fast. We had to lower it a lot to make it feel correct at the scale. Because of this change, the friction also had to change (and til this day the friction to speed ratio doesn’t feel right). One of the last things I did was to lower the speed you threw the ball because you could practically throw it from your goal to their goal. The changes we had to do would bleed into week 11 too because the ball was bouncing way too high and fast, so it was super hard to catch.

Once I got the scale correct, I had to rotate the walls and goals because they were making the arena hamburger style instead of hot dog style. This made our arena into an actual rectangle.

I decided that I wanted the player positions to be final because the players were just spawned in a line on their side. Instead, I wanted one player to be at the center, two to be in the middle of their side at the left or right side, and one right next to the goal. I also made it where every time the team was spawned (due to starting game or scoring), the spot they were spawned into was random.

Lastly, I wanted to get a scoreboard working, so that you could keep track of your goals, assists, and saves. First off though, I had to actually implement this stuff. Most of this was pretty easy as I just had to set up ints in the player controller to keep track of this, and then I just incremented it whenever the player did the respective thing.

The cool thing is save: it checks if it’s within a certain range of the goal, and it also does a dot product on the balls velocity normalized and the goals forward to see if the ball is actually heading towards the goal.

The hard part was setting this up with a scoreboard. I wanted a scoreboard like Rocket Leagues where the board would resize based off of the number of players, so I took Sam’s code that would create a 1v1 scoreboard, and I put it into loops. Doing this to make it where you could have any number of players playing and the scoreboard be dynamic took me into the next week.