corona

Corona SDK Cross Device Screen Resolution

我怕爱的太早我们不能终老 提交于 2019-12-03 07:28:28
问题 This is going to be one of those awkward questions looking for an answer that probably doesn't exist, but here goes. I've been developing some simple games using Corona and whilst the functionality seems to work pretty well across most of the physical devices I have tested on, the one main issue is the layout. I know you can't really build for every single device perfectly, but I'm wondering if there is a common method to make an app look good across as many screens as possible. I have access

Corona SDK free alternatives

旧街凉风 提交于 2019-12-03 00:55:11
问题 I tried corona sdk free edition, i really liked it. The problem is, that im not so good developer to use corona paid edition for my small project, i'm aware that i'll not earn my money back. Are there any free alternatives, like Corona? I'd prefer lua scripting, proper IDE and some other cookies. Question two: Is there any way to publish app made with corona free edition on android market? Maybe there are some companies that provide publishing apps if i share my source with them. 回答1: Moai is

Corona: how to capture a screen in corona?

佐手、 提交于 2019-12-03 00:40:37
问题 Can anyone suggest how to capture a screen in corona both full screen and particular portion of it? 回答1: Try this. It will work : local function captureDeviceScreen() local captured_image = display.captureScreen( true ) captured_image:scale(.5,.5) local alert = native.showAlert( "Success", "Captured Image is Saved to Library", { "OK" } ) end Runtime:addEventListener("tap",captureDeviceScreen) 回答2: A google search produced this link: How to capture a screen in corona If you are having issues

Corona SDK free alternatives

白昼怎懂夜的黑 提交于 2019-12-02 14:17:36
I tried corona sdk free edition, i really liked it. The problem is, that im not so good developer to use corona paid edition for my small project, i'm aware that i'll not earn my money back. Are there any free alternatives, like Corona? I'd prefer lua scripting, proper IDE and some other cookies. Question two: Is there any way to publish app made with corona free edition on android market? Maybe there are some companies that provide publishing apps if i share my source with them. Moai is open-source and uses Lua. I love Corona and put out an iPhone game I developed using it, but I'm planning

how can i get a maximum number value in lua?

江枫思渺然 提交于 2019-12-02 14:08:06
I am working on app to watch how fast you run, and for that I need a function that shows what your maximum speed has been. but can not find how I do. local speedText = string.format( '%.3f', event.speed ) speed.y = 250 speed.x = 125 local numValue = tonumber(speedText)*3.6 if numValue ~= nil then speed.text = math.round( numValue ) end I've made my speedText to a number that you see above. I program in Conora SDK/Lua you should give more information when you ask questions on Stack Overflow, but let's try to help you anyway. You code is probably inside an event listener that looks like that:

CoronaSDK - Implementing game timer counting milliseconds

本小妞迷上赌 提交于 2019-12-02 10:24:46
I am using timer.performWithDelay to time how long it takes a player to complete a level. I want it to measure down to the 100th of a second (because the game is multiplayer, and I don't want there to be too many ties). Here is what I did: local totaltime = 0 local function counter() totaltime = totaltime + 0.01 print(totaltime) end timer1 = timer.performWithDelay( 10, counter, 0) It results in each "second" lasting about 4 seconds. Is this just not practical or is there a flaw somewhere? Nicklas Kevin Frank When timer.preformWithDelay is given a time delay smaller then the time between your

What is a possible way to make game graphics for Corona SDK? [closed]

一个人想着一个人 提交于 2019-12-02 07:49:06
I have been developing a simple iPhone/Android game with Corona SDK. The game itself does not use imported graphics, only regular shapes. Now, I am faced with the problem of making the graphics for the title-screen, end-screen and buttons. I just need to know a possible way to do this. If anyone could help, that would be great. I don't really understand what you mean, could you give some examples? Maybe this? local options = { defaultFile = image_path, overFile = image_path_o, onRelease = function () --code here end } local img_button = widget.newButton(options) 来源: https://stackoverflow.com

Parse parameters out of URL in Lua

强颜欢笑 提交于 2019-12-02 06:26:16
问题 I have a URL and would like to parse its Parameter out of it, like: function unescape (s) s = string.gsub(s, "+", " ") s = string.gsub(s, "%%(%x%x)", function (h) return string.char(tonumber(h, 16)) end) return s end function parseurl (s,param) for k, v in string.gmatch( s, "([^&=?]+)=([^&=?]+)" ) do --t[k] = v if k == param then --print (k.." "..v) return unescape(v) end end s = "http://www.page.com/link.php uname=Hans+Testmann&uemail=myemail%40gmail.com&utext=Now+this+is+working+great.%0D

How to set individual device orientation for individual pages : Corona- SDK

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-02 03:20:36
问题 I've made a game using Corona-SDK. It has 2 scenes: (1) Menu scene and (2) Game scene. I need my app to be supported with two orientations : 'landscapeRight' and 'landscapeLeft'. For that, I used the following lines of code in build.settings : orientation = { default = "landscapeRight", supported = { "landscapeRight", "landscapeLeft" }, } Unfortunately, this will affect the whole app. But I want my game scene to be supported with only one orientation(eg: landscapeRight or landscapeLeft or in

How to set individual device orientation for individual pages : Corona- SDK

Deadly 提交于 2019-12-02 00:57:58
I've made a game using Corona-SDK. It has 2 scenes: (1) Menu scene and (2) Game scene. I need my app to be supported with two orientations : 'landscapeRight' and 'landscapeLeft'. For that, I used the following lines of code in build.settings : orientation = { default = "landscapeRight", supported = { "landscapeRight", "landscapeLeft" }, } Unfortunately, this will affect the whole app. But I want my game scene to be supported with only one orientation(eg: landscapeRight or landscapeLeft or in portrait). Sorry, but Corona SDK does not have such capability. What you can do is lock into one