ceramic-tile-engine

Corona SDK + Tiled + Ceramic Tile Engine : Create Collision Map?

心已入冬 提交于 2019-12-08 13:48:37
问题 I'm making a simple tiled-based game, with a: Tile Map with collision layer ( made by Tiled , loaded with Ceramic Tile Engine ) a character moving inside the map What I want to do: Move character around in Tile Map, with respecting collision layer in Tile Map. Here is the code: -- Load Map local ceramic = require("Ceramic") local map = ceramic.buildMap("maps/map.lua") -- Create Character hero = display.newImage("images/man.png") hero.x = 0 hero.y = 0 map.layer['World']:insert(hero) -- Create

Collision Detection with Ceramic Tile Engine & Box 2D

隐身守侯 提交于 2019-12-08 05:19:14
问题 Follow up of this question, Storyboard with Ceramic Tile Engine, and with Collision Detection is still a mystery. Here is the code: -- hide status bar display.setStatusBar(display.HiddenStatusBar) local storyboard = require("storyboard") --Set up the physics world local physics = require("physics") physics.start() physics.setGravity(0, 0) physics.setDrawMode('hybrid') local scene = storyboard.newScene() local widget = require("widget") -- Add Hero to Physics local hero = display.newImage(