Contact Me or check out the Producerism Blog

How to: Develop in Corona SDK on Windows

05/01/2011


9/3/2011 Update: Added some changes to the process, updated screenshots, and disclaimers regarding Java JDK v6 and the new Corona requirement of Android OS 2.2+ and ARMV7.  I've expanded on the hardware shortcoming and a few other annoyances and issues in a new post: Where Corona SDK Falls Flat.

Developing mobile apps and games for both Android and iOS (iPhone/iPad/iTouch) is not the easiest thing in the world.  For iOS, the main option is to develop in Objective-C with Xcode in OSX.  However, if you want to develop for Android, there are a few more options - although most of them still require recoding when porting to iOS.  One of the biggest options for cross-device development is the Adobe iOS Packager for Flash/Flex/AIR.  All the code can be done in Actionscript 3, and then deployed to either device (and for free!).  The downside of this, is that without serious tweaking and compromise, the framerate on games is subpar.  In time, I'm sure Adobe will smooth things out, however as it stands, it's very limiting to work with the packager.  Enter the Corona SDK:


Corona SDK is basically a Lua library that wraps both Android and iOS functions into a single API.  In this article, I will show you how to setup an environment for developing with Corona, complete with code auto-completion, basic error checking, and an example of a box2d physics app running in both the simulator and an Android device.  All in less than 2 minutes.  Haha ok, maybe not that quick, but seriously, it takes about 15 minutes to be up and running, since there are a few things you will need to download and install.  Then, the actual box2d app will be less than 10 lines of code.

Requirements

Before we start, you will need to download these four things (don't worry, they are all free).

  1. Lua for Windows
  2. Java SDK v6 x86 (32bit) (note: version 6, not the newest which is version 7. Here is a direct link)
  3. Corona SDK
  4. IntelliJ IDEA (Community Edition)
  5. Corona API (by sylvanaar2)
  6. (Optional) Here is the project file for this tutorial: HelloCorona.zip
  7. If testing on an Android device, minimum specs are Android OS 2.2+, and ARMV7)

Installation

This is all pretty easy.  First, install Lua, Corona SDK, and IntelliJ IDEA using recommended settings (or custom, if you want to go rogue).  The Corona API you downloaded will be a .zip file.  Just extract that somewhere (e.g. c:\sdks\sylvanaar2-idlua-sdk-corona).  If you're curious, there's only three files inside this folder: api-reference.html, corona_api.doclua, and coronoa_api.lua.

Now that everything is installed, feel free to open up the Corona simulator to test out some of the provided examples:

All of these examples are stored in the Corona SDK Installation folder (e.g. C:\Program Files (x86)\Ansca\Corona SDK\Sample Code).  The main file for each project is main.lua.  Of course, this article is about developing with Corona, so let's get to it.

Setting up IntelliJ IDEA for Lua and Corona SDK

We need to enable Lua support first, so launch IntelliJ IDEA and click on File -> Settings:

When the Settings window comes up, find the Plugins option inside of the left column, and then find the Lua plugin under the Available tab on the right.  Right click on the entry, and select Install Plugin.

Great, Lua is now supported in IDEA, complete with syntax highlighting and lots of other features.  Let's start on a Corona project.  Create a new project.

Notice that Kahlua is listed, but we want to add our own.  Click on the Configure... button.  In the top left corner of the Configure SDK window, click on the plus sign, and then select Lua SDK from the menu.

Once you select Lua SDK from the menu, you will be asked to provide the location of your Lua folder.  (e.g. C:\Program Files (x86)\Lua\5.1)

Almost done.  You can see that Lua 5.1.x is now listed on the left under Kahlua.  Before we finish, let's add the Corona API we downloaded and extracted.  Click on the Add... button.

Now find the folder where you extracted the Corona API to (e.g. c:\sdks\sylvanaar2-idlua-sdk-corona).

That's it!  Click OK until you get back to the New Project window, then make sure Lua 5.1.x is selected before clicking Finish.

(Update 9/11/2011) - One more step...

To fully enable the code-completion, go back to File -> Settings:

Then find "Lua" on the list under "IDE Settings."  There is a checkbox to "Add additional completions."  Make sure you check that box and hit ok.

Now that all of that is done, we won't have to do it again!  Now you really can create a new app within a few minutes since the tedious setup is done with.  At this point, you should have your new HelloCorona project waiting for you.  Plus, you will have some great features like syntax checking and auto-complete:

