Frostwood Interactive
  • Unwording
  • Rainswept
  • Forgotten Fields
  • Blog
  • Steam
  • Press Kit

#2 Building trains

9/10/2020

0 Comments

 
Hi!
​
I've spent a lot of time working on the scene that the Forgotten Fields demo ends on - Ethan's house and the surrounding neighborhood area. A lot of that time has been spent on making this place feel atmospheric, warm and alive.

Fun backstory - the vibe of this place has been inspired by a random dead end road that my friends and I discovered after we got lost and took a wrong turn. It's a pretty basic spot, but it's also special - there are  fields on one side of the road, two railway tracks that run parallel to the road on the other side, and some old houses a little distance away on the third side. This place has become one of our favorite hang out spots ever, and so of course, I decided to add it to the game.

The spot in monsoons-
Picture
The fields are golden and the rest of the foliage is brown in the drier months (which is when the game is set)
Picture
The focus of this post is on those previously mentioned trains, and how game dev is quite a bit like film making in that a lot of the things you see are actually illusions and magic. There's some weird stuff going on behind the scenes! If don't want to break immersion, maybe skip this post (or the last part of it) The trains are only set up as a part of the background to add atmosphere to the place and also as a reference to the place that has inspired this area in the game. You can't get on them!
​
Now first of all, The trains are set up as "NPCs" (through the plugin Adventure Creator) which basically allows me to set up their back and forth movement on the tracks using AC's "paths" system. This helps me avoid having to animate the trains. The paths system also has the option to pause at every node, which means that the trains won't be running back and forth all the time and will instead pass by at more realistic time intervals. Simple, but nifty.
Picture
The blue boxes or bogies on one of those trains are the typical sort you see in Indian passenger trains, and are immediately recognizable to anyone that has traveled by or ever seen them. ​
Picture
Having got the movement sorted, the next most important part to figure out was the sound of the trains passing by. This sound should only play when the train is close to the player. 

​To make sure that the sounds stop after the train is out of earshot, I set up these triggers (the red boxes) on either side of the playable area to recognize the train and only then turn the sound component on. The sound turns off automatically once the audio clip ends (it's about 20 seconds long only) as it is not set to loop. The triggers (also a part of AC) are set up to recognize if the sound is already playing, so that they don't launch the audio clip twice.
Picture
The sound component itself is attached to the train, twice - one at the head, near the engine, and one at the end, so that the audio plays continuously and seamlessly for the full duration of the train's passage past the player. Unity also allows you to set it up as a 3D sound with doppler effect. You can see it all in action here in this video -
I think it sounds pretty good!
Another fun little thing going on behind the scenes that amused me is that the house that you see in the picture below falls right on top of the tracks. This house is only seen once, in the shot seen below, and it had to be placed on that spot to fill up the scene and make the world seem more realistic.
Picture
Behind the scenes though, you've actually got trains running through it!  But with the way the camera is set up (isometric) you'll never really see the train going into the house during gameplay. Check out the immersion breaking phenomenon below -
Thanks for reading, and see you in the next devlog! :)

​-Armaan
0 Comments

    Author

    Hi, I'm Armaan, the creator of Rainswept and Forgotten Fields. On this blog, I post weekly updates about my games' development (or as often as possible!)

    I sometimes also ramble about other video games and things like atmosphere, storytelling and emotions in video games!

    Never heard of Rainswept? It's an adventure game dealing with themes of love, relationships and unresolved trauma, out NOW on PC, Mac and Linux.


    Archives

    January 2022
    December 2021
    November 2021
    October 2021
    March 2021
    December 2020
    October 2020
    September 2020
    August 2020
    July 2019
    February 2019
    January 2019
    December 2018
    November 2018
    October 2018
    September 2018
    August 2018
    July 2018
    June 2018
    May 2018
    April 2018
    March 2018
    February 2018
    January 2018
    November 2017

    Categories

    All
    Devlogs

    RSS Feed

Powered by Create your own unique website with customizable templates.
  • Unwording
  • Rainswept
  • Forgotten Fields
  • Blog
  • Steam
  • Press Kit