AuthorTopic: Making night sprites for a game??  (Read 4489 times)

Offline Sabata

  • 0001
  • *
  • Posts: 99
  • Karma: +0/-0
    • View Profile
    • TownsLife

Making night sprites for a game??

on: September 21, 2008, 05:03:45 pm
I have this question I would like to ask, does anyone knows a good way of making nigh version of tiles, sprites for a game whiteout recoloring it all... I would like good quality, is there a way of making color overlay, brightness change or something which would make this effect?

Offline LoTekK

  • 0010
  • *
  • Posts: 215
  • Karma: +1/-0
    • View Profile
    • LoTekK.com

Re: Making night sprites for a game??

Reply #1 on: September 21, 2008, 08:08:50 pm
Couple ways I can think of offhand:

1. If you've managed your palettes properly, you could do a palette swap
2. If your engine has pixel shader support, you could write one that darkens and hue shifts the entire screen
3. If you don't want to use pixel shaders but your engine is 3D-accelerated, you could render-to-texture the entire screen (per frame) and experiment with GLBlendFunc to darken the screen

Offline Helm

  • Moderator
  • 0110
  • *
  • Posts: 5159
  • Karma: +0/-0
    • View Profile
    • Asides-Bsides

Re: Making night sprites for a game??

Reply #2 on: September 21, 2008, 08:11:07 pm
Also you can take all your sprite art and run a colors filter on it in photoshop and tweak to your heart's content.

Offline LoTekK

  • 0010
  • *
  • Posts: 215
  • Karma: +1/-0
    • View Profile
    • LoTekK.com

Re: Making night sprites for a game??

Reply #3 on: September 21, 2008, 08:36:26 pm
That would be relatively labor-intensive, though, not to mention resource-inefficient (you'd end up having multiple tilesets per lighting situation).

I personally think a pixel shader would be ideal, since it would allow you to customise to a high degree the night look (or other lighting moods, such as, eg, red warning lighting). You could also fade the edges of the screen to black, etc. A pixel shader would even allow you to gradually shift from day to night relatively convincingly.

Offline Beoran

  • 0010
  • *
  • Posts: 112
  • Karma: +1/-0
    • View Profile

Re: Making night sprites for a game??

Reply #4 on: September 22, 2008, 06:04:08 am
Apart from what is mentioned aboven you could:

  • Use a command line tool such as ImageMagick or Graphics magic to do a batch conversions (you can modify all files in one go).
  • Simply render a semitransparent black or dark blue rectangle over everything, just before rendering to screen. This is especially easy in SDL-based games.
Kind Regards, Beoran.

Offline ndchristie

  • 0100
  • ***
  • Posts: 2426
  • Karma: +2/-0
    • View Profile

Re: Making night sprites for a game??

Reply #5 on: October 07, 2008, 04:31:56 pm
fil suggested to me a system which adds about 50 blue and takes about 20 red and green from the entire screen in Flash, which he put together in a few minutes.  I don't know the specifics though or what program you are using...
A mistake is a mistake.
The same mistake twice is a bad habit.
The same mistake three or more times is a motif.

Offline Sabata

  • 0001
  • *
  • Posts: 99
  • Karma: +0/-0
    • View Profile
    • TownsLife

Re: Making night sprites for a game??

Reply #6 on: October 08, 2008, 07:07:08 pm
Programming is made from scratch on C++ we are building a new engine for it...
Thanks for the ideas, I guess I'll be testing each and every method until finding the most appropriate one.  :)

Offline Demon

  • 0001
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile

Re: Making night sprites for a game??

Reply #7 on: October 09, 2008, 09:15:21 pm
The easiest(depending on language and library) and most efficient way is to use a Pixel Shader as suggested.