Starting a new Corona SDK project

Each Corona project is made up of at least two files: config.lua and main.lua (you will have to create these yourself).  Here's a screenshot of what this project looks like (2 lua files, and 3 images).  Important Note: Notice that all of the images and scripts are in the same folder.  If you try putting your assets into subfolders, the Corona Simulator will work as expected, but when you deploy to your mobile device, the app will hang.  It took me quite a while to figure that out on my own.

config.lua:

application =
{
	content =
	{
		width = 320,
		height = 480,
		scale = "zoomEven"
	}
}

Pretty straightforward - we create an object (in Lua it's a table) for application, and inside that, another object for content settings.  The scale is set to "zoomEven" which basically scaled the content while keeping the same aspect ratio.  Here is a complete list of options for config.lua, since this is just a very basic example.  Easy, right?  So let's look at the code for implementing box2d.

main.lua:

local background = display.newImage("background.png")

local ground = display.newImage("ground.png")
ground.y = display.contentHeight - ground.height / 2

local crate = display.newImage("crate.png")
crate.x = display.contentCenterX

Line 1 both loads and displays the background image (background.png) in a single call.  It's the first thing we add to the screen, since it's the background.  Everything added now will be on top of it (higher z-index).

Line 3 adds the ground image (ground.png) and then line 4 places it at the bottom of the screen.  This "display" object we keep referring to is analogous to the stage in flash.  It also has similar properties as a flash Sprite, like width, height, etc.  Here is a complete list of the properties each display object has in Corona SDK.  Line 6 is pretty similar, except we place the crate.x at display.contentCenterX (which is the same as stage.stageWidth / 2 in Actionscript 3).

local physics = require( "physics" )
physics.start()
physics.addBody(ground, "static")
physics.addBody(crate)

On line 9, we include physics, which is Corona SDK's wrapper for box2d  (read more about it in the guide and api).  Then, on line 10 we start the physics engine, which automatically sets gravity to (0, 9.8) and updates at the frame rate Corona is set to (default is 30 fps).

Line 11 tells the physics to recognize the ground object as a physical body, and sets it to "static" which means it will be stationary.

Line 12 adds the crate as another physics body, but uses the default type of "dynamic" which means it can move.

Running the project

All of the code for this example is done!  A total of 3 images and only 9 lines of code (10 if you include config.lua, which could all be on a single line).  There is one last thing to setup before we can run our project.  We need to edit the run configuration of the project, so first click on the drop-down menu next to the run button, and select "Edit Configurations."

In the Run/Debug Configurations window that pops up, set the Lua interpreter to the Corona Simulator.exe file, otherwise you will get errors when you try to run your code through the default Lua interpreter:

Now just click on the Run button, or go to the Run -> Run (Shift + F10) menu in IntelliJ IDEA.

A command prompt will show up, letting you know that IDEA is launching your main.lua file with the Corona Simulator (using config.lua for display settings).

You will also see the Simulator show up, where you can select various phones in the menu.

Speaking of the Simulator window, now that we can see our code in action, it looks pretty good.. but how will it look on an actual Android device?  Let's find out right now!  Click on the File -> Build menu, and fill out your Package name, Target OS, and the Save to Folder.  I have mine building directly into my Dropbox folder, since I also have Dropbox installed on my Android.  This means that as soon as I'm done building, I just open Dropbox on my phone and install the .apk file.  It really couldn't be any easier.

After you click the Build button, Corona SDK will actually connect to their build servers and generate the apk there.  Once the build process is done, the .apk gets sent back, and copied to your Save to Folder.  I imagine the same process could be done for iOS eventually, but that's not a feature on the current Corona SDK roadmap.

So, that's it!  You now have IntelliJ IDEA setup for Lua and Corona development.  All you need to do is create a new project, add your assets, config.lua and main.lua files, and hit run.  Once it looks good, just build it!

Alternate Way of Launching Simulator

Update 04/24/2012 - The process outlined above makes use of the built-in launching feature of IntelliJ.  However, there is a much better solution to launch the Corona SDK simulator from within IntelliJ IDEA, which allows the output window to show line breaks.  This method makes debugging much easier, and it's the method I'm using, instead of hitting the "Run" button.  First, copy the following code, paste it into a new text file, and save the file as "CoronaLauncher.vbs"

Note: This updated section (04/24/2012) is using IntelliJ IDEA 11.1, and some of the dialogs have changed slightly.  If you are using the older IntelliJ IDEA, all of these settings are in the same places, but the buttons/checkboxes may have been rearranged.  Feel free to comment if you need help setting up.

CoronaLauncher.vbs

Note: Lines 12 and 21 should point to your Corona Simulator.exe file.  If you are running Windows 64-bit, this will probably need to be changed to C:\Program Files (x86)\Ansca\...

Set WshShell = WScript.CreateObject ("WScript.Shell")
Set colProcessList = GetObject("Winmgmts:").ExecQuery ("Select * from Win32_Process")

'Check if Corona is already running
For Each objProcess in colProcessList
If objProcess.name = "Corona Simulator.exe" then
vFound = True
End if
Next
If vFound = True then
'If Corona is already running, then switch to it and refresh
WshShell.AppActivate "C:\Program Files\Ansca\Corona SDK\Corona Simulator.exe"
WScript.Sleep 100
WshShell.SendKeys "{ESC}"
WScript.Sleep 100
WshShell.AppActivate "Corona Simulator"
WScript.Sleep 200
WshShell.SendKeys "^r"
Else
'If Corona isn't running, launch it with your main.lua
WshShell.Run """C:\Program Files\Ansca\Corona SDK\Corona Simulator.exe """ & WScript.Arguments(0)
End If

Once you've created a CoronaLauncher.vbs file with the code above, open up IntelliJ IDEA and under the File menu, select Settings.

In the settings window that comes up, find the "External Tools" section.  It will probably be empty - so click on the add button to create a new tool.

In the Edit Tool window that pops up, enter the following values.  Pay attention to the Parameters: field, and make sure you update the value so it points to where you saved the CoronaLauncher.vbs file created earlier.  Also, make sure that "Open console" is not checked.

After hitting the OK button to save, you should now see it listed to confirm you're on the right track.

Hit OK to save this change, and then open up the Settings window again.  (Note: For me, when I hit "Apply" instead of "OK" the next step couldn't be done.  So just to be safe, hit OK.)  When the Settings window comes up, scroll down to the section for "Keymap."  Under the External Tools folder, the Simulator should now be listed.  Right click on the entry, and select "Add Keyboard Shortcut"

We're almost done, I promise.  In this window select what you want the hotkey to be.  Since I'm coming from a background in Flash, I decided to use F5 to launch the simulator. (Note: You may get a message under "Conflicts" that says F5 is already in use.  Don't worry about that - just hit OK anyways.

As mentioned above, if F5 had already been assigned to a shortcut, just overwrite it by clicking Remove

That's it!  You should now be able to hit F5, and your code will launch instantly in the Simulator!  If it's still not working, make sure you have set your main folder (which contains main.lua) as the source.  You can do that by right-clicking on the project folder and selecting "Source Root" under the "Mark Directory As" option (it's the last option in the menu) as in the screenshot below.

Conclusion

I took my first stab at Lua when writing a custom DAME exporter for FlashPunk, and swore that my next stab would be with Corona SDK.  I never expected to have an IDE setup for such a smooth build process - and I really didn't expect to port over an entire flash game in a weekend.  Within 10 hours using Corona (for the first time), I had remade a game that originally took 30+ hours with Actionscript 3.  For that reason alone, I'm in love with this SDK - despite the fairly limited set of features (so far).  During this process I also had lots of help from the following places:

How "Free" is Corona SDK?

Corona SDK is a commercial product, but free to try indefinitely - meaning you can compile to your own devices/simulators for free, but once you want to deploy into the App Store or Android Market, you need to buy a license for Corona.  The annual license is $199 for either Android or iOS, each ($349 for both).  In case you are wondering - yes, this means for iOS development you would pay $199 for Corona SDK, in addition to paying the annual license fee to Apple.

Technically, you can use Adobe AIR and the packager to deploy for both platforms - and even without the packager.  However, the performance is still an issue, and even so - using Corona SDK to develop is still a bit quicker since so many libraries have been bundled in.  It's not nearly as flexible as rolling your own API for box2d, facebook, openfeint, etc. but again it's much quicker when you just want to get right into making the game/app and not messing around with the setup process.


Comments

Thanks for the write-up, and we’re ecstatic that you’re in love with Corona! :-)

And as you know, we’re constantly rolling out new features (no waiting for 18-month update cycles), so it’s totally worth it to stick around if you like the fast/easy coding!

I ran your program and I am getting this error

"C:\Program Files\Lua\5.1\lua.exe" C:/Users/mshahab/IdeaProjects/TestOne/main.lua
C:\Program Files\Lua\5.1\lua.exe: C:/Users/mshahab/IdeaProjects/TestOne/main.lua:1: attempt to index global 'display' (a nil value)
stack traceback:
C:/Users/mshahab/IdeaProjects/TestOne/main.lua:1: in main chunk
[C]: ?

Process finished with exit code 1

Please help what to do ?

T says:

Good catch! I left out a step under “Running the Project.” I’ve added two steps to the beginning which will fix this error for you. It was trying to execute the code through the main Lua executable, since it’s thinking that “display” is a nil value. All Corona code needs to be executed via the Corona Simulator (C:\Program Files (x86)\Ansca\Corona SDK\Corona Simulator.exe).

Thank you for the great article :) It works like a charm :)

Jon S Akhtar says:

Excellent article!

Dave W. says:

Absolutely Superior! A couple of small steps left out and open to interpretation, but it’s working, highlighting, intellisense, and the simulator! If you email me, I can list the small, few, nuances. Thanks again! -Dave.

Chris says:

Perfecto. The dialogs in IntelliJ are slightly different in the latest download (10.5) but it was easy enough to figure out.

This link is awesome.

T says:

Thanks for letting me know! I’m working on an update for this tutorial and will be sure to include screenshots from the new version.

ceruleansea says:

perfect tutorial.. thank you..

Andy says:

Thanks for the tutorial. When I download the app to my device and try to install, it attempts to do so and then says “Application Not Installed.” Any idea what might be wrong?

T says:

I’m assuming you are using Android, 2.2 or later. Just make sure that your Android settings allow you to install APKs from “Untrusted Sources” (which means anywhere other than the market). Then, you should be able to just open the APK directly on the device, and test out your app. The easiest way for me, is to just use Dropbox, which I’ve got installed on my dev machine, and on my phone. Once I drop the APK generated from Corona into my dropbox folder, I open it up on my phone and it installs.

If you’ve tried all of that and are still having problems, feel free to email the code to me so I can test it out and try to find a solution.

BramVD says:

Thanks for this nice write up, I got it configured quite well now! Time to tweet this :)

