If you are doing sprites, save them as 256 color bitmaps. Sprites must be 16 by 16, 32 by 32, 64 by 64, or any combination of the three. After you are done, put the image in the bin folder. Then use DOS. Use the cd command to get yourself to the bin directory. Then type:
gfx2gba -pPalettename.pal -t8 Yourbitmap.bmp
Where Palettename.pal is what you want to call your .pal file, and Yourbitmap.bmp is what the bitmap is called. It should output a palette (.pal) file, and a raw (.raw) file. Now put both of those into the scripts folder. Then, make a .lua file in the scripts folder. Edit it with Notepad or something... here is code to show a simple 32*32 sprite:
SCREEN_BOTTOM = 0
SCREEN_TOP = 1
YourImagePal = 0
Sprite.LoadPalette( SCREEN_BOTTOM, YourImagePal, "SomePalette.pal" )
FRAMESTRIP = FrameStrip.Create( SCREEN_BOTTOM, 32, 32, "256" )
FRAMESTRIP:LoadBin( "SomeRawFile.raw", 1 )
YourSprite = Sprite.Create( FRAMESTRIP, 0, YourImagePal, 32, 0 )
And for maps, it can be any height/width, but it must be:
1. AT LEAST 256 X * 192 Y
2. Height and Width must be a multiple of 8
That's it. Then, save it as a 256 color bitmap and put it in the bin folder. Now use the cd command again to get to the bin folder and type:
gfx2gba -pAnotherPalette.pal -m -t8 MyMapBitmap.bmp
Where AnotherPalette.pal is the palette file it will take, and MyMapBitmap.bmp is the bitmap file for the map. The -m command made it output a .map file, as well. Now put the .pal, .raw, and .map files into the scripts folder. Make another script. Here is an example of creating a 512 * 512 map on the bottom screen:
SCREEN_BOTTOM = 0
SCREEN_TOP = 1
MyBottomMap = Screen.LoadTileBG()
MyBottomMap:LoadPalette( "MyMapPalette.pal" )
MyBottomMap:LoadTiles( "MyMapRaw.raw", 256 )
MyBottomMap:LoadMap( "MyMapMapFile.map", ( 512 / 8 ), ( 512 / 8 ) )
Screen.Initialize( SCREEN_BOTTOM, MyBottomMap )
And if your map is bigger than 256 by 192, you can scroll it by typing:
MyBottomMap:ScrollXY( NewX, NewY )
Enjoy DSLua!