[WIP] A Slippy Map for ATS

truckermudgeon
Posts: 25
Joined: 21 Feb 2023 01:52
Location: USA

Re: [WIP] A Slippy Map for ATS

#11 Post by truckermudgeon » 29 Mar 2023 09:44

Amazing! Thanks for that; I've subscribed to notifications for that repo. Won't be able to update the slippy map until this weekend, though.

Also: we've got almost the same exact proj4 strings... the only difference is that I use a k value of 0.051. I'll most likely update mine to match yours :)
User avatar
SenseFM
Posts: 407
Joined: 24 Apr 2021 17:00
Location: Spain

Re: [WIP] A Slippy Map for ATS

#12 Post by SenseFM » 02 Apr 2023 17:46

This an amazing project, @truckermudgeon! Since it's directly based on the in-game layout of the roads and streets, I'm sure it will be very useful for everyone who likes to play without GPS. Looking forward to your future updates!
truckermudgeon
Posts: 25
Joined: 21 Feb 2023 01:52
Location: USA

Re: [WIP] A Slippy Map for ATS

#13 Post by truckermudgeon » 07 Apr 2023 20:42

Thanks, @SenseFM ! Future updates coming soon... after I dig myself out of a parsing rabbit hole I purposely fell into 😅

The latest update has been to pull in a live copy of nautofon's scenery town data:
colorado-scenery-towns.png
colorado-scenery-towns.png (42.98 KiB) Viewed 1381 times
Maybe in the future, I can try and look into adding building footprints for these towns, so that their names don't look so lonely.

@nautofon : I noticed the latest changes to the inclusion criteria, so that highway junctions and mountain passes are included. Once I get around to adding the layer selection panel, do you think junctions + passes should be treated as separate layers from scenery town names? If so, is there a way to distinguish junctions + passes from scenery towns in the GeoJSON (maybe as a separate "type" property? Or as some prefix like "junction: foo" or "pass: bar", which the map app can process / stripout during render)?
nautofon
Posts: 1192
Joined: 03 Mar 2019 19:53
Location: Europe, playing ATS
Contact:

Re: [WIP] A Slippy Map for ATS

#14 Post by nautofon » 07 Apr 2023 22:58

^ For the moment, all I can offer as distinction is the observation that all pass names match on the regex / Pass$/, and all junction names match on / Jct$/.

The question of whether or not to have separately selectable layers for these is really your call. As, indeed, is the question of whether to include them at all. Right now your map is the only consumer of this data, so I'm happy to follow your lead. That said, I wouldn't be surprised if named junctions and passes turned out to be relatively rare in the end. This may end up being a non-issue. So I'd tend towards holding off on excluding or separating them until the dataset is more complete and we are in a position to make a better informed decision.

The way you pull in a live copy of the towns data is pretty nice! 8-) But it seems to me that having the client load one file per state is less efficient than it could be. It also limits the displayed towns to the fixed list of states in your code. I've adding tooling to produce a combined file for you (with a "state" property, to support the search menu order).
For driving without GPS navigation:  ATS Company/Facility Directory — C/FD
truckermudgeon
Posts: 25
Joined: 21 Feb 2023 01:52
Location: USA

Re: [WIP] A Slippy Map for ATS

#15 Post by truckermudgeon » 29 Apr 2023 07:57

@nautofon after your message about building models: I fell even deeper down the parsing rabbit hole and:
The results aren't perfect, but I feel they add a lot of character to the map. The scenery town labels no longer look so lonely (see Saguache and Monte Vista below):

footprints.png

It's made me reconsider adding hidden roads/prefabs, since some of the building footprints make their absence a little too obvious:

absent-roads.png

At any rate, it's been a fun diversion :). I might get back to the routing-related side of this project, next.
nautofon
Posts: 1192
Joined: 03 Mar 2019 19:53
Location: Europe, playing ATS
Contact:

Re: [WIP] A Slippy Map for ATS

#16 Post by nautofon » 29 Apr 2023 09:17

Oh wow, this is absolutely incredible. :o Great job! I might spend the next couple of hours staring at this map. :D

One tiny nitpick: It looks like the recent change to use the combined name file was reverted accidentally. Could you bring that back, please? I've been looking at Utah name placement in detail and as far as I can see, the positions of the mileage targets are mostly adequate for the time being. There are mileage targets without towns, but not very many. I'd like to start using mileage target data for all of the remaining states until they've been searched manually.
For driving without GPS navigation:  ATS Company/Facility Directory — C/FD
truckermudgeon
Posts: 25
Joined: 21 Feb 2023 01:52
Location: USA

Re: [WIP] A Slippy Map for ATS

#17 Post by truckermudgeon » 29 Apr 2023 16:03

One tiny nitpick: It looks like the recent change to use the combined name file was reverted accidentally. Could you bring that back, please?
Whoops! Not a tiny nitpick at all. Definitely a big mistake due to late-night coding :shock:.

Just pushed the fix a few minutes ago. Sorry about that!
truckermudgeon
Posts: 25
Joined: 21 Feb 2023 01:52
Location: USA

Re: [WIP] A Slippy Map for ATS

#18 Post by truckermudgeon » 29 Apr 2023 18:05

Because I couldn't help myself, I added height info to the generated .pmtiles file so I could render extrusions:
Screenshot 2023-04-29 at 10.58.18 AM.png
There are some building footprints that overlap roads... it should be possible to detect those and split the bounding boxes so that it won't look like you're driving through a wall. Yet another task For Another Time™.

Prefab buildings don't have height info, because prefab data is still being parsed using ts-map. But I'm almost done refactoring the GeoJSON generation code to use my own parsing code, and once that's done I'll finally get around to regenerating the base .pmtiles file, and releasing all of my project's (hacky, somewhat-spaghetti-ish) source code :D
User avatar
azgoodaz
Posts: 90
Joined: 09 Feb 2016 02:25
Location: Florida, USA
Contact:

Re: [WIP] A Slippy Map for ATS

#19 Post by azgoodaz » 14 May 2023 22:35

Any thoughts about adding in layers like a grass texture, mountain texture, water texture for the water boundaries, etc?
truckermudgeon
Posts: 25
Joined: 21 Feb 2023 01:52
Location: USA

Re: [WIP] A Slippy Map for ATS

#20 Post by truckermudgeon » 15 May 2023 03:16

@azgoodaz : I'd like to try adding those sometime in the future, just to see how it'd turn out. But I have a feeling it won't look that great :| . E.g., for the few rivers I've seen in the game, when I view them in the ATS map editor, they look cut off / they end abruptly (probably because the player can never see where they would end, so there's no need to model them realistically). And some of the mountain ranges I've seen in the map editor look "squished", and only look good when viewing them from the road.

So if it were easy to parse grass, mountain, and water data from the game files: I guess a first draft would look like a low-fi copy of what you'd see in the map editor: a bit unrealistic. There's probably a way to make the in-game data look better / more realistic, but I'm guessing it'd involve a lot of manual work.

Maybe the easiest thing that can be done is to use low-res grass/mountain data, e.g. from zoomed-out Google Maps,
landfill.png
overlay the roads/prefabs from the game on top, and slowly fade out the fill-data as you zoom in. (I'd leave out waterways, though: it'd be weird if a real-life river were on the map, and a street ran through it (without a bridge) :D )
Post Reply

Return to “Game”

Who is online

Users browsing this forum: No registered users and 1 guest