The first is about the production of maps, referring to all the online map making ideas and code, with some of their own ideas, first on the map should be the role of the future to do a certain cushion, and the role of the collision, and then decided to map small elements, such as the game map 1000x1000 pixels, Then a small element is 50x50 pixels, so the pixels are stitched together and then stitched together into a single map. Perhaps 400 small element maps may not be able to represent a full large map, so a few 1000x1000 maps are stitched together to form a large map.
With regard to the storage and display of maps, it is decided to create a 3-layer array to store.
Layer 1: This layer is the land of the foot of the character, such as the earth, grass, or the bridge on the creek.
Layer 2: This layer is the role of the same layer of things, such as trees, stones and other things, and then this layer of detection to achieve the role of collision.
3 Layer: 3 layer for the role of the head of things, such as the cloud, or the eaves of the house or something, because the house is too large, so decided by a few pictures mosaic.
Then is the file storage method, first set up 3 integer array, divided into 3 layers, used for late data storage. Then set up three image arrays, divided into three layers, used to display pictures, and then the name of the image, directly numbered with numbers, such as: Starting from 100 numbering, 100 for grassland. When plotting a map, such as adding a meadow element to the 1 level of the (1,3) coordinate, the integer group is 1[1][7]=100 to store the data and then the array of images is assigned to the image Group 1[1][7]=integer.tostring (integer Group [1][7]) + " PNG ", so as to directly convert the picture, do not have to write a function to search for pictures, and then on the map compiler in the setting of a few buttons what, currently only these ideas.
Four weeks, some ideas about map making