Changing Pixels per Tile

Place to get help with not working mods / modding interface.
Memoria
Burner Inserter
Burner Inserter
Posts: 10
Joined: Sun Aug 18, 2019 6:49 pm
Contact:

Changing Pixels per Tile

Post by Memoria »

Hello,

I just started modding and tried to add a new resource. It works perfectly fine (gets placed, you can mine it and get an item), my only problem is that my sprites get rendered in double the size they're supposed to.

I created the resource basically by copying the demo-resource.lua provided by the game, so my sprites is 64x64 pixel for low-res and 128x128 pixel for high-res. In high-res there is the property scale=0.5. So far that's all the same as in demo-resource.lua, but still my sprites gets rendered as a 2x2 tiles image. Now I've read through this forum and found that one tile in factorio consists of 32x32 pixels (or to put in other words, if I want a sprite to be one tile big, it needs to be 32x32). So that explains why my 64x64 sprite gets rendered as 2x2 tiles. What I'm not understanding is how demo-resource.lua (and some other mods I've looked through) are making a 64x64 image be one tile without any scale modifier. Do they somehow change the pixels per tile?

Thanks in advance for any help :)
posila
Factorio Staff
Factorio Staff
Posts: 5348
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: Changing Pixels per Tile

Post by posila »

Our art tends to overlap neighboring tiles to avoid showing tile grid as much a possible (especially in natural elements). FFF about current resource graphics: https://www.factorio.com/blog/post/fff-179
Memoria
Burner Inserter
Burner Inserter
Posts: 10
Joined: Sun Aug 18, 2019 6:49 pm
Contact:

Re: Changing Pixels per Tile

Post by Memoria »

Thanks a lot!
Post Reply

Return to “Modding help”