[SDL] player character sprite customization

Started by
3 comments, last by eedok 16 years, 11 months ago
Hello again, :) First of all, I would like to thank you guys for all the help you gave me so far, you helped me A LOT. So, now, I'm programming a 2D Online Zelda-style RPG game(i started almost 2 years ago xD), and I was thinking that having the players running around all with equal sprites to each other would be rather dull and would ruin the game. Therefore, I've decided that letting them customize the character sprite, by changing the color of the sleeves, shirt, boots and etc, and if the player is wearing a shield display it, would greatly enhance the game's quality. I think I could "easily" do the part of the display the equipped items on the character, but I absolutely have no idea about the color changing. I've always wondered how they did it in games like Tibia, Ultima Online,Graal Online,etc. Below are links to the sprites, I'm currently using: warrior sorcerer Photo Sharing and Video Hosting at Photobucket ninja Photo Sharing and Video Hosting at Photobucket necromancer Photo Sharing and Video Hosting at Photobucket archer Photo Sharing and Video Hosting at Photobucket Could someone please tell me how to do it or send me a link to some tutorial page that explains it? Oh and what do you think of the sprites? best ones i could find over the net so far :P Thanks in advance, Victor Freire
Advertisement
Oh and I'm not using OpenGL or DirectX, just plain SDL.
Palette swapping?

Or were you wondering more about how to organize the process? If you have a character class which can draw() itself, then you just add a member than indicates which palette swap to use (maybe a "team" identifier?) and apply the appropriate one when drawing.
Palette swapping? hmm do you know of any site with a tutorial on how to do it?

First I hear about this thing and can't find much in google,I'm kinda lost.
Focus on SDL page 67 has information on the subject.

SDL_Palette and SDL_SetPalette are the API calls used.

This topic is closed to new replies.

Advertisement