Homebrew Trouble with Affine Backgrounds in NFLib

Project68K

Well-Known Member
OP
Newcomer
Joined
Nov 12, 2020
Messages
67
Trophies
0
Age
23
XP
658
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

  • transitionScreen.bmp
    257.1 KB · Views: 28
  • transition_test.zip
    1.1 MB · Views: 23

plasturion

temporary hermit
Member
Joined
Aug 17, 2012
Messages
1,227
Trophies
2
Location
Tree
XP
3,525
Country
Poland
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,

Project68K

Well-Known Member
OP
Newcomer
Joined
Nov 12, 2020
Messages
67
Trophies
0
Age
23
XP
658
Country
United States
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

General chit-chat
Help Users
    NinStar @ NinStar: because I already got burned out with breath of the wild, which for the most part is essentially...