Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using RPG-Maker-XP-like sprites (any 2D adventure/RPG style sprites). I would like to tint them so that they look different at different times of day.

Times of the day are the set of:

  • Daytime (normal)
  • Early morning (bluish?)
  • Sunrise and Sunset (orangish?)
  • Night time (dark)

What do I need to do to tint them, and make them look good, during different times of the day? Are there any "known" formulas for any of these times, like "delete the green blue component and tint heavily red+green for a sunrise effect"?

Ideally, I have just the original sprites, with no additional information or images (like spot-highlights or shadows separated out).

Finally, I'm using Silverlight/FlatRedBall for this, so I do have access to per-pixel information, as well as RGB tinting (adding, subtracting, multiplying, etc.)

share|improve this question
For sample images, just run a Google image search for "RPG maker XP" (without the quotation marks). – ashes999 Apr 13 '11 at 18:00
up vote 2 down vote accepted

I'd suggest playing around with Photoshop (if you've got it) with different color/layer overlays, and see if you can't get the visual effect you're looking for. If you can find it, duplicate it in code.

If the sky is visible, consider the idea of fading between two different background images (night sky, day sky). If you're using sprites, you could also consider animating a moon/sun in the sky.

Also, take a look at (as in play) World of Warcraft. Yes, it's 3D, and it has a dynamically lit day/night cycle, but at the same time shadows and lighting of things is totally baked on - the shadows don't move. It's more like what you see in TV shows where they don't actually film at night, but instead film during the day and apply a night time filter. In fact you might consider googling around for how this is done for film as it might give some hints.

share|improve this answer
WoW is out of my reach, but I will try what you said -- that, or whip up an app to quickly load images and visually see how they look with various filters. – ashes999 Apr 14 '11 at 3:35

Color temperature

But basicly it is orange at the morning and evening. White at the day. And blue is used for the night.

For creating shadows you may find useful program crazybump, which can create normal maps for 2D textures.

share|improve this answer
The Wikipedia link is quite technical. Maybe you can explain more how this answer relates to my question; I'm not too sure. – ashes999 Apr 13 '11 at 23:30

What you want is typically called 'color blending'. There's a blog post about how to do it in silverlight here:

As far as what colors to use at different times of the day, that's a much harder question to answer. The colors you included in your post might work, but you might have to play around a bit with the exact values to make everything look 'good'.

It might be worth pointing out that adding shadows to the sprites would likely go a long way to improving the effect of changing the time of day.

share|improve this answer
Dynamic shadows are too tough. And colours is a hard question -- hence why I'm asking! :) – ashes999 Apr 14 '11 at 0:45

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.