First Upload
Hello, this is me again.
Here is the first upload of my second Unity Project. In this project, I have to use multiple tools, and fulfill some requirements: the game should be a 3d local multiplayer game that uses navmesh, scriptable objects, animations, blend trees, lights, materials and raycasts. My brother gave me the idea to recreate the game "You suck at parking", but as a multiplayer game. What a fun concept.
In this game, you are driving a car, and should park on parking spaces around the map. While one of your cars is standing on one those spaces, you gain points, and the more car are parks, the more points you gain. In order to occupy the most spaces possible, you can drop your car and spawn with a brand new one, because indeed, droped cars can still give you points.
This project two weeks ago. Last week, I was helping people following the same trainging as me. It is was their first week on unity, and they started their twin sticks shooter project. I still had time to continue this project.
Here is the schedule of the two last weeks:
Monday: Morning: - This morning, I updated my itch.io page, wrote the devlog and published the youtube video for the 3rd version of The Binding Of Monfiac.
Afternoon: - I completed a lot of defintions in the lexicon that was given to me the first week of training.
- We determined, with my instructor, on what I should work during the second project.
- I created the new project.
Tuesday: Morning: - I planned what the game should be, what the players would be able to do, what would the objectives of the game should be...
- Like during the previous project, this first week was dedicated to the 3 Cs: Camera, Character, Controls.
- I created the car game object and implemented the controls with the new input system.
- In a first version of the controls, the right trigger was setting the car's rigidbody velocity, while the left stick was setting its rotation.
Afternoon: - I changed the left sitck control to indicate the direction the player want to rotate to instead, as in every car game.
- I really struggled with the physic during this afternoon. I wanted the car to have a set maximum speed that you could gain with the right trigger, but I also wanted the car to be impacted by gravity. Meaning that if you were going downhill, you could exceed the maximum speed.
- I was starting to recalculate gravity force, to know how much of an impact on the car speed the gravity has, and the right trigger as.
- Instead of going for this method, I kept the ingame gravity, and the trigger was no more setting the car velocity, but was instead applying an acceleration force on it.
- Here I was left with two issues, I couldn't get the amount of speed given with the right trigger, and the car was flipping on itself during turns. I even ended up with a car rolling over itself during straight line accelerations.
Wednesday: Morning: - I made a fix for the first of those two problems. Before giving speed to my car, I used dot products between gravity and the car direction, and between its velocity and its direction.
- This fix left an other issue, because when turning, the car velocity isn't colinear with its direction, and therefore the player can gain more speed than he should.
- The car was rolling on itself because of the torque that was applied on the car when giving it acceleration. To fix that, I simply change the shape of the car.
- At this point, there was no limit on the amount of speed the player could get from the right trigger. The car was getting way to much speed because of that.
- I changed some values of acceleration, speed, breaks deceleration.
Afternoon: - I used a ray cast, shooting down the car, to detect when the player was on rollable surface. - I learned about gizmos, and draw a line during the OnDrawGizmos method to symbolize this raycast.
- I used the right joystick to move the camera around the player.
- As in "You suck at parking", I added the abilty to the player to let the car go and respawn with a new one. The dropped car is still on the map, but can't be driven.
- You can check the state of the game at this point with this video : https://youtu.be/hKHha81EUoE
- I mapped the player input manager for local multiplayer. New player can join with a new car, and the screen will split correctly.
Tursday: Morning: - For the first time, I used the screen space - camera as a render mode for the UI canvas.
- I created the charging picture during car reset.
- I created the parking spaces. It simply is a collider that increments the points of the player parked in it.
Afternoon: - I created the spawn class, determining the position and rotation of each players when they respawn.
- I made the point system, so that all player gain points while their car is on parking spaces.
- I reworked the parking spaces so that if two players are on the same space, none get the points. However, if one player has multiple cars on one slot, they only count as one, and don't multiply the amount of points gained.
Friday: Morning: - I made the points panel, with a slider, and a text growing in size, based the amount of points the player has.
- I learned about materials, and made a custom material for the parking spaces.
- We detected a lag issue. When the game was lunching, and at some moments during gameplay, there was some real performance issues.
- I used the performer in order to detect the lag source. Unity Editor was indicated as the most costly part of the proect. We decided to wait for the first build to check if it was indeed laggy or not.
Afternoon: - We try to fix the lag issue, by replacing the terrain with a simple quad. Indeed, the terrain was composed of many triangles, while a single giant quad is only made of twos. It wasn't the source of the lag :/
- I had a lesson on scriptable object.
- I used a scriptable object to save data, and in this case, to save the ids of the winning players.
- I had as an objective, to complete the first gameplay loop for this week. I made it, and created the end of game screen.
- The first gameplay loop now finished, I made the first build.
- Unfortunately, the lag issue was still there.
And here is the schedule of the second week.
Monday: - I solved the lag issue. The problem was not coming from the game. The issue was that my computer was on energy economy mode when it was not pluged.
- I started the main menu, with the joining player menu. This menu is divided into 4 panels, where the players would be able to select their car color.
Tuesday: - I made the link between the joining menu and the in-game scene.
- I used the scriptable object to save the data suirrounding the players: their device, control scheme, id and color.
- The player could now choose a color during the join menu and state themselves as ready. Once every players are ready, the game lunch itself, and the players are joined manually.
- The players were joining correctly, with a car of the right color spawning for each player, and their controls correctly set.
- The screen was not spliting correctly. When joining manually, the different cameras were not placing correctly, and weren't set to the correct size.
- I tried to fix this issue by modifying the rect of the different camera manually using the Rect.Set method, but it wasn't working.
Wednesday: - Instead of using the set function, I wrote rect = new Rect(x,y,width,height), and this fixed the splitscreen issue.
- I used multiplayer event system, one per player, to limit the action of each player to their own color selection.
- I added a play button (to access the joining menu) and a quit button to the title screen.
Thursday: - I added the possibility for all the player to quit the joining menu by holding b, with a picture filling in the middle of the screen.
- I searched and changed the title font to this font : https://www.dafont.com/jungle-roar-2.font?text=Honky+Monkey
Files
Get Honky Monkey
Honky Monkey
Local multiplayer game. Stay in the parking spaces.
Status | In development |
Author | NoisetteTresChouette |
Tags | Local multiplayer, party-game, Unity |
More posts
- Update V2Jul 24, 2023
Leave a comment
Log in with itch.io to leave a comment.