Any ideas/ways to code 2D lighting effects? Like lets say, its a 2d-top-down game, and if I add lights like torches, lamps etc, i would
like it to illuminate part of the map, in a circular fashion. I am also interested in shadows for objects to cast, well sure i could just use the transparency,
but what if I want any object to cast shadows… in real time, based on the sun’s position, or light casting. Is it possible in 2d? Also when the character
moves i would like a more “circular” fog-of-war" and not just the square tiles (jaggidly) showing more of the map :).
This article describes how it can be done with OpenGL, and perhaps Orangytang can make an appearance and weigh in on its applicability to Java2D.
Take a look at this blog by Romain:
http://www.curious-creature.org/2005/07/07/fast-or-good-drop-shadows/
And another one, by Chris:
http://weblogs.java.net/blog/campbell/archive/2006/07/java_2d_tricker_2.html
Dmitri
thanx. these look like good articles.