Game Design Talk #1


Hello guys! Long time no see today we wanted to share with you guys our thoughts and how we coded each feature of our game.  Bare in mind that this post will have a lot of content but we hope you guys will enjoy it!


The bus movement:

When programming for the bus movement we first made the bus move but that did not work as intended since the navmesh (the area NPCs can move on) cannot be moved at all due to unity constraints. To combat this, we decided to make the world move instead. 

The bus movement works in a 3 lane system that is controlled by the steering wheel so when the wheel value is 0 it will go left and when 1 it will go right.

The speed of the bus is controlled by the slider, so depending on the value of the slider it will take that value and multiply it to the bus speed.

 The Bus stop docking:

The bus docks by a series of colliders. 

Box 1 and 2 makes it so that the wheel and slider position is set back to normal and the player cannot move the bus at all. It also triggers an auto docking animation that plays to notify the player of the auto docking process.

Box 3 and 4 will bring the bus to move next to the bus stop when the bus collides with it.

Box 5 will stop the bus movement and only when the passengers get on, the bus movement will be activated again. It also stops the animation of the auto docking.

Letting the passengers on:

The code for letting the passengers in at the early stages was not working as intended because if the player let the bananas on at the first bus stop, it will let the other bananas from other bus stops on as well. 

To fix this, each individual bus stop has its own script to allow the player to let the bananas onto the bus via a VR button at that specific bus stop.

Passengers interaction:

Since all passengers are going to have the same function except for their special interaction, we made a base code that does these following features:

-Walk to the cockpit and give the ticket

-Walk to the seat

-Ragdoll or flinch when the player hits it

We have also coded it so that the passenger plays the correct animation and dialogue depending what state it is in.

The hardest feature for the passengers in general would be the ragdoll function, as we needed to figure out how to make it ragdoll smoothly and it stood back up from where it fell to.

For the special interactions the most difficult one to code was probably the rotten banana as we need to make a coroutine (a function that makes things happen in sequence) to slowly turn the banana skin to yellow then to brown when the player shoots at it. There were some bugs and errors but eventually we finally made it work.

Each passenger has so many variables and bools (true or false statements) and etc so it was very hard to keep track of what is what when coding a new feature or figuring a bug out.

Obstacles:

There are only 3 types of obstacles and each one of them will make the slider and wheel go back to the desired position so the player can change lanes or the speed again.

The car and boxes obstacle basically work with the same principle, if the bus crashes into it the wheel and slider position will be reset causing the bus to slow down.

Get Ordeals On The Bus

Leave a comment

Log in with itch.io to leave a comment.