King of the Casino

KING OF THE CASINO PROTOTYPE BUILD

https://drive.google.com/file/d/1yGBCZS5MkaTboo71V7cix9iYZ9KOfGyE/view?usp=sharing

Blog Post Postmortem

For this prototype, I was the programmer and responsible for the car, the camera and the slot machine interaction. This was actually the perfect opportunity for me as I want to prove myself that I am capable of programming. For the past years, I have been mostly been 3D modeling, but I wanted to do game design more. Wanting to show what I'm capable of, I volunteer to be the programmer for this prototype. Because the car was the most important part of the game, I was tasked to work on it alone. For the past sprints, I was capable enough to work on the game mechanics of the car and succeeded. But that doesn't mean I ran into issues with the car.

The player camera for starters have been changed over time as to suit the game mechanics once they are further developed. The first player camera was simply stuck with the car. But as the sprint went on, it breaks the immersion as it sometimes clip through some objects. So I made a second player camera, which not only follows the camera, but was able to collide with objects smoothly. The last playtest revealed that they want the camera to be controlled by them in order to detect enemies. Hence why the third and final camera was created known as a FreeLook Camera. This would have the player move around the car so they can look for any enemies chasing them. 

I was also able to have the car be able to flip over automatically. This would help the player to ensure they won't have trouble trying to flip back up manually. There was barely any issue with the flip throughout the sprints, so I consider that to be successful. 

The randomized control script that I added to the game, works as well. This would have the car switch from keyboard to mouse controls. Like the car flip mechanic, the random controls mechanic was able to worked throughout the script. However, playtesters had consider the mechanic to be pointless so it was removed. But I still consider it to be something I was able to accomplished during development. 


The car itself was absolutely something I was able to get it right to the end. The car is what the players would drive for the rest of the game, so a lot was riding for this car to work. Throughout the sprints, I was able to the car mechanics to work despite some issues. 


As for game mechanics that went wrong, one of them was the slot machine mechanic. While interacting the slot machine worked just fine, it was the UI that was completely removed. Originally there was a plan where whenever the car hits the slot machine, a UI would show up to reveal the result from the machine. However, I was focused on getting the car mechanics to work that I had to put that plan aside. I expected this to occur as I was not familiar to making this kind of script. It was also more of a side task then a necessary one as well. 

While I got it to work, the speed of the car has been an issue throughout the sprint, but I managed to get it to work in the end. The car runs with wheel colliders which abide by physics. And because the car doesn't go forward by a keybind, it only moves on its own, but very slowly. Even when the car was at the top speed, whenever it turns, it goes back to being slow.  This had become a major issue when the enemy managed to catch up to the player every time in the game. This is due to the acceleration, not the speed itself. I figured out too late in the later sprint that I had to change the script. 

What I could've done differently is definitely trying to perfect the car movement earlier. It would have made tasks much faster and efficient to work on. Another thing was communication. At one point during my work with the slot machine, another programmer was working on the power up for that slot machine. We didn't communicate with one another about it until it was too late. Despite it still working, it would've been better if we worked on it earlier. 

This project has been fun, if not challenging, from start to finish. When I volunteered to work on the car, I was worried about not being able to develop the mechanics perfectly in time. But to my surprise, I was able to overcome that challenge and was able to prove myself that I am capable of programming game mechanics. This was also an opportunity to use these mechanics for future games and hoped to build game mechanics like this in the future. 


Blog Post #4

In this sprint, I was able to add a power up and an ability for the player to use. I then came back to working on the slot machine as well, however I took a different direction with it.

The power-up I created was the speed boost. Once the the car goes over the power up platform, a random power up would be given to the player. If it is the speed boost, it would double the speed. Since another member of the team created the power up system, I added the lines that would activate the speed boost. I also added a variable to call the Car Controller script in order to make the script work. Once I was able to call the script, I added in a WaitForSeconds in order to end the speed which is around 5 seconds. In order to double the speed, I simply doubled the current acceleration of the car. However, this power-up script is only temporary as the current car can speed up through acceleration, not speed of the car.

