Lua, Corona SDK and IDEA IDE

Lua, Corona SDK and IDEA IDE

Share on Twitter

There are a few tools recommended by Ansca when it comes to using 3rd party tools. Unfortunately a critical piece that I’m surprised to find missing is an IDE. To address this I’ll make it simple and give you two choices:

  1. Text editors (e, notepad++, Sublime Text, TextWrangler, etc.)
  2. IDE’s (LuaEdit, LuaEclipse, SciTE, Intellij IDEA Lua plugin

If you’re serious about development and you’re on windows, my recommendation is SciTE + Intellij IDEA.

SciTE has the key essential piece you need be productive, that is, a good debugger. SciTE uses the same remdebug that Corona Simulator embeds for it’s own use. When it comes to a debugger this is what you want.

Intellij IDEA has everything a development editor should have. Along with Lua plugin you get almost everything you need for a complete IDE. Kahlua is built in but I do not recommend using this as I’ve found numerious ways to break it. I’ve been in contact with author of the Lua plugin for IDEA and it seems there is a strong possibility of some upcoming goodies (hint debugger) to fit in the one key missing piece.

Depending on the results, I may be able to fully recommend this solution as the ONLY tool you will need to do serious development for Lua! The other IDE’s such as LuaEdit is buggy from what I recall last time I looked at the available versions. As for LuaEclipse, it is a strong contender (it has most of what you need if you don’t mind working on it a bit to get things going).  However, I do not believe it is being actively worked on right now or being improved.

I’ll talk on a few other recommendations by Ansca. Only paid software is included here to help you decide to buy or not.

Physics Editor & Texture Packer Pro »

Physics Editor allows you to drag your shapes inside the editor and auto trac, adjust shape’s physics parameters and directly export for Corona. TexturePacker is a tool for sprite sheet creation and image optimization and also include layout algorithm.

Recommendation: Buy

  1. You need it for sprite-sheets. This tool will help you speed up mundane lua file creation as well as build sprite-sheets for you along with lots of neat features.
  2. You need it for physics. This tool will help you speed up assigning physics properties to your objects.
  3. The price is right! for only 30 dollars you get both of these essential tools from the same developer. FYI – I get no money for promoting their tools.

Corona Project Manager »

Corona Project Manager allows you to manages all the projects and assets (source code files, graphics, audio files, etc.) that go into your app so you can quickly switch from one to another, swap out assets, and has a built in editor.

Review Corona Project Manager Version 2.2.1 (5) Beta

“At Ansca Mobile we developed a way to create mobile apps very quickly, by adding Corona Project Manager to your development workflow, you can be even more productive and quicker to market.” Carlos M Icaza, Co-Founder, Ansca Mobile, Inc.

I agree with Carlos on CPM helping you increase your productivity. Corona Project Manager has potential to be a great product when out of beta! Out of the box you are presented with a step-by-step on what to do next as a new user.

Once you get started you’ll find testing new projects easier than working with Corona Simulator. This is done through quick project organization and asset management.  CPM includes a preview tab, and a text editor.  Overall, this product lives up to it’s claims on it’s website.

Having said that, here is a detailed look at the current beta state.  When it comes to launching Projects, you select one and simply click the launch button.  Concept is simple and mostly works.  Currently if you launch a project the terminal feed is not redirected to the terminal tab on the editor.  I’m not sure if this was suppose to work on Windows.  What you will have is the Corona Simulator launching your current project as if you had done the following:

  1. Selected the desired files, main.lua, assets, etc and put into a flat structure. (CPM makes this easy and can saves you time)
  2. Run Corona Simulator with the target set as the main.lua for the project

Things that don’t work: If you click launch again it will launch another copy of the Corona Simulator instead of simply refreshing you current instance. For example I expected something like this,

  1. Launch project
  2. Make changes to file and save
  3. Relaunch project and you see your new changes on the simulator

Note, you cannot simply save your changes and click Ctrl-R on the simulator as a workaround since that does update the files CPM used. Next, the stop button does not work.  For now, your best option is to close the simulator after you’re done looking at it as you make incremental changes to your files and launch using CPM.

Moving on to the editor, there is a bug where you will have to fill in the auto-complete list by hand after install.  This is a simple copy/paste from the forums and hopefully resolved in the next update.

The editor is in it’s infancy and this is an area I’m not sure what the final goal is going to be.  Since CPM is not an IDE there is no debugging or lua interpreter.  However, I believe what you will get in an upcoming version is an easy to use text editor with intelligence for coding in lua plus Corona SDK API functionality being recognized.  As it stands, CPM makes it easier to work with files from day one but it can be even better if they work out the kinks for editor usability such as non-standard key mapping and some things that simply do not work (such as redo) and a few other bugs in this area. However, it does allow you to use an external editor to do your work.

Concepts I like within CPM is the ease of aliasing (since only one main.lua can be run) as well as how easy it is to include or exclude files from project with a single click per file.

Other limitations/concerns:

  1. Lack of folder depth per project (no folders in folders)
  2. Drag and drop asks each time where to group your project (I’d like to simply drop my folder into the group I’d like)
  3. Adding asset from menu, is done one file at a time (your best option is to drag and drop but multiple file selection should be added)

As I delve deeper into Lua and the Corona SDK, it seems an IDE is what I need. Primarily because of this reason, CPM is not a good match for my needs.

Recommendation: Only buy if you do not have a need for a complete IDE.  This is a good product but an IDE that is free with more features is even better.

SpriteDeck »

SpriteDeck is a drag and drop design tool built for the Corona platform. The scene editor and code exporter makes SpriteDeck a must have tool for Corona developers. [I disagree]

“SpriteDeck makes Corona accessible to everyone with or without any coding knowledge. A must have tool in your Corona arsenal.” — Carlos M Icaza

Unfortunately, I cannot agree with Carlos on this statement for several reasons.  I will present my findings here and you can decide for yourself if this is a must have tool for you.  Please keep in mind this is not an end to end review as I am sure I have missed many things.

  1. SpriteDeck making Corona accessible to everyone
  2. With coding knowledge
  3. Without coding knowledge

Lack of any substantial documentation or tutorial is the biggest road block on using SpriteDeck

  • This is a beta product and as such documentation can go a long way to letting users manage workarounds for items I noted below
  • Once you install the product there is no help or documentation section
  • On the SpriteDeck website, there is a “Learn” section with a video. However, follow step by step with the video will not get you the same results

Animation does not work

  • I found out that you need to do this in code (changes were made) but this is not mentioned anywhere.  If you’re like me, you will try to make it work, and once you have finally exhausted your options you will start looking for support documentation.
  • While I am fine looking at support for complex items, the basic functionality must work as designed.  If the design is changed, the primary scenario should be documented somewhere (video, web, help, etc)

SpriteDeck cannot work with same filenames when images are added

  • Project is not usable in this scenario.  This is not a negative but something you should be aware of as I only found out when things did not work
  • This means you need to go and change all assets from different folders to unique names

Scene rotation in current view and scene rotation in edit scene are seperate properties (bug or that’s the design?)

  • This is confusing and is further exaggerated on export as the current view scene rotation is applied, not stored rotation with scene (double-click open it).
  • Is this why there’s a forum post somewhere it says to ‘delete’ current view before export? Again, you have to spend time to research normal use cases.
  • Sometimes deleting the current view and only having scenes result in just a black screen after export (this could be user error but there are similar reports)

Export should only copy assets used

  • As a designer, I work with large library set and wish to have it available during the creative phase. However, if your workflow is like mine, all your assets will be exported (not just what you used on the project
  • Having to go through 100+ images to find the one’s actually used on export is a productivity killer.  This also matters because Corona will use all files during build time.

Ability to select and rotate multiple layers at the same time without creating scene or during edit scene

  • Imagine a table, put a lamp on it, and few other items.  Because only scenes can be rotated as a single object, you must convert this to a scene to rotate it together or edit scene and rotate each object one at a time
  • I had to do this as things start in Portrait mode in SpriteDeck and you have to rotate things to get images into landscape (there is no landscape mode)
  • Are you thinking you can workaround by changing the dimensions for width and height?  Sorry, that won’t work.  You will have to rotate it in the current beta

Ability to set Orientation – Potrait/Landscape mode for device

  • Extending from the last point, there should be a way to set this without having to rotate your objects.
  • SpriteDeck should default to project view (if user works in landscape set orientation to landscape for export)

Export may fail to export images/proper settings to project structure (this is rare, I ran into this once or twice and believe this to be user error)

  • If you want to experiment, try to reproduce by deleting old exports and trying a new export on new project before/after save
  • Try to reproduce by creating new folder for export for an already exported project

Project Save button no save indication

  • At minimum the icon should be blue to indicate unsaved changes and on-click change back to gray
  • Currently no indication of any saving (it seems to be saving okay) not sure when save occurs
  • If changes are saved automatically why have a save button?

Want to know what version of SpriteDeck I am reporting issues against?

  • So would I; however, I cannot find any build information. At a minimum, the binary executable properties should have a file version specified.  For now, look at the date of this post and see if a newer version was released after this date

I’ve listed a lot of issues that I ran into.  It seems my normal workflow and what I thought to be intuitive and natural way to do things are not how things work.  Or if they do, I simply could not grasp it by playing with SpriteDeck.

Items I still have to figure out or did not fully investigate

  • Physics isn’t applied as gravity on rotation – depends on orientation likely?
  • Physics object have unusual behavior, some fall down other fall up or stays on screen for dynamic setting.. why?
  • How does scene to scene transition work? It seems the product demo shows that you create scene’s then apply them to other scenes at times? Yet at other time, scene’s are shown for reordering. Which is it? Is the scene pane the workflow? Or it’s used for shortcut to building scenes then scrap work deleted to keep the final scenes?
  • Building with Director class does not seem to matter. What hooks are being applied? I’m guessing I still have to code in the logic; so what’s the benefit instead of doing this by hand?

I spent a full day testing SpriteDeck instead of getting scenes completed as I intended. As commented on the forums by another user, “most of those things are non issues once you work out how the product works, which is a failing in the documentation” So if you have the time to figure out (on your own or by reading forum posts on how things work) then you should be fine.

However, in order for me to take a second look at SpriteDeck, at a minimum, a basic set of documentation should exist showing you how to use simple primary scenarios. While on the topic, why not some sample projects as well so that a user can learn how things should be built?

Recommendation: Skip

Zwoptex »

Zwoptex is a texture packer that can combine multiple textures into a single one.

Recommendation: Skip

I have not reviewed this product so I cannot compare this with Texture Packer but from what I can tell Texture Packer has more options and a bit more mature in the market than Zwoptex.  If you followed my recommendation, you already bought both of the tools you need.  This product is an alternative; if you find something that is unique and essential that makes this product a must, send me a note so I can look into it

Share on Twitter

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>