tyler says:

Thanx for the tutorial. Everything was dead easy to get going!

emrah says:

Hi thanks for the usefull tutorial, inspite of being a mac user this tutorial helped me a lot.

But i have a problem with debugging. Debugger connection times out because everytime, when the simulator runs it wants me to click to “continue trial” btn.

How can change debugger connection time. Is there any other way to prevent debugger crash ? Is it working properly on windows ?
Thanks

T says:

With this tutorial, debugging will not work. Compiling/Deployment isn’t really compiling or deploying anything either – it just launches the Corona Simulator.
So far, I have not found any tutorials or resources that explain how to get debugging for Corona working under windows. There’s probably some solutions out there, but I haven’t found them yet.

T says:

After some quick digging, it looks like there may be an option for debugging Corona using Eclipse, but still haven’t found anything for IntelliJ.

http://sourceforge.net/projects/akdebugger/files/

emrah says:

My best solution for getting traces and compiling without relaunching the simulator is working with intelliJ and textmate in the same time :)

Here is the link for textmate bundle:
http://www.ludicroussoftware.com/corona-textmate-bundle/

This helps me to rerun my application without relaunching the simulator.

I made a textmate project besides an IntelliJ project.
Run the project for once in textmate.
While it is running in background I work with IntelliJ ( cause it is IntelliJ :D ) When I save my files in intelliJ the simulator reruns the application without relaunching the simulator.