The next task I did was the Jump ability. Once the player hit the spacebar, the car would launch itself in the air. However, the player can't jump again after a 5 second cooldown. This was a bit of a challenge since originally there was a bool value called isGrounded. This value would detect if the car was grounded so that the car won't keep jumping through the air. However, upon adding the value to the script, I noticed that the value kept being checked and unchecked every time. This was confusing at first, but I realized that it was detecting whether the collision box of the car's body is grounded or not. But since is body of the car is off the ground most of the time, the script wasn't able to detect that. To solve this issue, I have the script to have the car be grounded at the start of the game, that way it won't be marked as grounded or not every time the player drives. 

My last task was to finish the Slot Machine script. When the car interacts with the slot machine, the output would tell the player whether or not the player earns points. This was difficult mostly due to miscommunication with one of the members of my team. We both have completely different ideas on the slot machine and I had to scrap the original in order to fit with his power up which was to double the points of the slot machine. We both work together to make a workable Slot Machine by simply adding a randomizer. However, despite the script being able to work, we didn't have a UI for this mechanic, so this will be resolved in the next sprint.

This sprint has been challenging, especially my last task and there were problems that were still occurring. But hopefully in the next sprint, that will be changed as we are close in finishing up the prototype. 

Blog Post #3

For this sprint, I had been mainly focus on the mechanics of the car. Since there wasn't a lot of unique movements to the car, I was tasked to add more before moving on to other game mechanics.

I began by focusing on the car more. The task was to make a randomize movement for the car, meaning that the game will change the keybinds at random moments. In this case, instead of keyboard controls(A/D), it will switch off to mouse controls(LMB/RMB). To start off, I set up a randomize timer in the car script. This timer will indicate when the controls are going to be switched.  The process of getting the script to work was a bit difficult as I have trouble figuring out how to move the car using mouse control. I even had to use an alternative control in case I couldn't be able to do so. Luckily I managed to find a way to make it work and wouldn't have to use it alternative control at all. 

Another task that I worked on is adding gear shifts to the car. Instead of holding W, the player will only have to tap W in order to move forward. The same result will occur, if the okayer tap S only backwards. To script this, I added an if statement in which if the player tap W, the current acceleration of the car would equal to the max acceleration. If the player tap S however, the current acceleration would equal to the negative acceleration, causing the car to go backwards. This was definitely something new to me as I never deal with having a movement to occur by just tapping a button instead of holding. The process in making to work is not that hard since I just simply use a different KeyCode function than what was usually done for the rest of the movement controls.

The final task for Sprint 3 is adding an indication to know when the car is going to switch the keybinds. The way I go through with this is by simply adding a sound effect. I first look for the right audio to use from online and added in the game. I added the audio into the script in a line where the switch is going to occur. 


This sprint has been a learning experience for me as I had to deal with programming something that I have never tried before and only to have been successful as well. Hearing from the playtest results, the problems that are occurring with the car is that the car doesn't flip as easily as it should and the car acceleration which slows down whenever the player turns. So I will be improving on that. Once I am done with the main controls of the car, I will move on into focusing on power ups and getting the slot machine to actually work.

 


Blog Post #2

This week I worked on a workable car and slot machines. The process of making a car with unique movements turns out to be simple than I thought. As for the slot machine, it was a bit of a challenge as it was the first time I ever done something like this. 

Since I already made a workable car, there are a few changes I had to make in order for it to have a unique movement. First off, there are no brakes, meaning that the car must kept going and never stop. In the script, there is a line in which the player is able to control to go forward and backward (current acceleration = acceleration * Input.GetAxis("Vertical")). Since I don't want the player to control the speed, I deleted part of the line, keeping it just as "current acceleration = acceleration". That way the player has no control and can't stop the car. However, the only problem is that if the car ran into a wall, it can't reverse. The solution I came up with is having a new input, in which if the player hits "S", the player can go in reverse. 

