Git Product home page Git Product logo

Comments (18)

denilsonsa avatar denilsonsa commented on June 17, 2024

Given how much similar both games are probably going to be, and how similar our code will be; I vote for keeping both ATS and ETS2 together in the same repository and in the same codebase. Changing between ATS and ETS2 can be a simple configuration in our code; or maybe even automatic if the telemetry server adds a value that identifies the game.

For download, we may have two branches (ATS and ETS2) so that people don't need to download the map of the game they don't have.

Regarding renaming the repository, let's wait to see if ets2-telemetry-server will be renamed as well. For the sake of keeping the old links still working, I'm in favour of keeping the name. If we ever rename it, I suggest adding redirections from the old name.

  • Truck icon: Yes, I did the SVG icons.
    • The process was like this:
      1. Extract the original texture image from base.scs, using scs_extractor. This ensures the highest possible quality for the source material, usually higher than screenshots. Look:

        truck

      2. Draw the path (manually) in Inkscape. I believe I manually traced it on top of the original raster image. I also used the "grid" to make sure the lines were correctly aligned.

      3. Clean up the SVG code that Inkscape saved. This was done manually in a text editor.

    • I can easily redo the last two steps, but I need a high-res texture from the first step (the screenshots I've found are still too low-res and blurry, and I think the game downscales the original image). I don't own the game (it's not even out yet!), and I'm most likely not buying it anytime soon (budget restrictions on my side).
  • The map: This probably requires the most work and maybe a machine with lots of RAM. Can be broken into several steps. For ETS2, Funbit did most of the work.
  • Speed limit: Should be trivial to adjust the look, we just need an screenshot of the new look.

from ets2-mobile-route-advisor.

mike-koch avatar mike-koch commented on June 17, 2024

Extract the original texture image from base.scs, using scs_extractor. This ensures the highest possible quality for the source material, usually higher than screenshots

I already ordered my copy from Gamesplanet, so I should be getting my Steam key on the 3rd. I'll extract the needed textures and post them here as soon as I get base.scs extracted.

Mapping: I think I got the map capture mod working as-is (as you noted in the forum thread); however there is still a weird issue with the camera settings (as the garage looks tiny on-screen, and I'm not sure if it's supposed to be there at all πŸ˜† ). It's possible to ignore that with the bright purple/pink colored roads; I just need to figure out the correct number of rows and columns to capture the entire map πŸ˜€

Another option for mapping is to look into nlhan's ets2-map project, which takes *.base files from the maps to rebuild the roads (via some fancy trigonometric functions and other craziness I could not completely understand yet lol), along with some prefab information. I got the program to dump the majority of the roads; however it seems to be missing the road prefabs (such as highway/motorway interchanges, etc; see nlhans/ets2-map#1). If this app will work well and consistent enough where we can export this information to a .PNG or similar, it would be much faster than having the capture mod slowly screenshot each part of the map in-game (the C# program takes ~15 sec to render Europe). I've included a basic output from ets2-map. I'm not concerned about POIs or city names, as I'd like to place city names and POIs as separate layers in the map (see #48).

2016-01-31 18_49_02-new notification
(If you can look at the full-screen image, you can see several missing road pieces)

Speed Limit: It looks like the new speed limit sign is just a plain white rectangle around the current speed limit. That will be extremely easy to update.

Sorry for the massive brain dump, but I'd like to get all of this out there in some way πŸ˜†

from ets2-mobile-route-advisor.

denilsonsa avatar denilsonsa commented on June 17, 2024

Extracting data from the game is the better solution, no doubt. We can even try to extract it as vector data itself.

I've managed to run Ets2MapDemo. Here is a quick screenshot comparison:

Ets2MapDemo

Funbit map

I'd love to read the documentation for the formats of the game data. It would make writing such tools so much easier. Right now I'm just blind.

By the way, here is the output of Ets2MapDemo:

0 buildings were found
18995 roads were found
4109 prefabs were found
3308 road prefabs were found
1115 service points were found
237 companies were found
117 cities were found

I changed projectMap at line 24 of Ets2MapDemo.cs. Here are the contents of the directory pointed by that var:

+- LUT/  (found inside ets2-map repository)
|   +- LUT1.19-cities.csv
|   +- LUT1.19-companies.csv
|   +- LUT1.19-prefab.csv
|   '- LUT1.19-roads.csv
'- SCS/
    +- europe/
    |   '- *.base
    +- prefab/
    |   '- *.ppd  (it can be kept in several directories)
    +- LUT1.19-prefab.sii  (renamed from prefab.sii)
    '- LUT1.19-road_look.sii  (renamed from road_look.sii)

It is worth noting that UK map in Ets2MapDemo is larger than in Funbit's image, that's because UK and Europe use different scales.

from ets2-mobile-route-advisor.

mike-koch avatar mike-koch commented on June 17, 2024

Wow, your output turned out much nicer than mine! (I wonder why that is lol ... I'll have to look into that in a little bit). And you also somehow got city data as well... my config must be messed up somewhere lol. It looks like there might me a couple missing prefabs (such as the fuel station); however we might be able to work around that. If we can get vector data though, that would be awesome!

Also, it might actually be easier if the UK is larger. It will make things easier when converting coordinates to pixels, as we won't need to maintain two different formulas.

from ets2-mobile-route-advisor.

denilsonsa avatar denilsonsa commented on June 17, 2024

By the way, do you have Visual Studio installed? I have (I mostly followed this guide), and I compiled Ets2MapDemo on my machine.

Indeed, converting coordinates would be easier, but at the same time the map will be… huh… non-realistic…? Not that it matters. :)

from ets2-mobile-route-advisor.

mike-koch avatar mike-koch commented on June 17, 2024

Yes, I just updated from Visual Studio 2013 to Visual Studio 2015 last night. I found out what my issue was (I had some directories listed incorrectly), and now I am getting the correct output.

I'm not too concerned about the "realism" of the map right now, as users probably won't be able to notice the size increase when using the map. If we really want to grab the correct size, we can try and shrink the size of the UK afterwards.... but it's not a top priority for me.

There are a couple things in this map that are bothering me though:

  • It looks like there is a missing prefab (the fuel station near Erfurt). I may have to dig in the map editor to see which prefab it is, and see if it is hiding somewhere in the game files.
  • Some of the road prefabs look more like a wireframe compared to the rest of the roads. If they could somehow be more filled in, the roads would look more uniform and look better IMO.

from ets2-mobile-route-advisor.

mike-koch avatar mike-koch commented on June 17, 2024

I think I figured out why there is a missing gap at some gas stations. It looks like the Ets2Map builds prefab roadways based on the prefab's markings for where AI traffic can travel on the prefab itself. For the missing prefab, there are none of these markings:

2016-02-01 15_06_45-settings

However, on a different service station prefab (such as the gas station/parking near Praha), there are AI road markings:

2016-02-01 15_06_06-settings

We may be able to get the map to recognize the fuel station prefab if we add some AI traffic marks... now I just need to figure out how to do that πŸ˜†

from ets2-mobile-route-advisor.

denilsonsa avatar denilsonsa commented on June 17, 2024

Hey, how you managed to get those screenshots?

I have no knowledge of ETS2 modding, and I haven't tried messing with the Ets2Map code (at least not yet).

from ets2-mobile-route-advisor.

mike-koch avatar mike-koch commented on June 17, 2024

I used the in-game map editor:

  1. Launch ETS2
  2. Go into graphics settings and turn off fullscreen mode (the map editor only works in windowed mode)
  3. In the dev console, type in edit, followed by <Enter>
  4. Go to File -> Open... and then type in europe.mbd to open the map.

Anyways, I'm now debating whether or not I should modify the prefab to add the bit of road to the map, as it will not be efficient when it comes to trying to build custom maps, such as ProMods. I may have to dig around to see if roadway information can be generated from the prefab itself, instead of relying on AI paths.

from ets2-mobile-route-advisor.

denilsonsa avatar denilsonsa commented on June 17, 2024

Crazy idea that might work: if we can render the 3D bird's eye view, we MAY be able to apply some image filtering to detect the grayish road. Maybe if we apply a mod to change the road textures to a unique color. Again, a crazy idea, but it may work for some cases.

Alternatively, it should be possible to create some road data for the prefabs; so that the code to render the map will replace the game road data (which would be bad or non-existent) with a custom road data. Might require a bunch of work, but it may work.

from ets2-mobile-route-advisor.

mike-koch avatar mike-koch commented on June 17, 2024

Unfortunately, trying to grab the entire map in the editor does not seem possible right now; the editor only zooms out partway, so it's not possible to grab the whole map in one screenshot (plus I can't seem to find a way to turn off all of the nodes and highlights which would make filtering quite difficult).

And yes, adding custom road data to the prefabs would take a lot of work; plus it looks like I'll need to purchase a ZModeler license to import the prefab information. All of the *.ppd files are stored as binary data so it's a bit difficult to decode all of it 😝 . My hope is that we can just look at some other information in the .ppd files to find actual roadways like the rest of the roads.

from ets2-mobile-route-advisor.

mike-koch avatar mike-koch commented on June 17, 2024

Release! ATS was just unlocked on Steam, and I've already extracted out the graphics needed for the changes that we need to make to the skin (I have not tried to build the map yet, though). Below the ripped graphics that we should need. If you wouldn't mind tracing them into a vector format, that would be awesome πŸ˜€

Trailer:
trailer

ETS2's trailer has three axles, while ATS' only has two.

Truck:
truck

Damage Icon:
truck_small

^ there actually is an image here, but it's white. You may have to highlight the blank space above to actually see it πŸ˜†


I am also electing to move map-related discussion to #77, as that is a dedicated issue I created specifically for the intent for mapping.

from ets2-mobile-route-advisor.

denilsonsa avatar denilsonsa commented on June 17, 2024

Done!

<!-- Based on the actual game gfx. -->
<symbol id="svg-ats-truck" viewBox="0 0 73 40">
    <path d="M15 34a3 3 0 0 0 -3 -3 3 3 0 0 0 -3 3 3 3 0 0 0 3 3 3 3 0 0 0 3 -3zm3 0a6 6 0 0 1 -6 6 6 6 0 0 1 -6 -6 6 6 0 0 1 6 -6 6 6 0 0 1 6 6zm47 0a3 3 0 0 0 -3 -3 3 3 0 0 0 -3 3 3 3 0 0 0 3 3 3 3 0 0 0 3 -3zm3 0a6 6 0 0 1 -6 6 6 6 0 0 1 -6 -6 6 6 0 0 1 6 -6 6 6 0 0 1 6 6zm-13-14h14v3h-14zM16 9h9v8h-9zm11 0h4v8h-4zM27,0l-4 4h-6l-2 2v11h-12v2h-1v10h-2v6h5.078a7 7 0 0 1 -0.078 -1 7 7 0 0 1 7 -7 7 7 0 0 1 7 7 7 7 0 0 1 -0.08 1h6.08v-2h11v2h19.078a7 7 0 0 1 -0.078 -1 7 7 0 0 1 7 -7 7 7 0 0 1 7 7 7 7 0 0 1 -0.08 1h2.08v1h2v-12h-2v1h-21v-1h-3v-24h-8v24h-1v-24z"/>
</symbol>
<!-- Based on the actual game gfx. -->
<symbol id="svg-ats-trailer" viewBox="0 0 114 43">
    <path d="m104 38a2 2 0 0 0 -2 -2 2 2 0 0 0 -2 2 2 2 0 0 0 2 2 2 2 0 0 0 2 -2zm3 0a5 5 0 0 1 -5 5 5 5 0 0 1 -5 -5 5 5 0 0 1 5 -5 5 5 0 0 1 5 5zm-14 0a2 2 0 0 0 -2 -2 2 2 0 0 0 -2 2 2 2 0 0 0 2 2 2 2 0 0 0 2 -2zm3 0a5 5 0 0 1 -5 5 5 5 0 0 1 -5 -5 5 5 0 0 1 5 -5 5 5 0 0 1 5 5zm-42-4h21v4h-21zM2 0h110a2 2 0 0 1 2 2v30h-114v-30a2 2 0 0 1 2-2z"/>
</symbol>

Just like in ETS2, I have not drawn the damage icon, I don't think we need it; instead we can use the normal truck icon scaled down.

Interesting how the wheels of the truck (but not the trailer) of ATS are 1 pixel larger.

from ets2-mobile-route-advisor.

mike-koch avatar mike-koch commented on June 17, 2024

I believe I have updated everything; however I am going to do more testing tomorrow just to double-check that I didn't break anything with ETS2.

Also, thanks for making the SVGs. They look awesome!

2016-02-07 01_31_40-new notification

from ets2-mobile-route-advisor.

denilsonsa avatar denilsonsa commented on June 17, 2024

Suggestions (feel free to discuss them if you disagree; they are suggestions after all!):

  • Rename svg-truck and svg-trailer to svg-ets2-truck and svg-ets2-trailer.
  • How about keeping one single #speed-limit and changing the look (via CSS) according to the game?
  • At #_damage tab, try increasing the width from 6em to 7em. Why? Because for ETS2 I chose those dimensions to make sure both images had the same height. In case of ATS, the proportions are slightly different, and the truck now looks slightly smaller. Note that you can specify a larger width without issues, as the actual image will be scaled to fit, but still keeping the aspect ratio. So, yes, you can increase the width for both ETS2 and ATS.

I suggest dynamically adding a class (e.g. game_running_ets2 or game_running_ats) to the body element, and then just using CSS like this:

#_map #speed-limit {
    /* The common style is left here. */
}
.game_running_ets2 #_map #speed-limit {
    border-radius: 100%;
    border: 0.25em solid red;
    background: white;
    color: black;
}
.game_running_ats #_map #speed-limit-ats {
    background: white;
    color: black;
}

I'm not on my Windows computer, so I can't test the latest changes. (This sucks! I usually use my Linux computer to be productive, but I can't test this kind of stuff without first booting up Windows.)

from ets2-mobile-route-advisor.

mike-koch avatar mike-koch commented on June 17, 2024

Those are all valid suggestions. See e27c30b for all of the changes.

from ets2-mobile-route-advisor.

denilsonsa avatar denilsonsa commented on June 17, 2024
$('.game-name').addClass(data.game.gameName).removeClass('game-name');

This will probably break if the user leaves the mobile-route-advisor open while switching between ETS2 and ATS.

An alternative is to add the game name as an attribute.

Or, just add and remove those two classes (one for each game) to the body or html or other ancestral element.

from ets2-mobile-route-advisor.

mike-koch avatar mike-koch commented on June 17, 2024

Using an attribute is the best choice IMO. Check out 014d5c3 for the changes I made.


Anyways, I think this is pretty much everything besides the mini-map, unless there is something else I'm missing.

from ets2-mobile-route-advisor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.