Jump to content

  • Log In with Google      Sign In   
  • Create Account


Change player color


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   -  Reputation: 138

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.



Sponsor:

#2 mhagain   Crossbones+   -  Reputation: 7812

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   Crossbones+   -  Reputation: 2338

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   -  Reputation: 138

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.



PARTNERS