My ambition is to have some sort of pretty lighting and still have it perform well in a multiplayer environment.
Referring to this video... http://webmshare.com/DAWLx
For the shadows on the ground, I am creating an overlay for the light orb and modifying these overlays' transforms every server tick, and keeping the light orb on KEEP_TOGETHER and BLEND_ADD. This way the shadows can correctly interact with other light sources. However, I would prefer to not recompute and change these shadows transforms every tick, and instead do it maybe once every other or every third server tick. Because these shadows are overlays of the lights and not to the objects that are casting them, doing so will make the shadows look choppy.
The reason why the shadows move smoothly in this video is because their transforms and pixel offsets are updated every tick. The transform does not change much tick per tick, so if the shadows moved correctly with the objects that are casting them without having to remove and reapply the overlay and without having to update the pixel offset of the shadow appearance, the transform would not need to be recomputed and updated every tick.
I would like the shadows' location to be "parented" to the objects that are casting them, but I still want them to be "kept_together" with the lights to mask them to the light, so I can have multiple lightsources affecting the same object.
So in other words, in my ideal world shadows would be underlays to the mobs in the video, and the shadows' appearance would have some tie in to the lights that they are associated with so that they can be "kept_together" with the light.
Feb 2 2016, 2:29 pm