How to properly lay and size map tiles for train games

Good day,

I’ve noticed with some people I work with, that they’re making an active effort to build train maps based on google maps overlays (or wherever you get your overhead imagery views), which is awesome! But one of the largest issues I’ve come across is a miscalculation of sizing or misinterpretation of map proportion, resulting in a massively oversized or undersized map in relation to the train size they’re using. In this document I’ll share with you how to get the sizing and proportions of your map right every single time! Let’s dive into it.
Today I am laying the groundwork for the Route 128 update for our Providence/Stoughton Line game. First thing I am going to do is go into Google Maps and find an overview of the scene I am making for the extension.

Roblox has a thing where if you upload an image with any sort of text that may go against the ToS, the map capture will be deleted and you can be subject to moderation for anything mildly inappropriate. So, to be safe let’s go to Layers → More → uncheck “Labels”.



You will now see that there is no more text on the map, which is what we want!
The existing map in Roblox Studio ends approximately near where the tracks cross under i-95, so I only need to get a map capture starting just to the right of that highway overpass.


This is the final image we will use to upload to Roblox.

In Studio, insert a Part object and make sure to turn off its CanCollide property and turn on its Anchored property. This will ensure that anything can pass through the part and that the part will stay in its intended place.
With the part selected, insert a Decal object within the part and set its Face to “Top” or whichever face of the part is facing towards the sky.
Now, we’re going to the Properties tab of the Decal object and click on the Texture property, and click “Add Image”. NOTE: the place must be published to Roblox for this to work!

Go to your file explorer and locate the saved map tile image, then press the blue Create button. The image should now appear on the part.

Go to your computer’s File Explorer and find the image file, and open the raw image for the map tile. We will now obtain the size, in pixels, of the image. This is to ensure we get the proportions of the part exact to the captured image.

Set the length and width sizes of the part to match the image size (in this case, X and Z).

Now that we have the proportions of the image correct, the next step is probably the most crucial in ensuring that you don’t have massively oversized or undersized map. Back in Google maps, measure the distance between two points within the map area you are going to be working with on Roblox. The best and easiest case to work with is the length of a station platform.
Right-click on the map in Google Maps and select the Measure Distance tool. You may now select two points and it will give you the distance in feet or miles (or m/km for you metric folks) between those two points.

My quick distance-measure reveals the southbound platform at Route 128 station to be approximately 1,050 ft. Grab a piece of rolling stock that you fully intend on using for the game. In my case, an Amfleet is the go-to. A quick google search reveals the length of an Amfleet coach to be 85 ft long.
I will now get the length, in studs, of the Amfleet model in Roblox Studio. You can do this by finding the length value of a part on the car that stretches end-to-end or you can insert another part and stretch it across the length of the car to find the car’s length.

I now see that the length of the car is 9.75 studs. We now know the proportion of feet to studs will be 85 feet : 9.75 studs. Or, every stud equals 85/9.75 feet, or 8.72 ft per stud.
Laying a new part on the length of the platform on the map tile in Roblox, I see that the current length of the platform on the image is 180.447 studs.

Knowing the 1050 ft real life length of the platform, and knowing the 8.72 ft/stud proportion, we can calculate that the platform in roblox SHOULD BE: 1050ft * (1 stud/8.72 ft) = 120.413 studs. Let’s divide the length in studs that the platform should be, by the current length of the platform to get the ratio for re-sizing the map tile part in studio. 120.413 studs/180.447 studs = ~0.667. Since we have the length to width proportions of the part in studio already accurate, let’s now multiply the X and Z values for the map tile (1760 and 449, respectively), by the ratio we just found. 1760 * 0.667 = 1174, and 449 * 0.667 = 299.6. Enter these new values to their respective size properties.

Knowing the 85-foot length of an Amfleet, I can divide 1,050 ft by 85 ft to see that this platform should fit just 12.35 Amfleet lengths, so just over 12 cars. Indeed, by laying the Amfleets end-to-end on the map tile, the platform is just a tad longer than 12 amfleets. Hoozah, we finally have perfect map dimensions in Roblox!
All that’s left now to do is line up the map with the existing map (if applicable) and move forward with track-laying. For more detailed areas like the station, you can zoom in on google maps and create tiles of those smaller-area overlays and lay them on top of the larger overview tile. Be careful to cleanly match map features so everything lines up.

For any existing questions you may have about this I am happy to respond in the replies.
Happy devving!

-BuildIntoTrains

13 Likes