Game
Forgotten Fields

4 years ago

#2 Building trains


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-

happot3.png

The fields are golden and the rest of the foliage is brown in the drier months (which is when the game is set)

happot2.png

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.

happot5.png

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. 

train2.png

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.

happot7.png

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.

happot4.png

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



7 comments

Loading...

Next up

#3 Building a neighborhood

#1 Building an ocean

#4 Weather effects and storybook art style

#0 First devlog for Forgotten Fields!

Forgotten Fields launches on April 14!

So

i may or may not make an full art of some person or i may just leave this like that-

We made a lot of improvements on the Freezing Plains visual. Things like pine trees, tiny bushes, some rocks, and others game props!

#IndieGame | #IndieDev | #GameDev | #PixelArt | #WaifuQuest | #WifeQuest | #screenshotsaturday

In the quest for accessibility, I'm adding Resurrection Shrines for players on the 'novice' end of the platforming spectrum.

In order to unlock the power of a Shrine, you must collect 3 'Souls' from your dead corpses! (the floating blue orbs)

Strange Umbrella

Shuiro Haname. #Commission

Commission for @ShuHaname