Skip to content

Commit

Permalink
Add a tutorial to update an existing tilemap
Browse files Browse the repository at this point in the history
  • Loading branch information
qiuguohua committed Aug 28, 2024
1 parent 15dae7c commit a763519
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions versions/3.8/zh/asset/tiledmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@

![alt text](tiledmap/image-8.png)


**这里需要设置为要使用原图片的大小,即32X32,并且设置margin为1(图片偏移上下左右1像素),间距设置为2(左右1像素,就是两个像素,上下也一样)**

- 编辑图集
Expand Down Expand Up @@ -66,8 +67,18 @@
为了提高资源管理效率,建议将导入的 `tmx``tsx``png` 文件存放在单独的目录下,不要和其他资源混在一起。需要注意的是要把 `tmx` 文件和 `tsx` 文件放在同一目录管理,否则可能会导致资源无法被正确加载。

### 注意事项
如果在texturepacker不设置拉伸,则效果会有偏差。如下图:
1. 如果在texturepacker不设置拉伸则效果会有偏差

不使用拉伸,效果如下图:
![alt text](tiledmap/image-15.png)
使用拉伸,效果如下图:
![alt text](tiledmap/image-16.png)
![alt text](tiledmap/image-16.png)

2. 如果存在老的图集和地图,可以采用更新图集的方式,不需要重新制作

(1)新增一个新的图集,采用新的配置,注意不要使用嵌入地图
![alt text](tiledmap/image-1.png)

(2)在旧的图集tab里,选择点击替换图集,选择在(1)中新增的图集即可替换成新的图集即可完成更新

![alt text](tiledmap/image-7.png)
Binary file added versions/3.8/zh/asset/tiledmap/image-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added versions/3.8/zh/asset/tiledmap/image-7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a763519

Please sign in to comment.