DODGY DOUBLE DECKER

dodgy

double decker

I created a project for Advanced Higher Computing, it is worth more than half of the final grade. It must be one section of the course linked to another. I chose a Software that would integrate with a database. I came up with a few different ideas spanning from 2D puzzles to fast paced driving games. The one I expanded on was Dodgy Double Decker.



My initial idea for this was a London double decker red bus picking up passengers in a fast-paced game akin to “Crazy Taxi,” from a top-down point of view, an ongoing timer from about 5 minutes. Delivering passengers to their location will add points. Crashing into walls and other cars/ falling over will increase your time either naturally or by adding onto timer. The camera would follow the bus and the floor/city would move and scroll. Bus would be controlled with arrow keys/WASD and space to brake. Camera rotates to face bus front. An arrow points from centre of bus to passenger destination so you know where to go. Bus would flip over if going too fast when turning. A UI will show you what destination to go to. The destination will be calculated with the greatest number of passengers wanting to go there. Stores username, highScore, fastestDropOffTime, avgDropOffTime.

Before I continued, I made a feasibility study analysing economic, technical, legal and time constraints. In conclusion the project is economically viable as none of the required programs cost money and any documentation is free. All required hardware and software are readily available, and both the school and my personal computer can run any needed software. The project is legally feasible as I am not selling it or distributing it to a wider audience. I will have enough time to complete this project accounting for holidays prelims and extra time for unforeseen situations. Overall, this project is feasible.

The idea eventually evolved into a 3D bus driving game with 1 predesigned level, object-oriented program with an array of objects. This game will be able to calculate movement from the keyboard and each wheel, taking into consideration of gravity and other objects, while inside the level. The user must be shown the game through a camera which hovers over the bus in 2 different ways depending on a toggle. When the bus enters a bus stop the game must allow the user to pick up passengers and add their destinations to an array. The user must be shown an arrow, pointing to the direction of the bus stop with the most destinations. The game must calculate money based on the distance between the passenger’s collection point and the passenger’s destination. The game must count down from 3 minutes and when it finishes it will end the game, displaying the final score and a leader board of everyone who has played the game. The leader board must display a name and their fares along with bonus values such the game must have a main screen with a play, quit and leader board buttons. During the game the user must be able to exit to the main menu, the user must be able to change the camera view from a racing perspective to a top-down arcade perspective. The user must also be able to see the time ticking down, the money they have and the list of destinations that the passengers want to go to, sorted from most passengers to least passengers with insertion sort. This is not the final idea as I am constantly iterating and tweaking it.

I created a functional requirements list split into inputs, processes, outputs/ user interface. I conducted a survey with eighteen responses about the colour scheme, art style, inputs, technical features, level design, sounds, and non-player characters. Once all feedback was collected, I got the end-user requirements.

Next was the design section, I must design the user interface design, advanced higher concepts, and the database design and queries. Lucid chart was used to create my UI with readability for further screens in mind while still maximizing the viewing experience for the game.

I am currently still working on the database connectivity as I am using Unity and C# to make the game and I have no experience with integration with SQL for it. There is over 1500 sections of documented implementation and fails and more than 5000 lines of code, so I do not intend to explain it all here so I will list them:

  • Created models for buses, bus stops, and pedestrians on Blender.
  • Bus with wheel colliders that move with WASD; each has a motor force and friction, and the front two have a steering angle.
  • Added UI for the main game, speedometer with the magnitude of the forward velocity changed from m/s to mph.
  • A moving camera that follows the bus with a dampening effect zooms out when moving faster. Pressing the change view button will toggle the viewpoint from a racing to a top-down view.
  • Added UI for the main game: when the bus falls over, it can be reset to an upright position with a cooldown of 5 seconds where you cannot control the bus.
  • Created UI for Main Menu with play, quit, and leader board buttons; pressing play will change the scene to the main game; pressing quit will close the application; the leader board has no implemented functionality.
  • Added UI for the main game, with a timer from 3 minutes; once time goes to 0, it will record your score and change the scene to the main menu.
  • Added bounding boxes for bus stops where passengers can spawn; passengers spawn randomly between 1 and 10 seconds but will spawn 1 at every bus stop at the start of the game. It will pick a random spot. Check if that spot has no other colliders with passengers, and then create a new prefab with the passenger model.
  • Added UI for the main game: once the bus enters the bus stop, it will change the camera view to top down. Set the follow object of the camera to the bus stop so the bus moves independently of the camera.
  • While inside the bus stop collider, it will have a 3-second countdown in which it can pick up passengers by clicking on them. The passengers will then change their tags from pedestrian to passenger and move towards the bus with force. When the bus collides with an object with a passenger tag, it will add 1 to the passenger count on the bus. When it collides with a pedestrian tag, it will delete the collided object and add 1 to the pedestrian hit count.
  • When a passenger gets added to the bus, it will add a random destination from the list of bus stops, excluding the one they were collected at, to one array of the parallel array; the other array will store the collected at the bus stop.
  • Added UI for the main game and destination list screen; it will display all of the passengers’ destinations, grouped by bus stop. It will display the most wanted destination first, then the second, and so on. Using insertion sort, it will display the destination name, followed by the number of passengers wanting to go there.
  • Once the bus collides with the most wanted destination, it will let all of the passengers who want to go there off. And they will have a force in the direction of the bus stop.
  • An angle will be calculated from the bus to the most wanted bus stop. Then a prefab will be created with a pointer model pointing to it. The prefab will be above the bus stop and will smoothly point to the bus stop. When leaving the most wanted bus stop, it will change the angle to the new most wanted bus stop. Nothing will occur if the bus goes to any other stop other than the most wanted bus stop.
  • Added UI for the main game: when delivering a passenger, it will calculate the distance from the collected stop to the destination stop, multiply that by a factor, and then add it to your total fare. This works for multiple passengers being dropped off. It uses a math function, so it will gradually count up to the new amount from th e current amount.
  • Added game over screen; once 3 minutes are up, it will slowly display your total fare.
  • Added trail for wheels. When the wheel touches the ground, this is checked using a raycast. It will display a black trail that slowly disappears using a gradient.
  • Added sounds for an assortment of things.
  • Added functionality for a gamepad controller such as an Xbox or Playstation controller Every keybind for the keyboard and mouse has a button on the gamepad. I created a custom cursor icon and a larger one to use as the controller's virtual mouse. I used a lot of calculations to work out the angle and force of the joystick to move the mouse in a direction, as it is not a 2D plane like a computer mouse.
  • Added post-processing effects such as bloom, motion blur, and vignette.
  • Added a leaderboard screen that connectes to a database that is always online.
  • Link to leaderboard unformatted data website (WARNING: I do not have any moderation for usernames).
  • Added a scrollable table for all of the leaderboard
  • Added a top 3 screen in the main menu
  • Starting work on a new city design