Help! Cross-mod sprite contamination while under limit

Discussion about Mods for Prison Architect

Moderator: NBJeff

User avatar
Brento666
level3
level3
Posts: 290
Joined: Wed Sep 02, 2015 9:23 pm

Help! Cross-mod sprite contamination while under limit

Postby Brento666 » Mon Oct 19, 2015 9:57 pm

Hi, I am experiencing cross-mod sprite contamination, while using three mods of mine;
-two have 1024x1024 sprites.png's.
-one has a smaller 256x512 image.

Objects from 1 mod get sprites from another mod's png! The coordinates of the sprites in the files seem to match, but PA is using the completely wrong sprites.png in only a few cases! ...I am unsure what's happening, the mod's don't share any objects or even really interact with any of the other mod's objects actively.

Anyone experienced this? Do I have too many sprites defined or something? All my mod files are pretty clean, no comments hashes, no test remnants/variations...

-> The mods work fine 1 by 1 or 2 at a time. But all 3 mods applied together gives sprite-bleed in some cases.

Can anyone help me out please?
User avatar
aubergine18
level2
level2
Posts: 231
Joined: Sun Jul 05, 2015 3:24 pm

Re: Help! Cross-mod sprite contamination while under limit

Postby aubergine18 » Mon Oct 19, 2015 11:32 pm

It's because of this: viewtopic.php?f=88&t=50923

Depending on the load order of mods, they will have their sprites.png file arranged in the one 2048x2048 image space that's reserved for all mods. As soon as that fills up sprites will get pushed out and the mod that uses those sprites will end up with sprites from another mod. It's just some bad design on part of the game devs.
User avatar
Brento666
level3
level3
Posts: 290
Joined: Wed Sep 02, 2015 9:23 pm

Re: Help! Cross-mod sprite contamination while under limit

Postby Brento666 » Tue Oct 20, 2015 12:21 am

aubergine18 wrote:Depending on the load order of mods, they will have their sprites.png file arranged in the one 2048x2048 image space that's reserved for all mods. As soon as that fills up sprites will get pushed out and the mod that uses those sprites will end up with sprites from another mod. It's just some bad design on part of the game devs.

Thanks for the reply Aubergine18! I had read that sticky, according to it I should be able to have 4 mod's with 1024x1024 png's

I am running into problems before that those figures;
2x 1024x1024
+ 1x 256x512

So I am running into a deficit of space way before 2048x2048 ...

Technically on 1 of the mods I do have a few sprites defined partially running over the limits (to save space I stacked some type 6 doors; so some run over 64 pixels to the right). Would this give me the smaller overall limit? I hope not... will have to test this before I release something people will be extra limited by... :|

Would like to know if people are running other mods that together almost reach the 2048x2048 limit, have you or anyone tried running many (big-sprited) mods at once recently?

I am wodering If it could be that the limit was lowered by the PA launch's extra content, and not my efficient packing and stacking of sprites...?
User avatar
aubergine18
level2
level2
Posts: 231
Joined: Sun Jul 05, 2015 3:24 pm

Re: Help! Cross-mod sprite contamination while under limit

Postby aubergine18 » Tue Oct 20, 2015 5:12 am

The max size of the "image area reserved for all mods" seems to be 2047x2047, rather than 2048x2048.

Next, it depends on order loaded as to how well packed the sprites.png files are within that image. I'm not sure what packing algorithm they use, but it seems a bit dubious. Also the entire sprites.png is put in, not just the sprite parts - so if you've got a load of empty space in your sprites.png it will still hog the space in the compiled image.

Other than those random notes, I'm not sure what else to try. Just have to find some way to squeeze the sprites in to smaller space.

Oh, and everyone reading this please vote for & comment on these issues in mantis:

* http://bugs.introversion.co.uk/view.php?id=9818
* http://bugs.introversion.co.uk/view.php?id=9729 - seems pixel limit for an individual sprites.png is also fubar
* http://bugs.introversion.co.uk/view.php?id=9618
User avatar
Brento666
level3
level3
Posts: 290
Joined: Wed Sep 02, 2015 9:23 pm

Re: Help! Cross-mod sprite contamination while under limit

Postby Brento666 » Tue Oct 20, 2015 8:14 am

aubergine18 wrote:The max size of the "image area reserved for all mods" seems to be 2047x2047, rather than 2048x2048.

Next, it depends on order loaded as to how well packed the sprites.png files are within that image. I'm not sure what packing algorithm they use, but it seems a bit dubious. Also the entire sprites.png is put in, not just the sprite parts - so if you've got a load of empty space in your sprites.png it will still hog the space in the compiled image.

Other than those random notes, I'm not sure what else to try. Just have to find some way to squeeze the sprites in to smaller space.

Oh, and everyone reading this please vote for & comment on these issues in mantis:

* http://bugs.introversion.co.uk/view.php?id=9818
* http://bugs.introversion.co.uk/view.php?id=9729 - seems pixel limit for an individual sprites.png is also fubar
* http://bugs.introversion.co.uk/view.php?id=9618

Thanks for that plausible explanation of what's going on here... If it is 2047x2047 atm, that would be most limiting to using multiple mods in general!
-But it would also mean, I just have to shave off some fat somewhere! I think I could quite easily do that with 1 of the larger ones, as I took out a considerable chunk of that one, to start the one that is using about 80% of 1024xx1024 and about near darn done ready for a first release... 8)

Tnx a hole bunch! I am glad to report it isn't my mods's individual fault, but yeah collectively they certainly cross over some darndid limit! I know that for sure now after allot more testing... :mrgreen:
User avatar
Brento666
level3
level3
Posts: 290
Joined: Wed Sep 02, 2015 9:23 pm

Re: Help! Cross-mod sprite contamination while under limit

Postby Brento666 » Tue Oct 20, 2015 9:56 am

aubergine18 wrote:* http://bugs.introversion.co.uk/view.php?id=9729 - seems pixel limit for an individual sprites.png is also fubar


So I don't experience this 1023x1023 limit, on a single mod's sprites... can you retry? What rot-type where you using, some like 6 are weird to position, but work when offset correctly at edges for me...

Can you retest?
User avatar
aubergine18
level2
level2
Posts: 231
Joined: Sun Jul 05, 2015 3:24 pm

Re: Help! Cross-mod sprite contamination while under limit

Postby aubergine18 » Tue Oct 20, 2015 4:19 pm

I was using RT of 4 IIRC.

Return to “Modding”

Who is online

Users browsing this forum: No registered users and 30 guests