Train Simulator Book++ Project
Madelaine Fischer-Bernhut, Ola Soszynski, Vijaei Posarajah
Book: Trains: Classics of Transportation
Group Work Breakdown:
Ola – PubNub and p5.js sketches and implementation (coal shovel and whistle for mobile)
Madelaine – research into and final path creation (with BG Curves and dynamic speed implementation), final game build and scripting in unity with PubNub, basic 3D models of train, terrain (map), station, and collision detection of train and station
Vijaei – research into path creation, Project context research, documentation compiling, shovel acquisition, unique asset design (trees, diverse coloured train stations – unfortunately, were not able to be implemented in the presented build)
Our project aimed to enhance the reading experience about classical 19th century trains by providing the participants a simulated experience of operating a steam engine train through teamwork. The train simulator game works with a laptop displaying a train on a route with train stations to stop at. The participants are tasked with operating the train by using a phone mounted on a toy shovel to shovel coal using a shaking or shoveling motion allowing the train in the game to move forward. Another participant will have a whistle used as a button to supply the the coal shovelers with more coal. The main goal within the game is to move the train along the track and complete it’s route consisting of train stations. The participants have to work together as a team to operate the train. Our original inspiration was to replicate a train simulator type game with cooperative play in mind with multiple devices used to operate the train but instead of a modern train players would operate a steam engine train along with the devices associated with its operation. Our final project was a scaled down yet functioning version of our original concept.
The original concept involved tasks such as:
-Checking statistics (speed, supplies, engine)
-Shoveling coal into the steam engine, depleting supply, increasing speed
-Communicating with a station for supplies, increasing supplies
-Releasing steam, needs to be done or engine overheats
-Conducting the train, depleting speed
-Slowing down is required to receive supplies
-Going too fast will cause a collision, ending the simulation
-Running out of supplies results in the train stopping, ending the simulation
-Forgetting to release steam results in the engine overheating, ending the simulation
P5 Buttons and Controllers: https://github.com/olasosz/olasosz.github.io
Train Simulator Unity game:
Computer display – output of players actions (world and train representation in Unity. In the presented build we used one display, but in the future we can imagine having multiple displays to represent different views from the train. In unity, multiple cameras pointing in different directions were added to support a multi display experience. Displays would be placed in a formation similar to an actual train.
Mobile display – input player actions, two were used for the presentation, although this can be increased so multiple players could be in charge of shoveling and “blowing” the whistle to restock coal. At least one coal shoveler and whistleblower are need to play the game.
Our project used Unity to create the main train simulator game which involved assets such as the train referenced from our book, train stations, railway signs, trees and terrain. WIthin the Unity we used a pathway system for the railway track as well as systems for acceleration and collision. We used P5.JS for the steam whistle button interface as well as the coal shovel controller used to accelerate the in game train. To have our mobile devices communicate between each other as well as the gem we used Pubnub to establish a network. The steam whistle button communicates with the coal shovel by sending coal to the shovel to be used, and in turn the shovel communicates with the game to accelerate the train forward or stopping the trains movement by not shoveling. Ideally our system would allow one steam whistle user, one train simulator game display and multiple users for shoveling coal.
For real world references we looked at simple versions of existing train simulator games found online such as Train simulator 3d ( http://www.crazygames.com/game/train-simulator-3d) which uses the acceleration and braking mechanic as simple sliders to operate the train. We also took note of the optional fixed camera views provided by the game as a feature to implement in our own game. For the Cooperative multiplayer aspect of our game we looked at available and relevant games in the current market such as Space team (https://itunes.apple.com/us/app/spaceteam/id570510529?mt=8) by Henry Smith, which allows multiple players to simulate a spaceship bridge by commanding players to press buttons and switches according to a sequence provided in the game. Here players are reliant on other players to follow through on their sequence so they can contribute as team and progress in the game as a whole (https://www.youtube.com/watch?v=ymwSbxUDtTw) . Where Space team is reliant on multiple individual devices, we used Artemis Spaceship Bridge Simulator (https://itunes.apple.com/us/app/artemis-spaceship-bridge-simulator/id578372500?mt=8) by Incandescent Workshop LLC as a reference to how our game would work reliant on a single game world with multiple devices used as controllers to play a single sequence game. Here each participating player is in charge of a single aspect of operating the spaceship and rather than being told by the game what to do, they have to react to the game world as a team to survive encounters (https://www.youtube.com/watch?v=V9Q2X32hZNk) . We also used “Game Mechanics for Cooperative Games (https://fenix.tecnico.ulisboa.pt/downloadFile/395138343981/artigo.pdf ),” by Jose Bernardo Rocha, Samuel Mascarenhas, and Rui Prada to understand the variety of cooperative game mechanics that can be implemented into our cooperative simulator game.
Group meeting sketches used to flush out our concepts for a simulator type game
Trying the pathing asset by Surge. Madelaine was unable to implement dynamic speed values using this component.
The final asset used for pathing was the spline creator BG Curves.
Madelaine’s attempt at creating a bezier curve system from scratch.
Unity game development process including modeling game assets, train paths, and terrain
Development process for steam whistle button, coal shovel controller, and Pubnub network
The biggest issue that we had to overcome was getting the different devices to communicate with each other. All the devices were able to publish information, but the mobile devices were unable to communicate with unity. After a lot of troubleshooting and help (thank you Nick) we realized that PubNub was getting confused with all the different data being published to one channel. The creation of subchannels for each data type, solved the issue (ie. A separate channel for the coal values from the speed channel).