The best side of this workaround is you can get traces but in IntelliJ solution you cant.

I cant find a solution for debugging. If i can manage to improve my workaround i will share with you.

Thanks

emrah says:

Thanks for the quick answer.

Shane says:

I am having the exact same problem as “Andy” did. I did what you said and turned on “UTrusted Sources”. However that also did not work. So I decided to see if it was something with my coding and tried to build one of the examples that corona has. But that didn’t work either. Whats wrong??

T says:

it seems something has changed since I originally wrote this tutorial, and appears it’s in need of an update. I’ll investigate and will update this post in the next few days.

Pete says:

Thanks for the tutorial. I have the same problem as Andy. When I download the app to my device and try to install, it attempts to do so and then says “Application Not Installed.” I have an Orange SanFrancisco which I have rooted and installed Android 2.2 on, and used dropbox to try and load the apk with. I have already installed other apk’s not created using Corona and Intellij Idea and they install fine

T says:

duly noted, update on the way (probably this weekend).

Andrei says:

If “Application Not Installed” error appears, it’s probably because of Java 7 installed on your Windows machine
Use Java 6

Source:
http://developer.anscamobile.com/forum/2011/08/18/cant-install-any-android-apks-created-build-process-device

T says:

thanks for the link, I’ll include this in the tutorial update.

