Homebrew Trouble with Affine Backgrounds in NFLib

Project68K

Well-Known Member
OP
Newcomer
Joined
Nov 12, 2020
Messages
70
Trophies
0
Age
24
XP
676
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: 29
  • transition_test.zip
    1.1 MB · Views: 26

plasturion

temporary hermit
Member
Joined
Aug 17, 2012
Messages
1,242
Trophies
2
Location
Tree
XP
3,553
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
70
Trophies
0
Age
24
XP
676
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
  • The Real Jdbye @ The Real Jdbye:
    $60 for a game that's a decade old might be unheard of on PC but actually is not uncommon on consoles
    +1
  • The Real Jdbye @ The Real Jdbye:
    especially Nintendo because they only ever lower the price of games when they do a greatest hits/platinum hits/players choice re-release
  • Xdqwerty @ Xdqwerty:
    @The Real Jdbye, and the HD collections released for 7th gen consoles too
  • The Real Jdbye @ The Real Jdbye:
    but they don't seem to have done any of those for the switch yet and maybe never will
  • ColdBlitz @ ColdBlitz:
    I think we all forgot breath of the wild released for the wii u tbh
    +1
  • Xdqwerty @ Xdqwerty:
    @The Real Jdbye, tbh the HD collections are more justified since they include more than just 1 game per copy
  • Xdqwerty @ Xdqwerty:
    @SylverReZ I read that non-binary people identify as a blend of male and female. The point is i think i'm a blend of those and thus non binary
  • SylverReZ @ SylverReZ:
    @Xdqwerty, Non-binary people are those who don't identify themselves exclusively as male or female.
  • cearp @ cearp:
    I don't identify as anything, unless I need to get on a plane then I show ID
    +3
  • AncientBoi @ AncientBoi:
    👈 [homo, queer, fag, coksuqr, etc......]
    +3
  • Xdqwerty @ Xdqwerty:
    @SylverReZ, I meant that I read that they can also identify as what i mentioned
    +2
  • BigOnYa @ BigOnYa:
    I identify as Long Rod Johnson, cause a cat called me that once.
    +2
  • AncientBoi @ AncientBoi:
    [takes a 👀 in your pants] Liar :angry:
    +3
  • Xdqwerty @ Xdqwerty:
    @SylverReZ, and thus that would make me non binary since i feel like a blend of both male and female
    +1
  • AncientBoi @ AncientBoi:
    @Xdqwerty only time will tell, what/whom you are. At 14, its a bit early to "Define" yourself. :)
    +3
  • Psionic Roshambo @ Psionic Roshambo:
    I only recently have learned who I am and how much I am capable of and I'm 50 lol
    +3
  • Psionic Roshambo @ Psionic Roshambo:
    A thousand epiphanies and unbelievable pain and growth.
    +2
  • Psionic Roshambo @ Psionic Roshambo:
    I wish I could sum it up for children to understand but it truly takes living a lifetime of learning
    +2
  • Psionic Roshambo @ Psionic Roshambo:
    It's more than knowledge it's understanding
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    Both are required
  • Xdqwerty @ Xdqwerty:
    @Psionic Roshambo, ask chatgpt or Google gémini to summarize it
  • Psionic Roshambo @ Psionic Roshambo:
    Lol summarize life's lessons
  • BigOnYa @ BigOnYa:
    My wifey tells me all the time "You need to grow the fuck up." Which I don't understand, cause I'm full grown already.
    +2
  • Xdqwerty @ Xdqwerty:
    @BigOnYa, she means grow more
    +1
    Xdqwerty @ Xdqwerty: @BigOnYa, she means grow more +1