A Code Generator Tool for new comers to Corona

Hi,
If you are a new comer to Corona or generate a lot of redundant code in corona like creating display objects and then creating touch handlers, etc this is the tool for you.

Start this tool, select the type of display object you want to create, set up the parameters (change the sample ones provided) and hit generate. Copy that generated text into a text editor and save as main.lua and it is ready to go.

It will handle touches and print the relevant output to the console. This is a sample skeleton that allows you to work with corona.

This can be expanded later to create classes, etc so your feedback will help that. Currently only for MAC OS X users (64-bit)

Download the package from http://www.oz-apps.com/files/CoronaCodeGenerator.dmg

Read an article on how to use it to make coding more productive from http://howto.oz-apps.com/2011/03/automatically-generate-corona-code.html

cheers,

Jayant C Varma

I am sure that people will love this. Good job!

Thanks Mike, I hope it is useful for new comers and other alike.

cheers,

This is pretty cool, can we have newImageRect? :)

@cl-apps,
You just got lucky,I have a newer version.

The new features are
1. Added the newImageRect
2. Added a DisplayGroup
3. Added an Article on Howto.oz-apps.com on using this tool.

link : http://howto.oz-apps.com/2011/03/automatically-generate-corona-code.html

cheers,

Jayant C Varma

I just tweeted this :D

Well done Mr. V!

I find the community constantly improving with these cool tools. Very inspiring stuff.

@luna thanks James, Oops, Now we know who Batman really is...

Thanks for the tweet, glad that you liked it and is useful for you.

cheers,

Jayant C Varma

lol...great karaoke song - easy lyrics

@jayantv, I think it's tools like these that make Corona that much more fun to work with.

Great tool!

When I picked newImageRect, the code generated still used newImage, so that might be a bug, but it was simple to fix in the text itself.

Thanks for giving this out to the community.

Hi isntSean,

it is now fixed and also when you generate code, it copies the text to the clipboard. So it is a one step paste into your editor.

still available for free at http://www.oz-apps.com/files/CoronaCodeGenerator.dmg

Amazing how Apple is charging for FaceTime and xCode 4.0

cheers,

Jayant C Varma

@jayantv: I clicked on the link:

http://www.oz-apps.com/files/CoronaCodeGenerator.dmg

and I received a 404 error.

@twomack33,
that should not have happened, but it did, Sorry about that. It is fixed, you can download the file now.

cheers,

Jayant C Varma

I have a few more features in mind for this tool, for those that have used it I want a bit of feedback. How would it be if...

1. The app sits in the MenuBar from where you can activate it
2. If it can generate not just the display objects, but also other snippets (Let me know what would you want on a regular basis)
3. Create Accessors and Properties
4.Logical Blocks,
If then else end
(Case) If .. elseif..elseif..else..end

I cannot think of more at this point, if there is anything that you use on a regular basis, let me know.

cheers,

Jayant C Varma
Info.OZApps@gmail.com

@jayantv

You could make a little side draw for multiple objects instead of just one. Which as you click on each one you can set each ones settings with a single code view at the bottom which outputs all of your objects.

There is a new version of CoronaCodeGenerator coming soon, maybe over the weekend. This shall offer three major functionalities.

1. It shall assist in creating the display objects as in the older versions, this time it shall queue up the objects so you can create a series of objects as required and generate code once.


2. Create AlertBoxes and code to handle the button inputs


3. Create Transitions and code to handle the same

Apart from this smaller additions are the ability to add separators and the ability to create Setters and Getters & Constructors and Destructors.

It allows to generate code with two different coding styles and it also allows for parameterPrefixes.

The new version shall also check automatically if there is a newer version available and offer to update. Right now you have to read the forums to know there is a new version.

if you have any feedback, please do feel free to let me know at dev[at]oz-apps[dot]com

cheers,

?:)

For those following this thread, here's an update.
I am very fluid with screens, I keep changing them to get the best, so till it is released, they *will* change a bit.

Here's what I have working for the moment.

Code is generated as soon as you click on the snip you created in the list. This can be *instantly* copied to the clipboard or can have a button to copy it to the clipboard.

I will have a write-up on how to use it, with tips on howto.oz-apps.com at http://howto.oz-apps.com/2011/03/code-generator-new-features.html

The *best* part apart from it having multiple elements, is that it is based on the Document interface, which means you can open multiple such windows *and* one more thing... You can save them to file and load them from file (still to work out)

what say?

I am working on this mainly as part of my deal with (James) Luna. I would continue if I get more than just a couple of people benefiting from this, so please let's have a show of hands if you like this and would want me to continue working on this.

There are some cool things planned for other versions, which I want to keep FREE, that will make it so easy to write code without having to sit at an editor and think again on what to do.

cheers,

This looks fantastic! Keep up the great work:) from the screen shots it looks like Code Generator is maturing nicely and I wouldn't begrudge paying for it since this tool can really help anyone with coding and learning Corona plus the huge time saving.

OK, have the core app working, can change and add more functionality later.

The only thing that remains is to save/load from disk, Is that really that important? Just asking

I was asked by a couple of developers if there would be a windows version. This is coded using xcode and Objective-C, so compiling this codeset to windows will be a bit difficult. I can consider putting one together for windows.

