Đang chuẩn bị liên kết để tải về tài liệu:
Macromedia Flash MX Game Design Demystified phần 4

Không đóng trình duyệt đến khi xuất hiện nút TẢI XUỐNG

Kỹ thuật này đơn giản là rất mạnh mẽ. Bạn có thể tạo ra một toàn thành phố bằng cách sử dụng gạch cỏ, đường, vỉa hè, bụi cây, bức tường, và do đó. Điều này cho phép bạn sử dụng lại tài sản đồ họa của bạn có hiệu quả và thuận tiện. | The tiles in the world of this game have numerous frames. This simple technique is very powerful. You can create a whole city using tiles for grass road sidewalks bushes walls and so on. This allows you to reuse your graphical assets efficiently and conveniently. In the case of puzzle games that use TBWs such as Pac-Man and Minesweeper the complexity of the tiles is low. They usually just have a few different items that they need to show such as a dot to be collected or a maze wall. These games profit from the use of TBWs mostly because TBWs reduce the amount of processing that occurs by using a simple math trick. This trick is explained in the next section. One of the most convenient programmatic benefits of using TBWs is their ability to easily store information about certain areas of the map. To take advantage of this I use a two-dimensional array in which each represents a tile in the world. An object is stored in each element and then information about the tile that it represents is stored in this object. For instance if a tile were of a rock then information might be stored in object to say there was a rock in this spot and that the character could not move through it. Or if the tile sand then information might be stored to specify that the character should be slowed to half its regular when passing through this cell. In a game like Pac-Man in which there might be a 15-by-15 grid there would be a two-dimensional array with an object that represented each tile. That s 225 15 times 15 objects. Each object would contain information saying if it was a wall if it was empty or if it contained a dot to be How this information is stored in this case the two-dimensional array is called a data structure. A common alternative to the two-dimensional-array data structure is to store and name the objects logically. In the Man example the 225 objects would be created and given logical names each based on the cell it So for instance the name of the object representing the .

Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.