Page 1 of 1

Increase Max Texture Size

Posted: Sat Jun 20, 2015 3:32 am
by keyboardhack
Allow us to make Textures larger than 2048*2048

Why is this needed?
So we can use high quality animations and images.
Take the Cargo wagon as an example. Its current size is 1140x1744. If we wanted to increase the resolution in any meaningfull way then we would have to go beyond the 2048 limitation.

Re: Increase Max Sprite Size

Posted: Sat Jun 20, 2015 4:49 am
by ThaPear
You can split spritesheets into separate images. This means that since there's currently 4x8 frames and 4 sheets, you could double the resolution and make the sheets 3x4 with 11 sheets.
Now 11 sheets isn't very practical, but at least it's possible.

Re: Increase Max Sprite Size

Posted: Sat Jun 20, 2015 5:09 am
by keyboardhack
ThaPear wrote:You can split spritesheets into separate images. This means that since there's currently 4x8 frames and 4 sheets, you could double the resolution and make the sheets 3x4 with 11 sheets.
Now 11 sheets isn't very practical, but at least it's possible.
That works if i am making new sprites, but if i am modifying exsisting game sprites then it's not an option and it still limits the sprite size.

Re: Increase Max Sprite Size

Posted: Sat Jun 20, 2015 5:40 am
by sillyfly
Why isn't it an option? Are you replacing the actual game files? That's a bad idea!
Much better to provide your own files separately, and change the reference with a simple lua file (That is, a mod that only changes the sprites).

Re: Increase Max Sprite Size

Posted: Sat Jun 20, 2015 7:26 am
by keyboardhack
sillyfly wrote:Why isn't it an option? Are you replacing the actual game files? That's a bad idea!
Much better to provide your own files separately, and change the reference with a simple lua file (That is, a mod that only changes the sprites).
I am currently making a mod that changes the sprites. Problem is that it's using the vanilla sprites and i don't think there is a way to split up sprites. If there is then please tell :)

Re: Increase Max Sprite Size

Posted: Sat Jun 20, 2015 10:06 pm
by ThaPear
keyboardhack wrote:I am currently making a mod that changes the sprites. Problem is that it's using the vanilla sprites and i don't think there is a way to split up sprites. If there is then please tell :)
I do not understand, how do you make higher quality sprites from the original sprites?
You can use any image editing application (such as GIMP (free)) to split it into multiple parts if you're editing the sprites anyways.

Re: Increase Max Sprite Size

Posted: Sat Jun 20, 2015 11:51 pm
by keyboardhack
ThaPear wrote: I do not understand, how do you make higher quality sprites from the original sprites?
I am using a program to do that for me. It looks very good.
ThaPear wrote: You can use any image editing application (such as GIMP (free)) to split it into multiple parts if you're editing the sprites anyways.
Sorry my question was a little misleading. I want to know how you make the game use two different sprites after each other for the same animation.

As an example i can split the Assembling-machine-3 animation up into 2 different sprites.
Now i have two sprites with half of the animation on each sprite. I need the code to understand that it has to use the second sprite after it's done with the first half of the animation on the first sprite.

Below is the game code that uses a single sprite to make the assembly-machine animation.

Code: Select all

    animation =
    {
      filename = "__base__/graphics/entity/assembling-machine-3/assembling-machine-3.png",
      priority = "high",
      width = 142,
      height = 113,
      frame_count = 32,
      line_length = 8,
      shift = {0.84, -0.09}
    },
I have been looking around and i haven't found a way for the code above to use two sprites for the animation instead of only one.

Re: Increase Max Sprite Size

Posted: Sun Jun 21, 2015 4:58 am
by sillyfly
Some entities, like the locomotive, use something like this:

Code: Select all

filenames =
      {
        "__base__/graphics/entity/diesel-locomotive/diesel-locomotive-01.png",
        "__base__/graphics/entity/diesel-locomotive/diesel-locomotive-02.png",
        "__base__/graphics/entity/diesel-locomotive/diesel-locomotive-03.png",
        "__base__/graphics/entity/diesel-locomotive/diesel-locomotive-04.png",
        "__base__/graphics/entity/diesel-locomotive/diesel-locomotive-05.png",
        "__base__/graphics/entity/diesel-locomotive/diesel-locomotive-06.png",
        "__base__/graphics/entity/diesel-locomotive/diesel-locomotive-07.png",
        "__base__/graphics/entity/diesel-locomotive/diesel-locomotive-08.png"
      },
Although now that I look at it, I don't see any animated sprites using this method, so I'm not sure id it's possible. I guess you can try, though...

Re: Increase Max Sprite Size

Posted: Sun Jun 21, 2015 6:42 pm
by ssilk
Moved from Suggestions.

Re: Increase Max Sprite Size

Posted: Sun Jun 21, 2015 7:17 pm
by jorgenRe
I can tell from experience that not every type of entity supports multiple spritesheets. Take the miner as an example :(
Though i may be wrong so take it with a pinch of salt :/
If i am correct however, then i'm sure the devs are working on it right now, and it prob will be made possible when the HD textures come ;)

Re: Increase Max Sprite Size

Posted: Mon Jun 22, 2015 10:27 pm
by keyboardhack
Yeah it looks like not all entities support multiple textures for a single animation.

Entities using the Animation https://forums.factorio.com/wiki/inde ... /Animation can use stripes to split up an animation into multiple textures.
Example from the car entity
car code

Entities using Pictures https://forums.factorio.com/wiki/inde ... atedSprite can use filenames to split up an animation into multiple textures.
Example from the diesel locomotive entity
diesel locomotive code