Pete says:

Hi Andrei,

Tried it with Java 6 and still get the same.On reading up further it looks like Corona will not support builds to ARMV6 devices which I believe the San Francisco is, Therefore that’s it for me with Corona. Just spent £100 on the phone which is great, rooted it and put it to Android 2.2 then discover this. No more Corona for me. Shame as I like LUA and the SDK did look good. Any ideas on another SDK for developing Android games on. A friend has suggested Unity 3D ?

T says:

Unfortunately, it looks like you are correct. The CEO of Ansca Mobile (Corona SDK) responded in a thread about it here. Looks like they have dropped 1.6, 2.1, and ARMV6 support, with no intentions of looking back. There is a list of affected android devices listed as well.

As for Unity3D, that is a very popular choice as well – although I wouldn’t put it in the same category as Corona. Corona is somewhat specialized in being a very rapid development solution, compared to Unity3D which is not just for mobile apps, but for desktop as well – and is built around a 3D engine. That said, Unity3D is a great choice, and something I’ve been wanting to dabble more with myself.

Pete says:

Thanks again T. By the way I have just discovered something called MOAI SDK. Have you had any experience with this. It says it supports LUA ?

T says:

I haven’t heard of MOAI before, but it’s on my radar now! Judging by the documentation and the inheritance diagram, it certainly looks a bit less refined than Corona at the moment, but it does look very promising. Thanks for mentioning this.

T says:

Just added another step, to “Add additional completions”

Pete says:

Hi there again T,

Just to let you know I found Basic4Android and paid just under £40 for the Enterprise license (half price offer). I think it’s great and have already downloaded simple apps I have designed to my San Francisco with their B4A bridge tool. I know its android specific but for that price it’s a bargain

[…] You don’t want to be switching from your text editor to the browser back and forth to see what a function is called do you? This article will guide you step by step to set up IntelliJ IDEA for Lua and Corona. Read More → […]

edopenroz says:

Thanks for the tutorial! Now I have all installed and running perfectly!!

T says:

Happy it helped out – also, this same tutorial works for the latest version of IDEA, (version 11). I may update the images eventually, but for now it just works!

[…] CoronaSDK 연동 튜토리얼(윈도우용)- http://producerism.com/blog/how-to-develop-in-corona-sdk-on-windows/ 게시물 공유Facebook트위터전자우편Print 카테고리:Corona SDK 태그:API, Corona, […]

Ben Wong says:

Thanks for the great tutorial! I used IDEA for all my development. Very detailed write-up and very easy to follow. BTW, the link, “launch the Corona SDK simulator from within IntelliJ IDEA” seems to be broken.

T says:

Thanks for the comment, and pointing out the dead link. I fixed the link, and suggest checking it out! It’s very useful to launch the simulator this alternate way.

gaborzsazsak says:

Please inform me how I can compile ipa(for iOS) and ant(for Andriod) ?
Thank you.

T says:

It’s extremely easy to compile an .APK file for Android. In the Corona Simulator window, simply go to the “File” menu, and select “Build For…” and then your device (“Android”). Unfortunately, you cannot create an IPA file if you are using Windows. You have to run Corona Simulator on OSX in order to get that menu option, but it’s the same process, and the same code.

gaborzsazsak says:

Thank you so much.

mb says:

Newbee has just completed the tutorial. One question though when im typing physics. and then getting the parameterlist i have a lot of choises but not start. What di i do wrong ???

T says:

