Handling RPG maps in a different way---two layers.

Source: Internet
Author: User
Tags net window

Do RPG map can use TBW technology to do mosaic map. But it seems to be too much of a rule. and designing maps is a rather troublesome thing to do.

And now the 2D RPG game generally no longer use the pattern of Mosaic map block. Use picture layer mode instead. This is much better than the previous mosaic map block in the visual effect. If you also think that the puzzle is too much trouble, and do not know what to do with the picture layer map, you can look down.

The so-called use of picture layer map is the original single level of the picture let it show a level of sense. That is, to be able to show the character behind an object. This situation is also manifested in the area of the barrier. The former is solved with mask, The latter is solved with a collision domain. This means at least two special layers for the picture. The mask layer and the block layer. The two layers plus the background picture itself become the whole map.

The green part of the bottom picture is the shape of the mask layer. Also, the roles are displayed only in these areas. In other fields, like those two roofs. The role will not be displayed. It shows the effect of "people behind the house".

These red blocks below represent the shape of the block layer. The character cannot walk into these red areas.

Here is the final effect.

Because the block layer shape is too small, the angle is more, so it is easy to have a bug. But if you set the map to a large size, the block area has fewer corners, and then the role is "bounced" to a larger point. You can avoid such bugs properly. As for collision detection, Please visit the other stickers. I don't need to talk about this. The difference between this model and the TBW map pattern is obvious. It depends on what you think.

The above is a summary of personal experience, if there are similarities, I am honored ...



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.