This is a small map containing a moving sector-based vehicle that moves forwards and backwards, and you can even jump off it!
Now, this technique of doing Duke3D subway cars is nothing new, the first version of it was seen back in 2014 when line portals started being a thing. But because that demo doesn't work anymore in modern GZDoom and there's no map with just the subway car i decided to make a simple one people can look at and learn how to do it.
The way this works is simple, a rectangular polyobject has portals attached as windows and entrances/exits that lead to a room outside the play area. This room is designed to look like the inside of a train (here it doesn't because i suck at mapping) and it should match the size, shape and texturing to look like a seamless train. You can just open the map in GZDoom Builder and that will be easier to figure out.
Requires GZDoom 2.2 or newer.