After setting up the whole scene with all the models, objects, sprites, and the like—and animations working as intended—the one thing that is required to properly finish it is lighting. Here, we have the choice to use either precalculated, static lighting or lighting that is calculated dynamically as things change in the scene. Which one is more desirable depends on the complexity of the scene, the resources available on the platform you use, and many other factors.
In this chapter we will look at static lighting, while the topic of dynamic lighting will be covered in the following chapter. Topics that will be covered here are as follows:
Adding static lighting to 2D and 3D objects
Baking of lightmaps
Adding shadows via shadow mapping or volumes
Using shaders to add AndEngine lighting effects