You’re not doing anything wrong. Some commands don’t show up, since the autocomplete API is still missing a few things (like physics.play). The cool thing is, once you type physics.play() in yourself, it should remember the .play() next time you type in “physics”

mb says:

hmm it will not “save” my physics.start() when i type physics. i’ve a lot of options but not start() even if i’ve typed it before.

T says:

I’m guessing there must have been a step you missed. I just installed IDEA on a fresh machine following this tutorial, and as soon as I typed “physics.” it came up with a list of options, including “physics.start”

Check to make sure you covered the Corona API setup steps.

royi says:

Is there a way to share lua files between projects in IntelliJ IDEA?

It’s a pain to update the same classes across several projects.

T says:

Yes, you can create links to external folders in an IDEA project, however due to the way Corona SDK builds files, the Corona Simulator will not know about these external files, so it doesn’t work out very well.

My best suggestion would be to create a subversion or git repository like “com\example\corona\classes” (or in your case, something like “no\iversenweb\corona\classes”). Then, just checkout that entire classes folder into each project you want to use them in. That way, if you make a change to any of the files, you can just do an update for each project to synchronize the files. True, it’s still not the best solution but it’s a fairly decent workaround.

Alternatively, there is a program for Mac and Windows that does this outside of IDEA called Corona Project Manager. I haven’t tried it myself (it costs $75), although there seem to be lots of good reviews.

The only other good alternative I can think of, but which doesn’t exist yet as far as I’m aware, would be to make some kind of Maven or Ant build script, which would allow you to use the IDEA external source feature, and then build the file out for Corona Simulator using a build script.

If you (or anyone reading this) finds a better solution, please post it! I believe Corona Project Manager is the only current solution which does this.

royi says:

Thanks for the detailed reply. I guess I’ll have to try making a repository like you suggested. If I come up with something better, I’ll let you know.

Sun Yad says:

Thank you so much.

Sun says:

So, I’m getting an error. Any ideas?

1:34:16 AM NullPointerException: Error during dispatching of java.awt.event.MouseEvent[MOUSE_RELEASED,(475,67),absolute(310,-1013),button=1,modifiers=Button1,clickCount=1] on frame0

T says:

That sounds like an IDEA error, not a Corona error. What are you doing to get that error? Make sure you are opening your main.lua file via the Corona Simulator, and not trying to actually build anything in IDEA. It also sounds like you are using a Java project, and not a Lua project. Try going over the tutorial one more time and paying close attention to each step. If you still have problems, post another reply.

Sun says:

Thanks for the tip. I did finally create a project that will compile too corona. Why I do not know? When I create other projects I may or may not get the error. It appears rather random; I have compared the project files side. I will let you know if I track down this error.

I do have a question, once the simulator pops up, is there a way to republish without relaunching a new instance of the simulator?

Thanks.

T says:

On Windows, you can hit CTRL+R to relaunch your project, without a new instance of the simulator.
As for the error you were getting, if it happens to specific projects, the problem is due to the way the project was setup. After you create a few more projects, you will get used to the process. Have fun!

Sun says:

Very cool! anyway to setup auto-refresh on save? thanks.

T says:

since IDEA actually saves as you type (there’s no “save” button), no. However since it does autosave as you type, all you ever have to do is click back on the simulator and hit CTRL+R. Pretty easy! If you do find any other methods please let me know.

Rahil says:

YESSSS.

I tried Cocos2d and was horrified. Coming form ActionScript3 and FlashPunk, this seems perfect!

I guess I’d have to port it to C/C++/Obj-C if I need something cpu intensive. Hopefully that will never happen.

T says:

Same as you, I’m more used to FlashPunk and AS3 for games, and after making a few apps with Obj-C, I knew there just had to be something better. For something more CPU intensive, you probably will have to find another solution… once I’ve got a few Corona titles under my belt, I’ll probably take a stab at Unity, which is the other main contender in this space aside from AIR.

Thank you so much for an excellent tutorial. I’m just starting out with Corona and what most tutorials neglect is the working setup. You painlessly had me up and running in under half an hour and I’m hugely grateful for the effort you put into writing this all up.

I’m having just one issue – nothing seems to be showing up in my console and I’m having a hell of a time debugging stuff because I have no line-referenced errors or warnings to go on. You seem to touch on something that might help me right at the end, but your link to further information (“launch the Corona SDK simulator from within IntelliJ IDEA”) is dead unfortunately. Could you possibly point me in the direction I need to head? Thanks again!

