Homebrew Trouble with Affine Backgrounds in NFLib

  • Thread starter Thread starter JoeySyntax
  • Start date Start date
  • Views Views 1,503
  • Replies Replies 3

JoeySyntax

Well-Known Member
Member
Joined
Nov 12, 2020
Messages
112
Reaction score
84
Trophies
1
Age
26
XP
1,195
Country
United States
I was trying to do a test involving affine backgrounds, but I can't seem to get it up on running. I have made the image in GIMP as a 512 x 512 background, and after adding it to my code, it gives this error:

desmume-screenshot-0.png


I have also tried making it a 256x256 image as well, but to no avail. If there is a solution to this, that would be great.
 

Attachments

Ok, seems the error explain much, its all about tiles amount in image (max 256).
So we have tiled image again that is supported by nds hardware but ...
tiles.png

Now we can count amount of tiles, dividing lenght of file by 64 (211328/64 = 3302) or (height of this image divide by 8 26416/8 is also 3302) so 3302 unique tiles is too much for nflib support, even 256x256 image will be too big (around 800 tiles). To create background image probably some editor for tiled maps will be handy or working on grids (8x8) in any graphic program. For regular background you could use transforms like rotation or miror, so visualy it could be more than 256 unique tiles, but for affine background you can't do it. It shows clearly map file structure... where affine map file is 2 times smaller and one byte per tile.
 
Last edited by plasturion,
Ok, seems the error explain much, its all about tiles amount in image (max 256).
So we have tiled image again that is supported by nds hardware but ...
View attachment 322371
Now we can count amount of tiles, dividing lenght of file by 64 (211328/64 = 3302) or (height of this image divide by 8 26416/8 is also 3302) so 3302 unique tiles is too much for nflib support, even 256x256 image will be too big (around 800 tiles). To create background image probably some editor for tiled maps will be handy or working on grids (8x8) in any graphic program. For regular background you could use transforms like rotation or miror, so visualy it could be more than 256 unique tiles, but for affine background you can't do it. It shows clearly map file structure... where affine map file is 2 times smaller and one byte per tile.
Do you know good software for editing tiled maps?
 

Site & Scene News

Popular threads in this forum