问题标签 [ceramic-tile-engine]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
2176 浏览

lua - Corona SDK + Tiled + Ceramic Tile Engine:创建碰撞贴图?

我正在制作一个简单的基于平铺的游戏,其中包含:

  • 带有碰撞层的平铺贴图(由 Tiled 制作,加载有Ceramic Tile Engine
  • 在地图内移动的角色

我想做的事:在 Tile Map 中移动角色,同时尊重 Tile Map 中的碰撞层。

这是代码:

问题是,地图与角色是分开的。如何将角色“放入”地图?我错过了什么?

注意:瓦片图是自上而下的角度。

注意:地图有 4 层:背景、世界、门、碰撞,我希望玩家不要走进碰撞层的区域。

0 投票
2 回答
444 浏览

lua - 使用 Ceramic Tile Engine 和 Box 2D 进行碰撞检测

跟进这个问题,Storyboard with Ceramic Tile Engine 和 Collision Detection 仍然是个谜。这是代码:

截图如下:

截屏

但是,冲突永远不会触发,因为print消息根本不会出现在终端中。

我在用着:

  • 电晕SDK
  • 瓷砖引擎
  • 电晕模块:故事板,物理

如何启用碰撞检测?参数是否正确?


编辑 2013/10/27

平铺地图设置如下:

碰撞层设置

在 Mac OS X 中运行时,不会发生碰撞(只有混合层会改变颜色)。

在 Windows 7 中运行时,代码在此行崩溃:

有错误:

尝试在 Ceramic.lua 中调用全局“reversePolygon”(一个 nil 值):617

在我注释掉以下几行之后,错误就消失了:

但不会调用碰撞函数。

0 投票
0 回答
486 浏览

lua - Map getting Crooked when loading into Corona simulator

i am trying to make a game and was thinking how to make levels and thght about using Dusk engine but right now em in a lil mess my tiles dont load up on corona simulator properly for some reasons ( dunno why )

So i made my map in Tiled and saved it as json the map had

and each tile having height of 32 pixels and width of 32 pixels

Thats the tileset i am using : enter image description here

i just placed 1 tree on map and saved the map as "map.json"

and created a new project in corona and moved the "map.json" into the projects folder and also added "Dusk Folder"

Then i opened main.lua file of project and did

and thats the result i got

enter image description here