In one of my previous post I mentioned that we selected Corona as our Cross Development Platform. The programming language that you use with Corona is called Lua. You just write your game code in Lua and Corona will compile it to run at iOS or Android. The question is: Where do I write my Lua code? The answer is simple: in any text file. That's right, you just need to open a text file and start coding there. When you are done, just save with your file as main.lua and run it with Corona. Since it is simple text file, you can write it using your Windows notepad. In fact, we had done half of our first game using notepad. But, you may want to use some software specially made to code development. That kind of software, called IDE, provides very useful resources that can improve your efficiency when programming, as auto-complete, auto-highlight variables/functions with colors and, in my view one of the main resources, a debug. For those who do not know what is a debug, I will explain now.
When you write a code to do some operations and to show you a result (like a code to sum 2 numbers) you expected it to do exactly what you want, correct? If the program runs and show you an unexpected result, or even simple does not show any result, it has some kind of problem. That problem is called in the computing world as a bug. So, when you try to find the bug to fix it, we say that you are debugging the software. When you want to debug, you usually monitor the program running line by line and see if it is running as you expected. To follow the program running, you could just print in the screen every result that program calculated in order to identify where the problem is (i.e, in which line of the code). But using a IDE with a debug is much easier. Such IDEs allow you to run the code and make it stop at a determined line so you can see the variables values at that time. Depending of the bug, the IDE will actually stop automatically in the line that has an error. So, a debug is very useful to help fix your code problems.
As I said, we started our first game using a notepad, but when we reached a point that we needed to fix some bugs, we looked for a IDE with a debug and I will share with you what I found and what we are using now.
IDEs for Corona
If you are starting with Corona and does not want to use a IDE now, I recommend using one of the softwares below. They are a kind of a enhanced version of the notepad. Although it has not a debug, it has some cool features as auto-indentation, auto-highlight with colors,... They are free.
That its for today. See you.
When you write a code to do some operations and to show you a result (like a code to sum 2 numbers) you expected it to do exactly what you want, correct? If the program runs and show you an unexpected result, or even simple does not show any result, it has some kind of problem. That problem is called in the computing world as a bug. So, when you try to find the bug to fix it, we say that you are debugging the software. When you want to debug, you usually monitor the program running line by line and see if it is running as you expected. To follow the program running, you could just print in the screen every result that program calculated in order to identify where the problem is (i.e, in which line of the code). But using a IDE with a debug is much easier. Such IDEs allow you to run the code and make it stop at a determined line so you can see the variables values at that time. Depending of the bug, the IDE will actually stop automatically in the line that has an error. So, a debug is very useful to help fix your code problems.
As I said, we started our first game using a notepad, but when we reached a point that we needed to fix some bugs, we looked for a IDE with a debug and I will share with you what I found and what we are using now.
IDEs for Corona
- Corona Project Management (CPM): it comes together with Corona and you can use it for free during 30-day trial period. But that IDEs does not provides debug (at least today. It appears that the debug functionally will come in future versions).
- Lua Glider IDE (formely know as Cider): it is a paid IDE (you can use it also for free during a trial period) made specially for Corona and has a debug mode as also several useful resources (like integration with version control softwares). We chose that IDE to use.
- Corona.Complete: Another IDE made specifically for Corona. Its has a debug mode and you can try it for free. I particularly did not like it due to its different paid versions.
- IntelliJ IDE: It is a generic IDE and you can configure it to use with Lua/Corona. It is free and is a very robust software. Although it has debug, I read in several blog people saying that it was not working very well. Also, you need a third party application to run it with Corona. You can find a tutorial on how to configure that IDE with Lua/Corona here.
If you are starting with Corona and does not want to use a IDE now, I recommend using one of the softwares below. They are a kind of a enhanced version of the notepad. Although it has not a debug, it has some cool features as auto-indentation, auto-highlight with colors,... They are free.
- For Windows: Notepad++
- For MAC: TextWrangler
That its for today. See you.