Jump to content

View more

Image of the Day

Boxes as reward for our ranking mode. ヾ(☆▽☆)
#indiedev #gamedev #gameart #screenshotsaturday https://t.co/ALF1InmM7K
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Change player color

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
3 replies to this topic

#1 oenda   Members   

147
Like
0Likes
Like

Posted 19 May 2013 - 05:38 AM

Hi.I am developing a 2D strategy game like AoE 2.I need to change player color on sprites.How can i do that?

Thanks.



#2 mhagain   Members   

13153
Like
1Likes
Like

Posted 19 May 2013 - 07:11 AM

What have you tried?


It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.


#3 kauna   Members   

2922
Like
3Likes
Like

Posted 19 May 2013 - 04:50 PM

Use 8-bit alpha maks which define the color changing regions. In the default version of the sprite, color the changing areas as white. In the pixel shader, modulate the sprite texel with the desired unit color and then lerp between the original sprite color and the modulated sprite color according to the alpha map.

 

Cheers!



#4 oenda   Members   

147
Like
0Likes
Like

Posted 28 May 2013 - 07:15 AM

Sorry for late post.I will try it.Thanks :)






Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.