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
    SylverReZ @ SylverReZ: https://www.youtube.com/watch?v=FgwfObY-WDQ