mike-koch / ets2-mobile-route-advisor

ETS2 / ATS's Route Advisor, for mobile devices
http://mikekoch.me/ets2-mobile-route-advisor
MIT License
135 stars 48 forks source link

Map Pack Support #86

Closed mike-koch closed 8 years ago

mike-koch commented 8 years ago

Now that we have a new map available (#85), there should be a simple way to add/remove map packs. Ideally it would be nice to be able to switch between "map packs" via the config file (that way the user does not need to download 2 different versions of the skin; they can just change a config parameter). Currently I'm viewing the each map pack to be a folder with the following folder structure:

- vanilla-ets2
  +- /tiles
  +- map.js
- promods-rusmap
  +- /tiles
  +- map.js
..... and so forth

Then in the config the user will enter the folder name of the map they want to use (i.e. vanilla-ets2 or promods-rusmap).

Koenvh1 commented 8 years ago

This is a good idea, especially since I also want to generate a map for ATS (I still need to do some editing to make that work though).

One thing to take into consideration: Do you want to let that config parameter point to a folder or to a config file that refers to folders? The second one may be a bit more work, but in the long run it may be more flexible. However, it could also make it more complex than it needs to be.

mike-koch commented 8 years ago

My plan was to introduce two new config parameters: ets2MapFolder and atsMapFolder. The value for the parameter would be the folder where the tiles folder and map.js file would be (looking at the folder structure in my original post). As long as each map pack follows the correct requirements (tiles in the tiles folder, creating a map.js file implementing the necessary functions, etc), this approach should be okay.

mike-koch commented 8 years ago

Well, I started work on this, but there seems to be some magic limit on the length of a URL on the telemetry server. Until I hear back from Funbit at Funbit/ets2-telemetry-server#79, this is essentially blocked.

mike-koch commented 8 years ago

Funbit changed the subdirectory limit from 5 to 9, which should solve the majority of our issues.