Homebrew I can't convert sprite

Grizlu

Member
OP
Newcomer
Joined
Feb 8, 2023
Messages
5
Trophies
0
Age
20
XP
26
Country
Korea, South
It sounds sily, but I have no idea in converting image into .img and .pal. How can I make it?
 

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
36,798
Trophies
3
XP
28,348
Country
United Kingdom
Do you know about the graphics in general?
If not short version is most 2d graphics systems revolve around tiles (usually 8x8 or 16x16 blocks but can be more custom sizes) which get arranged into greater images where necessary, and rather than each of those blocks having colours individually they instead do a paint by numbers approach with the palette being the key. You can also change the palette during play to some types of animation, but most animation will be based around moving sprites around on screen (translation, rotation, scaling in some cases and other such things being available) or swapping them out for other things (hands up, hands down sort of thing).
This tile approach is also used whether you are doing objs/sprites or backgrounds (usually far larger images aimed at being backgrounds, though also used for text). Backgrounds being handled by maps if you look up internal naming conventions where sprites/objs are handled by the OAM/object area memory.
While palette approaches are the most common one then "bitmap" ones where each pixel is its own colour are a thing for certain graphics modes and types.

You will want to know that as it helps designing the images you convert to it to work better. In an ideal world the images you make would be done using a paletted/indexed mode to begin with but most conversion tools will at least attempt to crush it down for you by matching similar colours.

Tools to do it vary. Devkitpro/devkitarm does feature a few minor tools to do it, many ROM hacking tools will also allow import of BMP and PNG images (though that is usually aimed more at hackers wanting to export the image to edit in something like GIMP or photoshop). https://gbadev.org/tools.php?section=Graphics has a whole bunch of things for the GBA which is very very similar to the DS so most will be useful for this.
The DS does have a variety of graphics modes as well (more colours and large images using more of the very limited memory and also taking longer to handle so losing some flexibility of smaller lower colour options). http://www.coranac.com/tonc/text/bitmaps.htm is again for the GBA but covers a lot but http://problemkaputt.de/gbatek.htm#dsvideo has DS specifics if you want them. That gets a bit involved in hardware discussions where your development tools might abstract it away for you, or only need the basic inputs.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • BigOnYa @ BigOnYa:
    I kept thinking jaws was gonna come up and attack
  • K3Nv2 @ K3Nv2:
    Jaws is on a diet
  • K3Nv2 @ K3Nv2:
    Damn power went out
  • BigOnYa @ BigOnYa:
    Ok xdqwerty, your little bro prob tripped On the cord and unplugged you
  • K3Nv2 @ K3Nv2:
    Ya I'm afraid of the dark hug me
  • BigOnYa @ BigOnYa:
    Grab and hold close your AncientBoi doll.
  • K3Nv2 @ K3Nv2:
    Damn didn't charge my external battery either
  • BigOnYa @ BigOnYa:
    Take the batteries out of your SuperStabber3000... Or is it gas powered?
  • K3Nv2 @ K3Nv2:
    I stole batteries from your black mamba
    +1
  • K3Nv2 @ K3Nv2:
    My frozen food better hold up for an hour I know that
  • BigOnYa @ BigOnYa:
    Or else gonna be a big lunch and dinner tomorrow.
  • BigOnYa @ BigOnYa:
    Did you pay your power bill? Or give all yo money to my wife, again.
  • K3Nv2 @ K3Nv2:
    Oh good the estimated time is the same exact time they just said
    +1
  • BigOnYa @ BigOnYa:
    Load up your pc and monitor, and head to a McDonalds dining room, they have free WiFi
  • K3Nv2 @ K3Nv2:
    Sir please watch your porn in the bathroom
    +2
  • BigOnYa @ BigOnYa:
    No sir we can not sell you anymore apple pies, after what you did with the last one.
  • K3Nv2 @ K3Nv2:
    We ran out
  • HiradeGirl @ HiradeGirl:
    for your life
    +1
  • K3Nv2 @ K3Nv2:
    My life has no value my fat ass is staying right here
  • K3Nv2 @ K3Nv2:
    Nearly 4 hours without power :(
  • Veho @ Veho:
    SO POWERLESS
  • K3Nv2 @ K3Nv2:
    Tell Kanye I need power
    K3Nv2 @ K3Nv2: Tell Kanye I need power