[posila] [1.1.88] tile.variants.material_background does not work at higher scales than 8x8

This subforum contains all the issues which we already resolved.
Post Reply
User avatar
micromario
Fast Inserter
Fast Inserter
Posts: 102
Joined: Thu Apr 05, 2018 11:53 am
Contact:

[posila] [1.1.88] tile.variants.material_background does not work at higher scales than 8x8

Post by micromario »

Good morning :lol:

I am trying to add some new tilesets for the next pY mod... pYSE
My plan is to have similar effect to the "water wube" tile. Aka it uses the material background property to repeat the sprite every N tiles.

However I noticed that this prototype property breaks when going to higher resolutions than 8x8 (size of water wube tile). I tried to make a 32x32.
The game loads just fine but it seems to just use random textures from the altas. There is also a strange shearing effect on the sprite borders.
I tried with the builtin __base__/graphics/terrain/water-wube/concrete-dummy.png and also custom __pystellarexpeditiongraphics__/graphics/tile/space-platform/concrete-dummy.png

I have attached some resources to help debugging. :D
1. Image of the broken tiles
2. Code used to make this tile
3. HR and LR images for the intended texture

Thanks for looking at this :?
Attachments
space-platform.png
space-platform.png (1.48 MiB) Viewed 1066 times
hr-space-platform.png
hr-space-platform.png (4.94 MiB) Viewed 1066 times
space-platform.lua
(4.01 KiB) Downloaded 52 times
broken stuff.png
broken stuff.png (770.66 KiB) Viewed 1066 times



Rseding91
Factorio Staff
Factorio Staff
Posts: 13954
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [1.1.88] tile.variants.material_background does not work at higher scales than 8x8

Post by Rseding91 »

Thanks for the report. The maximum size is 8; at best this can be enforced at load time. Runtime tiles do not support a variation size larger than 8 x 8. To change that would make all tiles use more RAM and more space in save files even if not used.
If you want to get ahold of me I'm almost always on Discord.


posila
Factorio Staff
Factorio Staff
Posts: 5254
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: [posila] [1.1.88] tile.variants.material_background does not work at higher scales than 8x8

Post by posila »

Thanks for the report.
I am going to call this "Fixed in 2.0". The core issue of tiles larger than material background texture don't render the material background correctly, is not fixed, but it's not reproducible in 2.0. Also in 2.0 it's possible to achieve what I understand you were trying to achieve. In 2.0 there are following changes.
  • main tile pictures don't support transparency anymore, so the whole defining transparent tiles using concrete-dummy.png thing is not a thing anymore.
  • material background texture is no longer hardcoded to 8x8 tiles, it can be configured to be arbitrary rectangle where each side is within range 1 to 32 tiles.
  • -> if main tile pictures are defined, material background texture won't be visible; If they are not defined, tile sizes are inferred from size of material background texture (but tile size is just internal engine thing in this case)
Also, it is untrue that maximum tile size is 8x8, it's 128x128 ... tiles do store size in 3 bits, but since their size is always power of 2, the exponent is stored only, allowing the engine to support 8 first powers of 2 as size of tile. OP's issue was that they configured 32x32 tiles, but material background texture was hardcoded to 8x8, and the engine doesn't fill tiles larger than the material texture with the texture.


Post Reply

Return to “Resolved Problems and Bugs”