A detailed description of 2D game drawing method based on tiled

Source: Internet
Author: User


1 Introduction 1.1 Purpose and Scope

Game engine as the basis of game production is to ensure the most important part of game quality, currently mainly includes two aspects: background drawing and animation play.

in order to enable new employees to have a deep understanding of the current development of mobile games, this document describes in detail the current use of background rendering principles and specific implementation methods. 1.2 abbreviation

GD Game Design

BG Background 1.3 Reference

[1] Cao Heng, Gameloft, "Training Minutes for Game Tools", V0.002. 2 tiled Background 2.1 What is tiled Background

The background of the game scene is to show a huge image, it is the game designer to show the game environment and atmosphere of an important means. Whether for PC games or other platform games, the huge background will bring capacity problems, and capacity for mobile games is very valuable.

In order to draw as many backgrounds as possible with as few diagrams as possible, the background image is made up of countless equal-sized shapes, which usually use squares. The types of these graphs are limited, but each one may be used many times. Just like the tiles on the wall, you can make unlimited combinations with a limited variety. The graphics that make up the background are called tiles, and the background using tiles is called tiled Background.

Finally, we save all tiles used for stitching a background in an image, which forms the image resources we use in the game, which we often call Tileset. Also, each Tile in the Tileset is numbered, in order from left to right, top to bottom, as shown below.

0

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

By numbering, we can represent each tile that makes up a huge background with the tile's index value (index) in Tileset, as shown below.

4

5

7

18

8

4

5

7

18

8

4

5

7

18

8

9

0

1

11

13

9

0

1

11

13

9

0

1

11

13

10

6

17

2

12

10

6

17

2

12

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.