itch.io is community of indie game creators and players

Devlogs

Big texture into small texture pt2

Funmi
A downloadable game for Windows

https://twitter.com/AndrewNReinke/status/1438489296965492741 for the video thread detailing the whole event :)

Basically, the solution I decided upon was to simply do the two pass structure I had mentioned in the previous (https://andrewnreinke.itch.io/funmi/devlog/294176/big-texture-into-small-texture) dev(b)log.

So the common branch of assembly that's executed will simply just copy the source texture into the dest with no problems.
The not common branch is hit only if the texture's ending corner (top left) exceeds the texture's total bound (size).
So like if the source texture was 1600x1600 = 2,560,000 so if texture bound was 2,560,000 or 2,560,001 for instance, you'd just simply go and do two passes.
Part A will copy up until you hit the upper bound and once done, will reset the texture's pointer to be "at origin", so like 0,0 or maybe you have an offset like 0,0.2 or something and depends on how you index into the texture (i'm integers instead of real numbers so I can guarantee the index value 100% of the time but float really shouldn't be a huge problem in this case if you were to use them).
Part B is just the same code as the common branch IE it just copies wherever the source texture pointer is into the dest until dest is full.

And that's literally it. I did have a quite nasty bug that the twitter thread I linked captured where I just simply didn't think the problem through from the "correct" standpoint that was one of the many standpoints to solve the bug I had.

If anyone is trying something similar to what i've described in these past two devlogs and is having issues or concerns / questions, please leave a comment or mail me (info in readme) / DM me on any linked site (including this one if it's possible).
Thank you!

Files

  • Funmi_Windows.exe 206 kB
    Sep 16, 2021
  • English_Controls.txt 2 kB
    Sep 16, 2021
  • English_README.txt 1 kB
    Sep 16, 2021
  • 日本語_Controls.txt 2 kB
    Sep 16, 2021
  • 日本語_README.txt 935 bytes
    Sep 16, 2021
Download Funmi
Leave a comment