bahrmichael / factorio-tycoon

GNU General Public License v3.0
9 stars 7 forks source link

feat: different floor types #299

Closed bahrmichael closed 6 months ago

bahrmichael commented 6 months ago

Closes https://github.com/bahrmichael/factorio-tycoon/issues/298

winex commented 6 months ago

hmm, dry-dirt for roads looks way better! i also tried:

looks awesome, but upgrading roads is still TODO... edit: damn! tile is stone-path, not stone-brick

    local tilesMap = {
        ["simple"] = "landfill",
        ["residential"] = "stone-path",
        ["highrise"] = "concrete",
    }
-- ...
printTiles({...
}, tilesMap[entityName])
bahrmichael commented 6 months ago

hmm, dry-dirt for roads looks way better!

dry-dirt unfortunately doesn't visually look the same size as the other tiles. I'm not sure if I want to go with dry-dirt but then have to adjust the underlying mapping code so that it looks the same width.

edit: damn! tile is stone-path, not stone-brick

Thank you for the pointer! I would have stumbled into that one too :D

bahrmichael commented 6 months ago

I've got a prototype that upgrades the 5x5 cells around the new residential house. It works, but it doesn't look organic yet. E.g. a circle of cells may be a better fit, and the upgrade should go outward from that circle's center.

Screenshot 2024-03-30 at 21 43 35
winex commented 6 months ago

hmm, dry-dirt for roads looks way better!

dry-dirt unfortunately doesn't visually look the same size as the other tiles. I'm not sure if I want to go with dry-dirt but then have to adjust the underlying mapping code so that it looks the same width.

oh, i see now - i always play with show-raw-tile-transitions (in F4) enabled, so didn't see that dry-dirt is narrower, though it is only visually: scrot 20240331_021605 dry-dirt x2 it still looks better in map view with landfill being under buildings

why on this screenshot newly-built treasury has tile-unknown below?! i'm working on consumption currently :)... hah, we just need to add it to tile mapping table, because it's a building, too!

winex commented 6 months ago

I've got a prototype that upgrades the 5x5 cells around the new residential house. It works, but it doesn't look organic yet.

this prototype is interesting. but i'd propose we do exactly like this (5x5 cells = full roads around, right?) just for simplicity - there's nothing wrong with it - many games did upgrades the same way because it's intuitive

btw, i thought house upgade code call clearArea.../Cell() and printTiles() with new tiles, didn't it?

bahrmichael commented 6 months ago

https://github.com/bahrmichael/factorio-tycoon/pull/299/commits/1e5fd2c86741730f9f7479ee91b1d09e470d2d14 now leads to the picture below (with max supply for all tiers). I felt the growth was much smoother.

Screenshot 2024-03-31 at 12 38 31
winex commented 6 months ago

i like the result and cities should also look much better in map view. going to test it asap...

stone-brick and concrete consumption (and payment) would also be nice for such upgrading, but it's another part -- let me work on this after my consumption PR (it's coming, currently rebasing on your perfomance update)

bahrmichael commented 6 months ago

stone-brick and concrete consumption (and payment) would also be nice for such upgrading, but it's another part -- let me work on this after my consumption PR (it's coming, currently rebasing on your perfomance update)

We can create an issue to keep track of the work, and make me remember that you wanted to work on that if you like :) I do however have some strong opinions on making sure that players are aware of the resources needed. Did a lot of UI rework recently to make sure that works well for the houses.

winex commented 6 months ago

damn! i finally found dry-dirt on map... scrot 20240401_235035 dry-dirt crop half adding dedicated tile seems not a good idea and tiles cannot be tinted, so we probably leave it as is for some time...