Homebrew Trouble with Affine Backgrounds in NFLib

Project68K

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

plasturion

temporary hermit
Member
Joined
Aug 17, 2012
Messages
1,255
Trophies
2
Location
Tree
XP
3,576
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
72
Trophies
0
Age
24
XP
680
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
  • No one is chatting at the moment.
  • SylverReZ @ SylverReZ:
    @Xdqwerty, It only shows that if you do 'View Source', right below that it'll tell you the SQL response query. I feel like a nerd lol.
  • SylverReZ @ SylverReZ:
    But for everyone, it said unexpected database error.
    +1
  • BigOnYa @ BigOnYa:
    Just said database error for me
    +2
  • Xdqwerty @ Xdqwerty:
    @BigOnYa, she said it only said "too many connections" when you view the source
    +1
  • Xdqwerty @ Xdqwerty:
    btw gonna try to actually beat touhou 6
    +1
  • SylverReZ @ SylverReZ:
    @Xdqwerty, Have fun.
    +1
  • Xdqwerty @ Xdqwerty:
    @SylverReZ, i recall playing some hard undertale fangames way before playing touhou, like the genocide asgore fangame or the mettaton neo 2.0 one
  • Xdqwerty @ Xdqwerty:
    so atleast im already kinda used to bullet hell games
  • Xdqwerty @ Xdqwerty:
    and yea i played both undertale and deltarune too although those are a piece of cake compared to any touhou game
  • Xdqwerty @ Xdqwerty:
    aaaaaaannnnnnd i already lost all my continues
  • Xdqwerty @ Xdqwerty:
    I only set three default lives btw
  • Xdqwerty @ Xdqwerty:
    cuz of score
  • Xdqwerty @ Xdqwerty:
    i think i first should focus more on beating the game rather than obtaining a high score
  • Xdqwerty @ Xdqwerty:
    good night
  • K3Nv2 @ K3Nv2:
    yawn
  • BigOnYa @ BigOnYa:
    -deleted-
  • K3Nv2 @ K3Nv2:
    Stop ctrl cing me
  • BigOnYa @ BigOnYa:
    Sorry, here ctrl-Z
  • K3Nv2 @ K3Nv2:
    Ctrl u 2 u
  • BigOnYa @ BigOnYa:
    Damn, that turned my tv channel, you got powers
  • K3Nv2 @ K3Nv2:
    The fbi will be knocking on your door soon
  • Psionic Roshambo @ Psionic Roshambo:
    They all went mad after looking at my browser history
  • BigOnYa @ BigOnYa:
    Why, cause beastiality is not legal in Florida yet?
  • K3Nv2 @ K3Nv2:
    @Psionic Roshambo, they rewrote the constitution when they saw your browser history
    K3Nv2 @ K3Nv2: @Psionic Roshambo, they rewrote the constitution when they saw your browser history