HUD
To understand how heads-up display works, simply imagine that we draw something on a piece of glass and put this glass in front of a camera in a way that whenever the camera moves, the glass moves with it. This is exactly what we need to display the score.
AndEngine has a concept of camera scene, a scene that works as the glass. HUD is a special camera scene that has no background, so it is always see-through.
Have a look at the following illustration of how the HUD works. The black rectangle defines the visible portion of the scene. The HUD is the translucent rectangle. The resulting image has the text in the top-left corner. Even if the visible portion of the scene changes because of camera movement, the text will stay in the corner.
Another important feature of the HUD is that it is always drawn last. Even if we set a z-index of an entity to a lower number in the HUD than all the other entities in the scene, the HUD entity will be drawn on top of them. An entity attached to the HUD...