corona

Load Lua-files by relative path

馋奶兔 提交于 2019-11-28 17:26:49
问题 If I have a file structure like this: ./main.lua ./mylib/mylib.lua ./mylib/mylib-utils.lua ./mylib/mylib-helpers.lua ./mylib/mylib-other-stuff.lua From main.lua the file mylib.lua can be loaded with full path require('mylib.mylib') . But inside mylib.lua I would also like to load other necessary modules and I don't feel like always specifying the full path (e.g. mylib.mylib-utils ). If I ever decide to move the folder I'm going to have a lot of search and replace. Is there a way to use just

What to use for flow free-like game random level creation?

旧街凉风 提交于 2019-11-28 15:55:00
I need some advice. I'm developing a game similar to Flow Free wherein the gameboard is composed of a grid and colored dots, and the user has to connect the same colored dots together without overlapping other lines, and using up ALL the free spaces in the board. My question is about level-creation. I wish to make the levels generated randomly (and should at least be able to solve itself so that it can give players hints) and I am in a stump as to what algorithm to use. Any suggestions? Note: image shows the objective of Flow Free, and it is the same objective of what I am developing. Thanks

Requesting JSON information from API. Corona

元气小坏坏 提交于 2019-11-28 10:56:49
问题 I'm trying to make an app where I will gather information from a json api http://pool-x.eu/api, and print information easly bo choosing parameter. What is the easiest way to print each of the informations? Was thinking something in the way of making the information a string, and then request each of the parameters that way, but I don't know if that's the way to do it. 回答1: here's a sample code to decode the json data i just happen to make a json text file out if the link you gave and decode

How do you integrate custom fonts in an app?

北城余情 提交于 2019-11-27 07:08:37
问题 I am trying to integrate custom fonts (Imperator.ttf and goodfish.ttf) from the following website into my corona app: http://www.1001freefonts.com/top-fonts.php I am following carefully the tutorial found here on Corona's official website: http://www.coronalabs.com/blog/2013/01/16/faq-wednesday-custom-fonts/ I follow the whole procedure for macosx integration (installing the font by double clicking etc) and do not get any error. I also added the font file name to my build.settings file:

NSURLErrorDomain error code -999 in iOS

允我心安 提交于 2019-11-26 17:21:51
I've been trying to use Corona SDK's Facebook API to post the score on the game I'm developing on facebook. However, I'm having a problem with it. During the first time I try to post to facebook, I get this error after login and user authentication: NSURLErrorDomain error code -999 Then, it won't post on facebook. What are possible causes of this error and how can I address it? I tried searching the web but couldn't find information about it. Thanks in advance. By the way, I am not using webview on my app. Just the widget api and a show_dialog listener in my Facebook class. The error has been

NSURLErrorDomain error code -999 in iOS

萝らか妹 提交于 2019-11-26 05:25:20
问题 I\'ve been trying to use Corona SDK\'s Facebook API to post the score on the game I\'m developing on facebook. However, I\'m having a problem with it. During the first time I try to post to facebook, I get this error after login and user authentication: NSURLErrorDomain error code -999 Then, it won\'t post on facebook. What are possible causes of this error and how can I address it? I tried searching the web but couldn\'t find information about it. Thanks in advance. By the way, I am not