TUTORIAL: Moving background for trains and trams
From the blog "Abby Freeman Makes A Game"
In this tutorial, I'll be teaching you how to make a moving train/tram/other vehicle/etc. without much work! This is NOT the same as a vehicle event. This is to get the effect of movement in the background.
This is something I decided to do in my remake of the first Half-Life game, for the first chapter, Black Mesa Inbound.
WHAT YOU'LL NEED:
RPG Maker (I use VX Ace, but I'm sure it works in any of them, given you have access to something like the below script.)
HimeWorks' Map Screenshot script (or similar)
First, make your train or tram.
The blank background behind it is extremely important.
Next, you need to make the scenery you want to have the appearance of moving - I.E: another map. A really, really long map. Once you make it, use the script to take a mapshot.
Copy your mapshot into this folder in the Graphics folder of your project...:
...And then go back to your tram/train map and put your mapshot as a Parallax Background in your Map Properties. For Black Mesa Inbound, I don't need it to move very fast, so I have it on these settings:
Then time it, calculate the time in frames and have the map change to the "dropoff location" (Parallel Process event). In the case of my Half-Life remake, that would be a still map where a guard walks over and lets you out, then leads you to the next chapter.
What if you have to use multiple tilesets to get the effect you want? (I.E - simulating going through numerous locations)
I had that same question for myself and it was an easy enough answer - make multiple maps, take multiple mapshots and splice them all together into one image. I'm having to do this for Black Mesa Inbound.
What if I want background characters to move on the background instead of standing in one place?
I don't have an answer for this one. I considered having the characters all be set to "Below" and "Through" and sort of shimmy in place before being set to Transparent, but that didn't quite work. In the end, having them standing there looks populated enough for my taste. If anybody has an answer to this, please comment it down below!
Anyway, I hope you find this tutorial useful in your development endeavours!