However, how many devs would want a windows version? and how many a Mac version?

cheers,

I could put out a test version but I want to complete the save/load and a few other bits and release the full and final version. Maybe after I am back from dinner :)

Only mac here. Save / load would be useful but the true power of your app is in the code it generates so just run with that instead of getting bogged down in details :)

I have removed the Save/Load functionality (for later) and with the rest of the things completed, a new version is available ver 1.5

it also checks for a newer version on start-up so if you are going to use this, you will be *nagged* to update to a newer version when it will be available.

cheers,

?8)

Hi Jayant,

This looks great. I haven't given it a go yet but will give my Mac and Corona some love this week.

I would love a Windows version if you do plan on making one.

How many people would want a windows version of this app? Please let me know, It takes time and effort to create something over again, plus it is FREE, so I need to know that there are lots of takers, otherwise it is just not worthwhile trying to create an app for just a handful of people.

cheers,

?:)

I have a Windows version of Code Generator in the works, here's something to look at and wait for.




cheers,

?8)

After keeping awake till 3 am in the morning for the past few days, I have managed to progress this a bit. Here is the main screen, I just need to make some graphics to pretty it all up.

This *windows* version might not have updates, it is difficult to maintain two codebases and work on them for a Free software when I have and want to work on some other games of mine and other paid client work and *Sleep*, my eyes are literally popping out, but it's worth it if anyone here on the Corona Community can benefit and create something cool by using this.

so the screenshot

it's killing me, this cold, running nose, swollen eyes, cough... it is bloody hot here, worse thing is to have a cold when it is hot. Feeling too sick...

I am wanting to get this out of the way and done with, nearly done, should have the Windows version ready for ye all this evening. I am on Sunday but ye all in the US are still on Saturday... so have a good Sunday playing with this... a few more hours to go by when this will be done.

cheers ?:)

Finally, got that done, I am happy to have finished that, now can call it a day and take rest, finish other stuff.

You can download the Windows version Setup in zip format from here

if you face any issues, please let me know at dev[at]oz-apps[dot]com

A small write up, How-to is here

cheers,

?8-|

Congratulations on your effort and contribution, although I'll personally be sticking to the Mac version... Only because I don't use Windows ;)

4 downloads for windows version, hmmm... any feedback please?
There are over 100 downloads for the Mac version (some repeatedly for newer versions).

?:)

Hi Jayantv,

I have just downloaded the Windows version.

I will give it a whirl and let you know how I get on a bit later.
Bit busy at the mo.

Cheers,

Marc

How many would like a corona version? but then we still do not have the UI available. But you could run it in the simulator. How many would like that?

Here's a device version that is just started as an experiment, if people like it and ready to pay for it, there is point in developing it further.

It is a visual designer on the device to design the levels and edit code attached to the objects. So create the entire stuff on your device, send it to the desktop for compiling and voila!!

It is still an experiment and needs quite bit of work to be fully functional.

Here is a demo video to see what it can do and how it could be used.

Video Here

feedback appreciated.

cheers,

No Feedback? No one likes to develop on the device? Well, good for me, I can spend time on other projects. This one is not taking off then :(

Hey Jay i`m not a programmer but looking closely for tools like http://karnakgames.com/wp/2011/03/presenting-the-drag-and-drop-level-editor-for-corona-sdk-with-inkscape-and-svg/ and want to see what you got to develop on device - My current mobile workflow is iThoughts and Sketchbook both for iOS and need a code editor like iCode but for Lua!

@backforgood11, Alfred (Karnak Games) is developing a level editor but using Inkscape as the editor.

So you are in the market for a look, welcome ;)

You sound more like an artist, with iThoughts and Sketchbook.

I did not quite get what you were after, just a Lua Code Editor on the iOS? Then you already have Textastic that does a good job of code editing for multiple languages.

review here

What I had in mind was this is more like IB or if you have used VB, Delphi or any other UI based IDE's, you can drag drop elements (Rect, Circles, etc) and just add code for interaction, etc and voila!!

cheers,

?:)

Just stumbled across this great looking tool! Jayantv, I'll give it a whirl and fire it up! I have both mac and PC, but I'm far more comfy on my PC so I'll give your app a proper shakedown. :) Thanks for the effort. Got a "paypal" button? I can buy you a cuppa!

Best,
Mario

PS It looks like a way more awesome version of the old ObjC tool for classes....damned, I forgot the name but it made the getters and setters and tweaked a bunch of other things on the fly...hmmm. Ah well. Thanks for your hard work!

Hi Mario,
I am happy with your kind words and the lovely thought of donating. I will take up the cuppa/corona offer when I am in your part of the world in person.

If you like the tool, you can follow me on @ozapps for my other ramblings and if you want to help me and other developers, then you can follow @whatsin4me and read up on reviewme.oz-apps.com the apps that I can get for giveaways depend on the traffic to the site.

At this point the Marketing guys here do not think that this is worthy of their attention. So it is a big loss for the dev community in a way. So help spread the word and get more readers/hits.

"Sometimes we can affect outcomes not by our actions but our Inactions"

cheers,

?:)

views:2421 update:2011/9/19 13:40:57
corona forums © 2003-2011