You could certainly do it both ways. If the levels aren't huge you also shouldn't see much differences when it comes to performance (although I never really tested it).
In my view, the benefit of using Godot's Tilemaps is that your level design can be adjusted more easily. If you want to slightly modify something later on, you wouldn't have to bother with adjusting each and every collision shape that might have been affected by the changes. E.g. if you'd move a platform using a background image as level, you'd have to make sure your overlayed static body is aligned with the moved platform again. That doesn't sound like a big deal but could become very cumbersome during play testing.
The same is true for stuff like navigation or occlusion shapes, which are very nicely integrated in Godot's tilemaps.
Additionally, using a single image as background you couldn't modify tiles by code. For example, if you want to open a door on the map you'd either need to reload the whole image or place the doors as individual nodes on the map. Using Godot's tilemap you could write a little script that keeps track of interactive tiles and replaces them if needed.
Nonetheless, after all it comes down to personal preference and as I said, you can do it either way.
发布评论
评论(2)
你当然可以两种方式都做。如果级别不是很大,那么在性能方面您也不应该看到太大的差异(尽管我从未真正测试过它)。
在我看来,使用Godot的Tilemaps的好处是你的关卡设计可以更容易地调整。如果您想稍后稍微修改某些内容,则不必费心调整可能受到更改影响的每个碰撞形状。
例如,如果您使用背景图像作为水平仪来移动平台,则必须确保覆盖的静态主体再次与移动的平台对齐。这听起来没什么大不了的,但在游戏测试期间可能会变得非常麻烦。
对于导航或遮挡形状等内容也是如此,它们非常好地集成在 Godot 的图块地图中。
此外,使用单个图像作为背景无法通过代码修改图块。例如,如果您想在地图上打开一扇门,您需要重新加载整个图像或将门作为单独的节点放置在地图上。
使用 Godot 的图块地图,您可以编写一个小脚本来跟踪交互式图块并在需要时替换它们。
尽管如此,毕竟这取决于个人喜好,正如我所说,无论哪种方式都可以。
You could certainly do it both ways. If the levels aren't huge you also shouldn't see much differences when it comes to performance (although I never really tested it).
In my view, the benefit of using Godot's Tilemaps is that your level design can be adjusted more easily. If you want to slightly modify something later on, you wouldn't have to bother with adjusting each and every collision shape that might have been affected by the changes.
E.g. if you'd move a platform using a background image as level, you'd have to make sure your overlayed static body is aligned with the moved platform again. That doesn't sound like a big deal but could become very cumbersome during play testing.
The same is true for stuff like navigation or occlusion shapes, which are very nicely integrated in Godot's tilemaps.
Additionally, using a single image as background you couldn't modify tiles by code. For example, if you want to open a door on the map you'd either need to reload the whole image or place the doors as individual nodes on the map.
Using Godot's tilemap you could write a little script that keeps track of interactive tiles and replaces them if needed.
Nonetheless, after all it comes down to personal preference and as I said, you can do it either way.
您无法使PNG或JPG动画...
但是您可以为TILEMAP动画。
TileMap的点。
You can not animate a png or jpg...
But you can animate a tilemap.
Point for the tilemap.