The game engine now can produce realistic lights from the point with 3D coordinates obtained using filtering a pixel by a pixel of each frame of an animation. The filtering can be performed on the GPU using an OpenCL library. Realistic shadows obtained through non-linear (non-affine) transformations of images. The game is fully 2D. This is great and will look great during gameplay (I'll do this in next post).
The light consists of three components:
1. light on the front;
2. light from the side (forms a lighter layer along the edge);
3. glow.
Manipulating the parameters each of these three components according to the coordinates of a point relative to a center of the image (with any margin) gives the effect.
Follow us on Facebook.