Now that I got the car to work properly, the only problem is when the car flips over. When the car flips over, the car won't be able to flip back up. This can be a problem as the player can't continue playing the game unless it's flipped. Using the same car controller script, I created a new function called detectUpsideDown(). This function would detect if the car flips over. I also added a Enumerator called flipsCar(). Once the car detects that it is upside down, it would activate the enumerator in which the car will be able to flip over. The only concern I had with the car is that whenever it gets flipped over, the player camera shakes with the car. To avoid that, I added a cinemachine camera to not only be separated with the car, but can also follow and look at the car. While the car is still shaking, the camera wouldn't be able to shake with it. 

The slot machine was a bit tricky to deal with as it was my first time making a randomized generator. Following up from the last blog, I realize having three scripts in each row is actually possible. Instead, I have to make a new script, that will reveal the result of the numbers once they are stopped. To make that happened, I added "RowsScript[] rows" so that I can keep tracked of the three scripts from each row. I added a function where the results will be announced. If there are three "1"s in a row, the player will win 100 dollars. If there are three "2"s in a row, the player wins 200 dollars. While both scripts worked, the problem that it was having was that it announced the results before the slot machine stops. This had been a problem since and still ongoing. 

There are still some problems to deal with, especially the slot machine. While the car movement works, there was nothing unique about the movement. However, I planned to make a randomize movement for the car, in which the player will have to use right/left buttons instead of the A/D keys. As for the slot machine, I of course have to fix the problem where the slot machine announce the result before it stops. 


Blog Post #1

In this assignment, we are tasked to create a prototype game that requires a different set of movements instead of basic walk, run, and jump movements. Our team came up with a game called King of the Casino. In this game, the player would play as a crazy guy trying to lose money at the casino, while driving a broken car from loan sharks. Because I am the programmer of this project, I am responsible to create not only the broken car, but create a special movement for it as well. However, while simultaneously scripting the car, I am also tasked to work on a physical prototype of the game at the start of the Sprint.

Due to the requirement that I must worked on the digital and physical prototype of the game at the same time. I began testing out both the slot machine and car movements before official tasks comes in. Over the summer, I worked on a working car prototype so I decided to use that prototype for this game. I originally scripted the car to have the basic movements: acceleration, turning, and brakes. The only issue I ran into was the physics of the car movements. The wheels suddenly turned horizontal and could barely moved at all. Luckily, since this game is only just a prototype it isn't required to add any wheel physics and it was already working before as it intended. 

The next mechanic I worked on was the slot machine. I scripted it as a user interface as it was planned to be interacted by the player in order to play the slot machine. For the script, I added numbers to be used as slot numbers. Despite it working successfully, this was only temporary as the slot mechanic required to have three of the same scripts in each numbers, which wouldn't work as a fully working slot mechanic. 



The first task I worked on for this sprint is working on tokens for the physical prototypes. These tokens are hazards, power ups, and the player character. The first token I created were the hazard tokens. The purpose of these tokens is to create obstacles for the player, making the map for challenging. To make it a hazard token, I added yellow lines to indicate that they were obstacles. One issue that I ran into like the rest of the tokens were the shape of them. The grid map that was created for the physical prototype was supposed to be one by one inch for each square. However, because I have limited tools to get the right ship, I had to guess that it is the right size to cut the tokens up. 


The next tokens I worked on are the power up tokens. Each tokens represent different power ups: Double Points, Jump Boost, and Sabotage. Like the hazard tokens, I have problems figuring out the right shape. But a solution I found to creating the same shape for the rest of the tokens is by folding them in order to match it with the outline I drawn in. That way I can cut up the papers to make it so that they all have the same size and shape to the best of my ability.

The last token was the player character. The purpose for this token was for the player to use in order to play. Unlike the rest of the tokens, this was planned to be stand up on the grid instead of facing down. Based off the concept art that was given to me, I drew the character to make it accurate. Because this is only used for the physical prototype, the digital prototype requires to have a car as the player character and not the character itself. 






For the next sprint, I moved on to work on the digital prototype of the game, starting with the car movement which is currently what I'm working on at the moment.









Comments

Popular Posts