T says:

Thanks for pointing that out. Unfortunately the page was never indexed by the internet archive either. Luckily, I remembered most of the steps so I’ve just updated the article to walk through the process. It adds another 5-10 minutes, but well worth it. On a sidenote, there’s an absolutely wonderful new (paid) Corona-specific IDE based on NetBeans (similar to IntelliJ IDEA) called Cider which makes the debugging process a trillion times better. Well worth checking out if you want more control. I use it in conjunction with IDEA.

Rok - Developer says:

Worked fine on both my PCs. Today I did a reinstall of Windows on 1 of them. Installed the latest Lua, IntelliJ and Corona API by sylvanaar2. Now the auto-complet is not working properly. It finds “display”, “audio” etc. But the function names are not working. Typing “display.new” doesn’t suggest anything :( Any ideas?

T says:

If you did a fresh install, it may be due to the Lua plugin update from a couple months ago. At this point, the sylvanaar2 Corona API library is a bit out-dated, in terms of syntax, and probably also needs to be updated to work with the latest Lua plugin.

I also noticed the lack of auto-complete entries, however once you enter them on your own a few times in code, IntelliJ IDEA will start showing them to you automatically. As of right now, the best option for having the most up-to-date auto-complete and syntax coloring is probably with Corona Cider (review coming soon).

Rok - Developer says:

Have tried Cider. There is 1 thing 1 don’t like. Cider doesn’t autocomplete my own variable names. I even wrote an email to them, and they said that it’s hard to implement beacuse of different variable scopes. I define my variables on top of a lua module and them use them somewhere down bellow. So I have to spellcheck every single varibale. That is not productive. If they fix this, I will buy Cider.

[…] Development Environment Resources: IntelliJ IDEA – http://www.jetbrains.com/idea/ IntelliJ IDEA Setup Guide (Thanks to Thomas Gorence) – http://producerism.com/blog/how-to-develop-in-corona-sdk-on-windows/ […]

robert says:

Hi,I downloaded the latest version of IntelliJ IDEA and it did not have the lua option as you explained in your tutorial in the beginning.I was thus stuck in trying to integrate the lua plugin.It is also diferent in interface to your tutorial.Am stuck could you please go through the process again this time with the new IntelliJ IDEA.

Alex says:

I am having problems running IDEA. At first I could run it, but right now, every time I try to run it, nothing happens, it does not execute, it doesn’t appear as a process or application running in the task manager. I have no idea of what to do, I tried re-installing it, installing different Java SDKs, but I still have the same problem.

Stephen S says:

Just got done running through the tutorial and I’m all setup! The interface has been updated since you initially posted this but I got it running.

Thank you for putting this together. It’s much appreciated!

Dario says:

Thank you for the post. One question: I have a problem when I execute the script with the “F5″, appears a window of Corona simulator that says “c:\Documents was not found”. I follow the steps that you mencioned. Any suggestion? thank you very much

T says:

It sounds like either you need to update a line in the vbs script, or perhaps you need to mark your source folder as “Source” in IDEA. Check out the very last screenshot before “Conclusion” in the article to see how. It sounds like that might be the problem.

Andre says:

Hi,
The IDLua is based on API 2011.268, have someone else already updated IDLua? Is there any other location where I can find an updated version?
Thx

T says:

Unfortunately, the Corona API library is very much outdated, however that really only affects the auto-suggest. All other features provided by IDEA work fine (launching from IDE, colored syntax, source control integration, etc.). If auto-suggest or hinting is what you need, I can’t suggest “Corona Glider” enough (previously called CIDER): http://www.mydevelopersgames.com/CIDER/

Matt Jones says:

It turns out Corona requires ARMv7 CPU. This seems like an odd decision to me. Corona seems perfect for making light quick apps that would run well on older phones.

Alcimar pereira says:

Oi Boa Tarde, me ajuda eu não consigo configurar o Intellij IDEA, me add no msn pf qem puder me ajudar alcimar.games@hotmail.com

[…] this tutorial is an improved version of the one published by Thomas Gorence and another by John Lindquist. No Comments by Alfred R. Baudisch on February 6, 2013 Share var […]

Leave a Reply