Train Simulator (with PubNub)
October 2018
Description
This project was a design challenge for one of my studio courses in the Digital Futures Program at OCAD University. The challenge was to create an interactive experience based on a random book provided by our instructor. The interactive experience needed to implement atleast three screens/devices that were able to communicate with each other using PubNub (a global Data Stream Network). We were given the book Trains: Classics of Transportation.
Our project aimed to enhance the reading experience about classical 19th century trains by providing the participants with 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 to move forward. Another participant will have a whistle in a form of another phone. The phones screen must be tapped to supply 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 smoothly. Originally we wanted to design a simulator based on modern trains, but we quickly realized that sticking with the older steam engine design would be stronger conceptually and give us meaningful movement to work into the mechanics (making shoveling motions). Our final project was a scaled down yet functioning version of our original concept.
The Team
Madelaine Fischer-Bernhut: Research and development of final path creation (with BGCurves 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
Ola Soszynski: PubNub and p5.js sketches and implementation (coal shovel and whistle for mobile)
Vijaei Posarajah: Research into path creation, shovel acquisition, unique asset design (trees, train station colour diversity -unfortunately were not able to be implemented in the presented build), documentation
Gameplay
Development
Displays:
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 multidisplay 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 whistle blower are need to play the game.
Programs Used:
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. For the coal shoveler, the screen brightens to a vibrant red as the coal is shoveled to be used as fuel. The brighter the display, the faster the train. To have our mobile devices communicate between each other as well as the game we used PubNub to establish the 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.
Project Context/Research:
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 relianton other players to follow through on their sequence so they can contribute a steam 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 Mascaren has, and Rui Prada to understand the variety of cooperative game mechanics that can be implemented into our cooperative simulator game.
Future:
Although I was able to implement collision detection when the train entered the train station, we were unable to turn it into a meaningful mechanic in the development time we were given. Initially, we wanted to only be able to restock the coal with the whistle at the station. This would add another layer to the gameplay; the three or more players would need to be strategic and work together in order to slow the train to a stop in order to restock the coal. Unfortunately, we did not have enough experience or time to learn the ins and outs of PubNub, to the point that we could easily use multiple sub channels. Other additions that would be nice, would be a mini map to track progress, missions to fulfill from one train station to another, bandits that can steal coal, and finally a more populated world with assets and colour.