Snippets: Samples, "Game", Editor

Posted by StarCrunch, Posted on October 21, 2012

2 votes
GitHub URL: 
https://github.com/ggcrunchy/corona-sdk-snippets

Hi.

This is another "a bunch of framework and example code" post. It includes several little snippets (a few of which I've previously posted here, individually), as I've been trying to consolidate some of my experiments which don't otherwise have much immediate use. In most cases it should be pretty obvious what these are doing, though for a few it's probably best to consult the readme.

Visual Logging/Printing of Events

Posted by Caleb P, Posted on October 16, 2012, Last updated January 30, 2013

1 vote

I made a library that, when a log function is called, logs an entry in a list. If you want to view previous entries, simply tap the yellow button in the corner and your entries become visible.

Usage:
You can use it in a number of ways. The way I use it is this:

1
2
require("visual_log")
print=logEvent

The main function inside of the library is called logEvent. When you do that, you change the default print function to log. Then, every time you use the print function, you are using the log function instead. Logging an entry is as simple as printing.
 

SSKCorona

Posted by roaminggamer, Posted on October 16, 2012, Last updated February 5, 2013

16 votes
GitHub URL: 
https://github.com/roaminggamer/SSKCorona

What is SSKCorona?

The Super Starter Kit (SSK) for Corona SDK is a (currently alpha) collection of my own and other folks' code, art, sounds, and other assets packaged in an easy-to-use kit.
SSK contains three major components:
1. SSK Library - A collection of code, art, sounds, etc. which can be dropped into any project.
2. SSK Sampler - An application written using SSK to demonstrate SSK, Corona SDK, and Lua features.
3. SSK Game Framework - A ready made single- and multiplayer game framework using SSK and the storyboard framework.

2-Page Open Book

Posted by Edissey, Posted on September 23, 2012, Last updated September 24, 2012

3 votes
GitHub URL: 
https://github.com/dgoldman/2-page-open-book.git

1
2
3
4
5
6
7
8
9
2-Page Open Book Class for Corona
 
For displaying an open book
Bi-directional page turn curl effect
Supports any page size <= display size
Supports 1 sound effect per page
 
To view the full effect download Voyager Kids or Voyager Kids Free from the 
Apple or Nook app stores

www.voyagerkids.com

1
2
3
4
5
6
7
8
9
10
--
--      Main Module to demonstrate 2 page open book class
--
--[[
 
Module:         mai.lua
Purpose:        Demonstration module for BookClass.lua 
Author:         Dan Goldman
History:        Date                    By                      Modification
                        March 2012              Dan Goldman     Initial creation                        

Image resize and crop to a saved file

Posted by antonyburrows, Posted on September 10, 2012, Last updated September 24, 2012

0 votes

Hi All,

I needed a tool to make thumbnails/profile pics and couldn't find one. I found two great libraries by Satheesh and horacebury and hacked them together to produce what I needed. It's really ugly but it does the job. I have been helped a lot by the code here and in the forums so wanted to post this back in case it helps someone.

It lets the user select an image from the camera roll and then pinch/zoom the image to select the files image placement. Clicking save, will then save the new cropped image.

Debug Terminal

Posted by squarefactor, Posted on September 7, 2012

1 vote
GitHub URL: 
https://github.com/smakinson/CoronaDebugTerminal

I just tossed together a utility to help with debugging and working with Corona features that won't run in the simulator and I thought I would share it. It consists of an Adobe Air application that opens a socket at the ip and port provided and a bit of lua code for sending messages. To use it you would call trace() instead of print() after you include the lua snippet either by copy paste or require.

Be sure to match the ip and port in the Air app with the ones in your lua code.

Remote Push System Notification URL

Posted by p.peresjr, Posted on September 6, 2012

1 vote
GitHub URL: 
https://github.com/r4t40/PushSystem-Notification

Alright Lets Go.
I know a lot of people want to know how to make a Remote Push Notification system to get the Tokes automatic.
First of all, check out this tutorial made by the awesome mans of Ansca to Learn a little bit more about the Remote Push, Make a test to know what you doing,
http://www.coronalabs.com/blog/2011/12/21/push-notifications-for-ios-in-corona-sdk/

Now in the GitHuB URL We have
A Folder named "pushSystem"

30log : a 30-lines library for object orientation in Lua

Posted by roland.yonaba, Posted on September 3, 2012

1 vote
GitHub URL: 
http://yonaba.github.com/30log/

30log, in extenso 30 Lines Of Goodness is a minified library for object-orientation in Lua.
It features class creation, object instantiation, class inheritance and methods overload through inheritance.
And yes, it makes only 30 lignes length. No less, no more.

Some usage example, to see how simple it is:

1
2
3
4
5
6
class = require '30log' -- Calls the library
Window = class { width = 100, height = 100, x = 10, y = 10}
 
-- A  custom class constuctor
function Window:__init(x,y,width,height)
  self.x,self.y = x,y

Basic motion blur

Posted by StarCrunch, Posted on August 21, 2012

1 vote

Hi.

This was just an experiment I did with display.capture(), to see how practical it would be to blur a (potentially complex and / or animated) group of objects, in lieu of maintaining say a trail of alpha'd copies. It's sort of a one-deep accumulation buffer, merging the last capture (but faded) into the new one each time.

It looks nice in the Windows simulator, but it's kind of slow on a Nexus One, though faster than an earlier display.save() experiment. Haven't tried the Xoom yet. I'm curious if it runs decently on anything else.

1
local group = display.newGroup()

Bezier Curve for Corona SDK

Posted by neostar20, Posted on August 21, 2012, Last updated March 22, 2013

4 votes
GitHub URL: 
https://github.com/neostar20/Bezier-Curve-for-Corona-SDK

Bezier Curve for Corona SDK

A Bézier curve is a parametric curve frequently used in computer graphics and related fields. Generalizations of Bézier curves to higher dimensions are called Bézier surfaces, of which the Bézier triangle is a special case.