Let's take a look at Diablo's resources with extraction tools. There are a lot of "parts" in the game combination, Figure Assembly: head + Shoulder + Arm + Body + Leg + Shield + Weapon + Arrow
S2: Shoulder
S1: Shoulder
SH: Shield
TR: Body
RH: Weapon
LH: Weapon
LA: Left Arm
RA: Right Arm
HD: Head
LG: Leg
These components need to have a combination location, and because of occlusion, they also need a combination order. The component itself needs an index, or maps to a source or an address. In this case, a component must be composed of four values (xPos, yPos, zIndex, and sourceIndex) at one time. Several components, or several such data, constitute a complete presentation element CUIElement. I think in game development, "you have to pull your car and look up your head ". It is necessary to design exquisite and meticulous algorithms to solve specific problems and display the game. At the same time, it is necessary to have a general picture and stand at a higher level to view the problems encountered, you must always be clear about your hierarchy and abstract it at the right time. You cannot fall into the ocean of details, but at the same time, you must avoid abstraction for abstraction and go into another misunderstanding.
To solve this problem, we imagine that if we can embody the "data-driven" idea, we can encapsulate and decouple it to avoid mutual interference, which makes this seemingly complex and has a large amount of data, it is a good solution to concentrate on a single layer with good modularization and high efficiency.
Diablo II has been created for a long time, and the image fineness cannot be compared with the present, and the face is almost invisible. There is no concept of a hat in it. However, DNF has been split, and the combination methods are different. DNF has a bottom-layer bare mold, which is relatively fine. From this point, DNF is more like superposition, while Diablo is more like combination.
Although Diablo II has been a task of the last century, it can indeed be called a classic. As far as the movements of characters are concerned, Diablo II is very refined and natural, with a good sense of operation. Although many games have fine image quality and exquisite pictures, they feel obvious when trying to get started. :), I am a little white guy playing games. These are what Jack told me. Although the results are very good, specifically WebGame, it cannot download a large number of resource files like client games; it cannot use DX; so if you want to use Silverlight technology to achieve a Diablo, you want to achieve the same effect, the number of combination methods will be huge. How to Deal with them requires constant attempts and careful consideration to strike a good balance in all aspects.
The composition of the character is closely related to the backpack system. In fact, the classification of the character is directly driven by the classification of the character. We can see that they are basically consistent, but they are still different. In terms of gaming, users make changes to their own equipment, and they certainly want to feel this change, but sometimes, this kind of change is hard to feel in 2D games, especially when the characters are relatively small, such as rings, necklaces, and even gloves. There are other differences, for example, although no arm or shoulder is configured separately, when using GameSprite to parse resources, I still see the independent left and right shoulder and right arm. I guess it is for smooth and natural movements, there are still color changes in the game. For example, if the armor with blue Gems is embedded, a blue light is displayed and blue is displayed as a whole. These are good practices for user experience. (Of course, programmers may not be so happy .)
The figure below is an image extracted from Game resources, which may give us some inspiration. My ideas are all based on these clues, because the image extraction principle is very unfamiliar, and game development materials are also very scarce, I really want to find some research and development materials on the division of Characters in the game. I am also disappointed. If any of my friends have good information, I would like to tell you. Thank you very much. In this figure, we can see the index, size, location, but not the ZIndex I guess.
After some thought and combined with the previous development experience, we can conclude that: