Public Transport Simulation Game
Total Page:16
File Type:pdf, Size:1020Kb
Public Transport Simulation Game Software project specification 1 Introduction This document is the specification for the Public Transport Simulation Game software project. The main goal of this project is to create a game about building and managing a public transport system in a city. 1.1 Main design pillars The game will be a 3D, single-player only city simulation game. It will be written in the Unity game engine. It will be possible to play this game on Windows or Linux. When the player first starts the game, he will see a procedurally generated city. In the city, there will be simulated people, who will need to travel between places in the city. Initially, there will be no public transport, meaning that there will be a lot of congestion on the roads, as people will use cars as their main means of transport. The goal of the player will be to build a public transport network from scratch and thus help the city grow. 1.2 Similar existing games In terms of the city simulation and overall feel, the game will be similar to an already existing game called Cities: Skylines. In Cities: Skylines, the main goal of the player is to build the city itself. There are some public transport elements in Cities: Skylines as well, but it is just one thing out of many for the player to focus on. The main difference between Cities: Skylines and this project is that in our project, the player only has to focus on the public transport, therefore allowing the public transport system to be much more complex. Other similar games are Cities in Motion 1 and Cities in Motion 2. These are very close to what we are trying to accomplish, but there are some things that we want to do differently. Mainly, we want the city to feel much denser than in Cities in Motion. We want the streets to be much more congested when the player first starts the game. In Cities in Motion, the streets are almost empty. In turn, it feels useless to build a public transport network in a city where there are no problems with transportation. Another thing we want to do differently is that we want the rush hours to be much longer, and we want them to be a real problem for the player. This will provide a challenge and it will feel closer to real life. 2 Core game features This is an overview of core game features that will be present in the game. Every feature on this list represents a core concept in the game, and there are functional dependencies between them. 2.1 City simulation City simulation is the core of the game; the gameplay will mostly depend on the believability and realism of the city simulation. The simulation is divided into multiple parts, each serving as its own system in the game. 2.1.1 Car simulation Car simulation is the main part of the city simulation. There are multiple parts of this system. 2.1.1.1 Intersections There are two ways to divide the types of intersections we need to be able to handle: with or without traffic lights, and 3-way or 4-way. Intersections without traffic lights will behave such that cars only slow down when coming, and they will automatically register at the intersection. The intersection handler will then instruct the cars to proceed through the intersection in a specific order so as not to crash into each other. Intersections with traffic lights will behave similarly. The cars will register at the intersection handler, and he will let them through in an order specified by the traffic lights. 3-way and 4-way intersections will otherwise behave the same way. 2.1.1.2 Cars pathfinding There needs to be a unified car pathfinding system in the city, that will be able to handle a large number of cars without slowing down the performance of the game. This pathfinding needs to be hierarchical in following layers: Navigation in the entire city: Returns a list of turns to make at intersections Navigation between intersections: Returns a list of waypoints for the car to go through. The car must not hit the car in front of itself. Navigation on an intersection: Also returns a list of waypoints, but needs to be synchronized with other cars. See chapter 2.1.1.1. The car pathfinding will also depend on the current traffic situation in the city. If the main road is congested, it might be quicker to take a longer route, for example. 2.1.2 People simulation Simulating people is another key part to the believability of our city. People will be represented by a model of a person on the street, but if the person is e.g. in a building, the model will not be rendered. Simulating people will comprise of multiple parts. 2.1.2.1 Categories of people There will be three main categories of people: Students Workers Seniors Every person will belong in one of these three categories. This category will influence the daily routine of the person. Students will mostly go between their home and school; workers will mostly go between their home and place of work and seniors will mostly stay at home. There are some things that will be common for all categories, mainly going shopping and visiting points of interest. 2.1.2.2 People pathfinding Pathfinding for people will be quite similar to pathfinding for cars, but there are a few key differences. Mainly, we will allow people to cross through each other. Therefore, there will be no collisions between people. People will be allowed to walk on the sidewalks and on crosswalks. We will try using Unity’s NavMesh feature for this pathfinding, but if it slows down the performance too much, we will have to come up with our own solution. 2.1.2.3 Deciding on means of transport The main activity of the people in the city will be going from place A to place B. This means that the people will need to decide how to get there. There will be three main means of transport for a person: Public transport A car Walking There will be a complex decision system based on the time and money it costs to use each way of transport. Another factor for the public transport will be the person’s satisfaction with previous public transport usage. The main idea behind the system is that initially, as the roads are congested, using a car will be expensive both in time and in money. Therefore, many people will likely switch to the public transport which the player first built, because it will be much cheaper. But this will, in turn, cause the roads to free up again, leading to more people using cars again. Over all, this will result in an equilibrium between all the transport types. 2.1.2.4 Daily life simulation In order to give people a believable reason to go from point A to point B, they need to have a simulated life. If done well, this will result in a realistic simulation of rush hours in the day, as many people will need to get to work at once. Peoples’ life will depend on multiple parameters. Mainly, it will depend on the category of the citizen. Students will go to school and back on weekdays, and on weekends, they will go shopping or they will go visit points of interest. Working class citizens will usually go to work on weekdays, then go home. They might visit a store on their way back from work. On weekends, they will go shopping and visit points of interest. However, some workers will have to work on weekends, therefore their free days will be on different days than Saturday and Sunday. Seniors will mostly stay at home, but they will also go shopping and visit points of interest. Because they will not go to work or school, they will comparatively do this more often than other categories. For the player to have a realistic feeling of the city, he will have the option to click on people walking down the street or driving a car. A window will pop up showing the parameters of the person, as well as where he is currently headed. 2.1.3 Bus simulation Simulating buses is another core part of the city simulation which, when done well, will help create a realistic feel of the public transport system. Buses will be assigned to a line. They will go from one stop to another according to the line they are assigned to and in time intervals according to the time table of the line. They will need to be able to pick up and eject people on bus stops. When the time table changes, buses will magically appear on the line if more of them is needed, and disappear if less is needed. Bus pathfinding will work in a similar way to cars. 2.1.4 Subway simulation Subway simulation will be quite easy from a programmer’s point of view. Different metro trains will be assigned to lines similar to buses, but the lines will be underground. Therefore, there will be no pathfinding, and calculating departure times to fulfil a time table will be much easier. 2.2 Events simulation There will be an events simulation system in the game. In its core, it will only contain events generated by the city council, which will mostly be tasks for the player, such as building a public transport in a specific district of the city.