Customizing game sprites with J2ME

You know, my great passion are games, and here’s a first game-related tutorial :)

Often in games a nice feature to give to users it the possibility to customize their own character, for example changing colors of the different parts (hairs, eyes, shirt, and so on).

To support this features there are 2 possibilities:

  • Include a different image for each color of each different part
  • Replace colors by code

The second options will save you the effort to create these multiple images, and will strip down your JAR size. Also, it will allow you to support a lot more colors.

You can see a simple midlet showing how this can be done with simple code on the emulator page

For the full source code you can visit the Forum Nokia Wiki page: J2ME Customizing Game Sprites Color

Be Sociable, Share!