C # development Wpf/silverlight animation and game series Tutorials (Game Course): (11) The realization of the map mask layer
The previous chapters are mainly for the map presentation layer. Generally speaking, simple game light has it is enough, but in order to achieve more realistic lighting effects, simulation of the real virtual world, we have to continue to work on the map up and down. This section explains how to implement the mask layer in the map, that is, the object's occlusion of the persona.
First, let's take a look at a more complete map of what should be included:
As you can see from the picture above, I have divided a map engine structure into 3 layers (is this the legendary three-tier architecture of the map)? Sweat one first ... )。 The middle picture represents the map's presentation layer, which is the map interface that we visually see directly. There are a lot of explanations in the previous chapters, and this is no longer a tiring story. Then we look at the bottom: the map, which consists of black and white color, there seems to be a circle of yellow in the right small corner. Some friends think it is very strange, it seems to touch the mind, as if it has nothing to do with the map? In fact, as long as it and the second diagram to analyze the comparison will find that it is the black on the map of the barrier area, White is a passable area, that yellow?? There are friends to ask: The previous chapter is not a * * to find a way? Is it perfect to build an obstacle by matrix[an array? Then why do you have to bother to construct a same proportion of obstacles to each map of the underlying diagram? I just want to tell the broad masses of friends: its role can be large, especially in the current Silverlight game development, its role and expansion of the past, with the scientific concept of development is: object-oriented thinking development Silverlight game. Too many too many suspense, can have more anticipation, then about this mysterious bottom map explanation, please listen to the next analysis.
Reader Voice: Comrade, you are too fake, so you finish this section? BS you a bit.
Author: Ann, How could it be, it's called flashbacks, okay? (What is called flashbacks in fact, I am not too ...?) Hey
No nonsense, there is still a picture did not say it, right, the protagonist of this section is it: Map mask layer.