Thread: [Tutorial] Indexing Sprites
View Single Post
  #1    
Old February 23rd, 2008 (02:19 PM). Edited March 17th, 2008 by RedYoshi.
RedYoshi's Avatar
RedYoshi RedYoshi is offline
Wah! Yoshi!
 
Join Date: Feb 2008
Location: Yoshi's Island, DUH.
Age: 22
Gender: Male
Posts: 215
Indexing Sprites

Hey guys, today I'm going to show you how to index your sprites and later inserting them into your ROM.

Materials Needed (Method I use)
-Irfanview
-Microsoft Paint
-Unlz-Gba
-A sprite

Part 1 - Indexing the Sprite

So in this tutorial I will be using a YOSHI sprite. :D

So here we go, first of all make your canvas in paint 64x64



Once that's done you need to make sure your sprite can fit in that space if not try re-sizing it.

So once you have your sprite you just copy and paste it onto the blank 64x64 canvas. Now save your image as a PNG.



Now that thats done it's time to index it!

So to index it you open up Irfanview and open up your image.
Now go to IMAGE and click on DECREASE COLOR DEPTH.



Once you're there select 16 COLORS (4 BPP), and click on OK.
(4th-pic)

Now you have your sprite indexed!!:D

But WAIT!! There's still that white background!!

All right so now go to Image->Pallete->Edit Pallete.



Now keep this in mind, the first color on the pallete entries is TRANSPARENT.



Now let's change that color, so double click on that and you'll get this color selection screen, so now choose a color and save your image. Your sprite will look a little bit messed up if you had a black outline or something like that.

So now open up PAINT again and open up your image and edit any errors on it and add your transparent background color.



Congratulations you have indexed your sprite and it is ready to be put in the game!

But wait a minute!! What if you don't know how to add it into the game??? No worries, I'll show you how!

Part 2 - Putting it into the ROM.
MAKE SURE THE SPRITE YOU ARE REPLACING IS BIGGER OR AS BIG AS THE SPRITE YOU ARE INSERTING INSERTING OVER A SMALLER SPRITE CAN LEAD TO YOUR PIC LOOKING ALL MESSED UP WITH SOME UNWANTED PIXELS.


All right, so now that you have your indexed sprite it's time to open up UNLZ-GBA.

So do that and search for the images in 667-1441 (POKEMON SPRITES - FIRERED)

All right so now you look for a Pokemon which is meaningless to you or you don't want in ROM and simply OVERWRITE it.

Note: I still don't know how to add them over the 25 empty slots

So go to IMPORT and click on your Indexed Sprite then simply click on WRITE TO ROM and tick all the boxes and then click on OK. In this case I will overwrite IVYSAUR.

There it is! It's in the ROM now! So now go ahead and test it!

If you did this correctly it should appear in the game.



Congratulations! You have successfully indexed your sprite and put it into the ROM!

RESIZING YOUR IMAGE
Well this shouldn't be too hard, really. But anyways if you have a huge sprite such as D\P sprites and you want to insert them to your game then you'll need to re-size since you can only use 64x64.
With D\P Sprites this should be easy heres what you need.

-Sprite (Indexed or not)
-Irfanview

Well first of all open up your sprite in Irfanview and then goto Image->Resize Resample. One there you disable "PRESERVE ASPECT RATIO" and thne where it says "Set New Size" just set the width and height to 64. There you have it, your sprite can now be inserted to your rom. But It may look a bit...pixelated so you may want to edit it a bit and then insert it.

I will also be releasing a few sprite packs (indexed) but not in this thread.