Idit

Posted by Caleb P, Posted on January 7, 2013, Last updated January 30, 2013

Idit is a visual level builder.

I create physical levels by creating rectangles with physics and positioning them on top of my level. However, when doing this, a great deal of trial and error goes into it - "Ok, so I'll put it with 150 X. Oops! What about 175 X? Oops! What about 165 X? Ooops!" - etc.

Paginated ScrollView widget

Posted by kender, Posted on January 3, 2013

I was in need of paginated ScrollView - and the "page" width should be allowed to be lesser then the screen width. So I came up with this very simple modification of the standard widget:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
 
local widget = require ( "widget" )
 
function newScrollView ( params )
        local sc = {}
        if ( params.paginationWidth == nil ) then
                params.paginationWidth = params.width
        end
        if ( params.paginationHeight == nil ) then
                params.paginationHeight = params.height
        end
        local cacheListener = params.listener
        
        local listenerFunc = function ( event )
                print (event.type, event.phase)

Collected Print Statement

Posted by horacebury, Posted on December 26, 2012

Sometimes you don't want your print statements coming out all at once and sometimes you don't want the console simulator timestamps on every print line. And sometimes you want all that but without rewriting 'print(...)' everywhere. Here's a little code which allows you to call 'print()' as often as you like, it then collects all the strings (or other values) you've printed and lets you 'dump()' them to the console all at once, avoiding the timestamp at the same time. To use, just call 'print(.....)' normally and when you want the output call 'dump()'...

1
_print = print

_activate.lua

Posted by jstrahan, Posted on December 24, 2012

_activate
a new class with some helpful functions.
display print statements on device while app is running
display memory usage on terminal or device
display a layout grid with custom guide lines and the safe viewing area
great for making sure everything looks right across all devices

video: http://www.youtube.com/watch?v=WvJqKfXYlPc
download: http://j-strahan.com/main/?p=262

Shape creation for use with addBody

Posted by horacebury, Posted on December 12, 2012, Last updated December 13, 2012

To add a body to your images you can use physics.addBody and provide a shape property containing a table of x,y values. This can be easily generated with PhysicsEditor (highly recommended) and other tools, but if you want this functionality in your own Corona app, here's a function to let your user draw their 8-point-max shape. This is useful because it provides line side checking to detect when the shape is concave, which is bad for Box2D physics bodies.

You will need my other couple of libraries for this to work:

MathLib: https://developer.anscamobile.com/code/maths-library

exploding an image

Posted by open768, Posted on December 7, 2012

GitHub URL: 
https://github.com/open768/library/blob/master/widget/imgexploder.lua

so I posted some articles about deforming images some time ago by cutting images into strips and animating the stripes. Well you dont have to stop at stripes, you can cut an image into square sprites and play with these too.

library on git hub as shown plus a working example showing me exploding and contracting. anyone graphically minded can easily extend this to do custom animations.

this uses some more libraries I've developed previously, the latest versions are also on github.

https://www.sugarsync.com/pf/D6265787_9225421_081282

CBEffects

Posted by Caleb P, Posted on November 30, 2012, Last updated August 17, 2013

GitHub URL: 
http://www.github.com/GymbylCoding/CBEffects

CBEffects is the ultimate visual effects engine for Corona SDK. It's infinitely customizable, very easy to use, completely open-source, and offers the fastest and easiest path to the most advanced and stunning particle effects that Corona SDK can create.

NEW: Version 2.0
- Moved to GitHub for full open-source - everyone can now help contribute
- Greatly improved code readability
- Delta time calculation for pixel-perfect effects across all FPS settings and performances
- New sample cache for easier implementation samples

GGTar

Posted by Glitch Games, Posted on November 24, 2012

GitHub URL: 
https://github.com/GlitchGames/GGTar

This is a GGified version of the Tar module for the LuaRocks project provided here - https://github.com/keplerproject/luarocks/blob/master/src/luarocks/tools/tar.lua

Require The Code
local GGTar = require( "GGTar" )

Create your GGTar object
local tar = GGTar:new()

Untar an archive in the temp directory into the documents directory and call a function when done.

1
2
3
local onComplete = function()
    print( "All done!" )
end

Gridmap

Posted by Caleb P, Posted on November 7, 2012, Last updated November 29, 2012

Gridmap is a moderately simple map loader. It will load tiled maps created with Tiled. It returns a display group with each layer inside it. I wrote this very quickly; if you find a problem, just post on this page. Gridmap is not extremely sophisticated - no extras, just loading maps. But, I hope it will help someone, as it has helped me. I have also only tried it with orthogonal maps - no isometric ones. Loading isometric maps is not guaranteed.

Feel free to edit it in any way you want to.

Tiles are each individual sprites.

Corona SDK Tutorial: Rate Me Popup + Xcode Console

Posted by CraftyDeano, Posted on November 7, 2012, Last updated November 8, 2012

GitHub URL: 
https://github.com/CraftyDeano/Rate-Me

Here is a tutorial I have created that counts how many times the app has been run, saves that as a local setting, and allows you to easily assign different functions depending on how many times the app has run. In my example, if the app is run 3 times, we will show a 'Rate Me' popup.

You can download the template for this on my GitHub: http://github.com/CraftyDeano/Rate-Me

Youtube Walkthrough: http://youtu.be/HYmmtghzMJ0