corona

xCode device logs not populating after application crash

别来无恙 提交于 2019-12-10 09:39:47
问题 I'm getting a crash on my iPad 2 when building my Corona SDK app with a distribution profile, and putting it on my device via a USB cable. I'm testing a bug that happens when the internet is not connected (not sure if relevant). When the app crashes, the devices window's output stream states that it's storing a crash report (http://pastebin.com/Qa3BeaJ2), but then the crash never shows up when I push the "view device logs" button. When I push that button, I get an error message. Is resolving

How to encrypt Lua codes

时光总嘲笑我的痴心妄想 提交于 2019-12-09 06:35:18
问题 I want to protect my Lua codes on my project, I'm using Corona SDK. I saw some lua files being obfuscated like this one https://github.com/ChartBoost/corona-sdk/blob/master/ChartboostSDK/chartboost.lua Is there any application to protect my source code? 回答1: The file you mentioned is not encrypted: it's just precompiled bytecode for Lua 5.1. It can be read with luac -l -p (not in source form but in VM instructions, which are probably enough to reconstruct the source). If you want to

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

sharing my app through facebook in corona Sdk

别说谁变了你拦得住时间么 提交于 2019-12-08 13:14:25
I'm beginner to corona sdk and programming , I want to share my app via facebook to my freinds.I want a button that connects to the facebook through my app and my default message will be send to my freinds.Can anyone help me ? Have a look at the Ghosts vs Monsters sample/template on the Corona SDK website. 来源: https://stackoverflow.com/questions/6678846/sharing-my-app-through-facebook-in-corona-sdk

How to create/work with layered images using Lua/Corona SDK?

主宰稳场 提交于 2019-12-08 11:31:53
问题 Suppose I want an animated smiley face composed to 2 layers: the face background + face foreground. The background layer is a simple color/texture. The foreground layer is the animated layer (animated smiling, crying, laughing...etc). How can i write this up in Lua such that Corona will treat these layers as a single object/entity? I would like a single entity to work with (for collision, animated movements, ...etc). 回答1: I would do this with a displayGroup. Something like this: local smiley

How to delete a previously drawn line?

自闭症网瘾萝莉.ら 提交于 2019-12-08 09:21:25
问题 Here is the code: local physics = require "physics" physics.start() local lines = {} local lineGroup = display.newGroup() local prevX,prevY local isDrawing = false local i = 0 local function distanceBetween(x1, y1, x2, y2) local dist_x = x2 - x1 local dist_y = y2 - y1 local distanceBetween = math.sqrt((dist_x*dist_x) + (dist_y*dist_y)) return distanceBetween end local function drawLine(e) if(e.phase == "began") then prevX = e.x prevY = e.y isDrawing = true i = i + 1 print"began" elseif(e

How to make display to have frame around to avoid ball getting out of display?

a 夏天 提交于 2019-12-08 08:16:58
问题 I am trying to make simple game with ball but how to make display to have frame around to avoid ball getting out of display ? I want to have small hole in that frame so ball eventually can get out. I done this like putting couple rectangles ( with width or height 1px and other dimension is larger ) around display but when ball has large speed it pass through wall. Is there better solution for this. 回答1: Add physics body to the frame so that the ball will not pass through it local topWall =

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(

In Corona SDK how to add label(text) to images?

心不动则不痛 提交于 2019-12-08 04:10:59
问题 In corona SDK how to add label(text) to images I have created my image as follow local item = display.newImageRect('images/foo.png',70,70); item.x = 50; item.y = 50; How to add a text to the image? Many Thanks 回答1: To add text to the image, so it appears to "stick" to the image, you could create the object (as you have) and also the text object directly above it. Then, create a group and stick them both in it. Here is an example of how that could be done: local myGroup = display.newGroup()

sharing my app through facebook in corona Sdk

拈花ヽ惹草 提交于 2019-12-08 04:09:25
问题 I'm beginner to corona sdk and programming , I want to share my app via facebook to my freinds.I want a button that connects to the facebook through my app and my default message will be send to my freinds.Can anyone help me ? 回答1: Have a look at the Ghosts vs Monsters sample/template on the Corona SDK website. 来源: https://stackoverflow.com/questions/6678846/sharing-my-app-through-facebook-in-corona-sdk