Share Your Code



Browse Code

Please Note: This code exchange has been deprecated. You can still browse, but the code here may be out of date. We strongly recommend you visit and contribute your code to our new code exchange.

Game and App Templates

Sort by: Latest Additions | Most Viewed | Recently Updated | Top Rated

Most viewed sample code and code libraries shared by developers for Corona SDK.

Ghosts vs. Monsters

A sample game very similar to Angry Birds. It is Ghosts vs. Monsters, done in Corona SDK. Two levels to play with and for you to see how easy it is do do a similar game using the Corona SDK. Sample took less than 36 hours to code, with music and graphics. Special thanks to Jonathan and Biffy Beebe for creating the game exclusively for us and for you to enjoy. Read more about it on our blog. More...

Posted by carlos m. icaza, Posted on 9 Dec 2010, Last updated 18 Oct 2011 | 41 comments

Martian Control

Another example game very simliar to Flight Control done using Corona SDK. If you have played Flight Control, this is very simliar game. The code is now open source so you can see how easy it is to recreate using Corona. Once again, especial thanks to Jonathan and Biffy Beebe from Beebe Games for helping us showcase the power of Corona. This sample game took almost 30 hours to do, including imaging, sound, etc.... More...

Posted by carlos m. icaza, Posted on 13 Dec 2010, Last updated 18 Oct 2011 | 8 comments

Slide Viewer

This view for images and photos allows the user to swipe from side to side to view each of the images. The nav bar fades out when the user is sliding or taps an image. Similar to the iPhone "Photos" app. More...

Posted by Gilbert, Posted on 18 Aug 2010, Last updated 18 Oct 2011 | 42 comments

Corona Game Template by Ziray Studio Labs

The template includes example code for: Display groups Orientation and accelerometer Touch with buttons File reading Example level file for scripting game play The template separates functionality into modules for an object oriented approach. http://www.mikeziray.com/2010/06/27/corona-game-template-in-lua/ If you find the template useful, please consider buying a copy of our current application to support us. It’d... More...

Posted by Eric, Posted on 15 Oct 2010, Last updated 18 Oct 2011 | 1 comments

Samurai Kitchen

We were special guest at the 2009 Adobe Max Russel Brown's Photoshop Pre Conference-Conference and we wrote a game during the session where the attendees could swap in their images for the images in this game. I am uploading the zip file and hopefully it is self explanatory and you can see how easy it is to create games and do animations in just a few lines of code. Samurai Kitchen Carlos More...

Posted by carlos m. icaza, Posted on 15 Oct 2010, Last updated 18 Oct 2011 | 13 comments

Match The Letter

Match The Letter is a simple picture game for helping kids learn their letters. I posted the source to github. I built it both for my son to play with and to get more familiar with Corona, so any feedback is appreciated. https://github.com/johnpolacek/Match-The-Letter-Game The app is available for download on the iTunes App Store and Google Marketplace. For more info, go to http://johnpolacek.com/matchtheletter More...

Posted by johnpolacek, Posted on 9 Mar 2011, Last updated 18 Oct 2011 | 11 comments

Two Player Pool Table

This game template is an update to the sample pool game that ships with Corona SDK. This new version includes dual player support, sound, ability to change the felt on the pool table, plus other improvements as well. Feel free to do whatever you want with the game as the code as usual is open source. Now, up to you to learn how to spin and slow down the pool table balls, add more sound, etc. Feel free to share... More...

Posted by carlos m. icaza, Posted on 20 Apr 2011, Last updated 18 Oct 2011 | 5 comments

Air Hockey 2 Player Game

Air Hockey is a two player game designed to show off some of the physics engine properties of Corona SDK and how with a few lines of code you can write a very addictive game. First one to score five points wins. Works seamlessly across iOS and Android devices. Open sourced MIT Licensed. Feel free to use the code as you wish. If you decide you want to make changes or additions, feel free to do so and let us know to... More...

Posted by carlos m. icaza, Posted on 20 Apr 2011, Last updated 18 Oct 2011 | 12 comments

Angry Turtles

This is a version of our Ghosts vs Monsters re-done as Angry Turtles vs rabbits, or hares, up to you how you want to name it. Just shows you how easy it is to use the Ghosts VS Monsters template (or this one for that matter) and change a couple of assets and have a very different looking game. Enjoy and as always, this code, is Open Source. Feel free to edit, modify and do how ever you please. Carlos. More...

Posted by carlos m. icaza, Posted on 2 May 2011, Last updated 18 Oct 2011 | 1 comments

Tilt Monster

Tilt Monster (formerly known in the App Store as Doodle Dash!) was the FIRST project of Jonathan Beebe, and was one of (if not THE) first Corona SDK game to reach over 100,000 sales in the App Store! (Special thanks to Biffy Beebe for the artwork/graphics assets, and her ideas and inspiration throughout the development process--this is the project that did it for us!) More...

Posted by jonathanbeebe, Posted on 25 May 2011, Last updated 18 Oct 2011 | 59 comments

Flight Path

You are in charge. You are the Head Honcho at the new Nimitz class of nuclear powered aircraft carrier and your job is to make sure that every plane/helicopter lands safely. This sample project is provided for you learn a different type of game that can be developed using Corona. It is up to you now to implement sound, different planes, water movement, score, etc. The code is very simple to follow and as usual it... More...

Posted by carlos m. icaza, Posted on 2 Jun 2011, Last updated 18 Oct 2011 | 13 comments

Pinball Madness

Try this game out so you can see how you can see how easy it is to setup the Corona physics to create a pinball game. Sample code is MIT licensed and Open Source, so you can use the code at will and create your own game, edit it, add better looking scoring, how about adding a left and right paddle only, more lights, sounds. Show us what you can do. Carlos More...

Posted by carlos m. icaza, Posted on 3 Jun 2011, Last updated 18 Oct 2011 | 6 comments

Ghost vs Monsters - OOP

This is Ghost vs Monsters re-written in an object-oriented style of programming. It's intended as a example of how one might separate functionality within the application. Many thanks to everyone at Beebe Games and Ansca for making the code publicly available! More...

Posted by dmccuskey, Posted on 29 Sep 2011, Last updated 18 Oct 2011 | 6 comments

Example MessageBox code

A common feature in a lot of games and applications is the use of a MessageBox to display some text to the user and provide then with different buttons to signify what action they want to take. Something like a "Do you want to Exit?" with a Yes and No button. I have posted source for the cMessageBox.lua module along with sample tests showing the features of this code. The code depends on the ui.lua module (... More...

Posted by KenRogoway, Posted on 23 Oct 2011, Last updated 23 Oct 2011 | 9 comments

Corona Comics 2.0

The Corona Comics SDK 2.0 is based on the 1.0 version from November, 2010. In truth, this code is not as much an SDK as a demo of a fully functioning app using the code. It is a Lite version of Electric Eggplant’s iPad app, “Be Confident in Who You Are: A Middle School ConfidentialTM Graphic Novel” with all the functionality intact. It contains the opening animation and all of chapter 1, plus the Info page, and... More...

Posted by Gilbert, Posted on 11 Nov 2011, Last updated 11 Nov 2011 | 32 comments

Run Rabbit Run

Run Rabbit Run - simple scrolling platform game. Rabbit run and jump between platforms, catch lives and carrots. The goal of project is provide new Corona SDK developers with simple game template. Fill free to use any part of game as you wish. I will write more details about "how to" on my blog aabweber.com You can download game here. More...

Posted by aabweber, Posted on 17 Nov 2011, Last updated 17 Nov 2011 | 7 comments

RagDoll example

Code: http://content.screencast.com/users/HoraceBury/folders/Jing/media/b5d1152f-54d3-4811-b584-bf08f27d5341/Ragdoll.zip?downloadOnly=true Swf Video: http://www.screencast.com/users/HoraceBury/folders/Jing/media/ab4587e4-6ff6-4cbe-90c5-9c150cdef424 I've been wondering about the issue surrounding Ragdoll physics in Corona and had always wanted to produce a direct comparison to illustrate the differences various... More...

Posted by horacebury, Posted on 22 Nov 2011, Last updated 2 Aug 2012 | 23 comments

Corona Slot Machine

Corona Slot Machine is a simple example code that can be used to create a Slot Machine or Casino style app. The example features a fully functional slot machine that cycles through seven images on three slides to create a slot machine feel. This is just the skeleton of the code that can be changed to have a different look or extra features, or be used as is. More...

Posted by ertzel, Posted on 22 Nov 2011, Last updated 24 Nov 2011 | 4 comments

Missile Command

A step-by-step tutorial showing how to create a Missile Command game using the Corona SDK. The resulting game is compatible across iOS and Android devices. The repository includes: assets: all of the graphics, audio, etc. required in the game; exercises: if you want to start with a particular exercise, then you can refer to the corresponding folder and start from there; MissileCommand: the finished game, if you... More...

Posted by Ludicrous Software, Posted on 24 Nov 2011, Last updated 24 Nov 2011 | 3 comments

oop - no metas, no module()

Introduction I've build a Class - with actually just one function - for easy and very basic OOP in Lua. After some tryings I've decided to go without metatables and without module(...). This is my own approach and of course ain't the best out there, but as far as I've tested it, it does its job very well for me, so may it do for you too. My first approach was using metas, as everywhere suggested. And this... More...

Posted by se24vad, Posted on 16 Dec 2011, Last updated 19 Dec 2011 | 2 comments

Running Clock

This code will create a variable running timer for your game/app. Please see below for what to set it up. Functions: clock.cancelTimers(): This will cancel or pause your timers clock.resumeTimers(): This will resume your timers from a clock.cancelTimer call First you have to require the clock by writing: 1 local clock = require("clock") Then to set up a clock you have to follow this: 1 2 3 4 5 6 7... More...

Posted by jeremyapplebaum12, Posted on 22 Jan 2012, Last updated 22 Jan 2012 | 2 comments

Cipr

Cipr (pronounced "sipper") is part package manager, part development framework for Corona SDK. Much like Python's pip, Cipr makes it easier to share packages and integrate them into Corona apps. The Goal for Cipr is that there's a generous amount of third-party, best-of-breed packages available for use in Corona apps. This will help new developers get started developing apps sooner and reduce the re-inventing of the... More...

Posted by cixate, Posted on 28 Jan 2012, Last updated 28 Jan 2012 | 1 comments

Raycasting Engine

Back in 1997, I wrote a raycasting engine in Turbo Pascal. It had a number of features and was heading towards being turned into a fully fledged game engine. That never happened. But since then, as I move between development platforms, I like to port a cutdown version of it to help make me familiar with the syntax and API on the new platform. Here is a basic raycasting engine written in LUA with the Corona SDK. More...

Posted by Jesder, Posted on 14 Feb 2012, Last updated 14 Feb 2012 | 16 comments

3D Object Rendering

A new example I wanted to share with you guys, was some 3D Object rendering. Not quite as exciting at the raycasting sample I posted a few weeks back, but still interesting enough I think ;) Glenz: Wireframe: More...

Posted by Jesder, Posted on 2 Mar 2012, Last updated 2 Mar 2012 | 7 comments

Shortest Path Through A Concave Polygon With Holes

This program draws the shortest path between two points inside any polygon (with or without holes). The source for this program is C code by Darel Finley found at http://alienryderflex.com/shortest_path/ and translated into Lua by horacebury and me. The program lets you draw a bounding polygon that is either a convex polygon or a concave polygon. Other polygons can be drawn within the bounding polygon to create “... More...

Posted by brucemartin, Posted on 19 Apr 2012, Last updated 20 Apr 2012 | 13 comments

Client And Game Server For Building Multiplayer Game Using Corona

Hi Community, Here is my first effort to make a multiplayer game with Corona. Server Game can be implements by Cubeia Firebase: (http://www.cubeia.org/index.php/component/content/article/1) http://dl.dropbox.com/u/55451790/firegame.zip http://dl.dropbox.com/u/55451790/GameServerClient.zip To start Server, go to pom.xml file folder and type maven command: mvn firebase:run (No Database and Setup require) Happy Coding... More...

Posted by luonghuutinh, Posted on 4 Jun 2012, Last updated 4 Jun 2012 | 0 comments

Improved WidgetDemo Sample

Built from posts I've made recently, this is an updated WidgetDemo from the application Sample code directory. This code is slightly improved/debugged on the code posted in the Developer Support forum. For details you can read those posts: https://developer.anscamobile.com/forum/2012/06/08/ios-style-submenu-navigation-using-tableview https://developer.anscamobile.com/forum/2012/06/07/encapsulated-ios-style-tab-bar... More...

Posted by horacebury, Posted on 10 Jun 2012, Last updated 11 Jun 2012 | 31 comments

Character for Corona SDK

This is a simple but useful module. Now you can easily create different characters with different display objects. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20  -- main.lua   _W = display.contentWidth _H = display.contentHeight   local physics = require('physics') local character = require('character') local dog = require('dog') local rabbit = require('rabbit')... More...

Posted by neostar20, Posted on 10 Jun 2012, Last updated 23 Oct 2012 | 2 comments

AutoLAN

AutoLAN is now free for everyone to use and learn from! If you want to get started in local networking here is the place to start! AutoLAN is a library for Corona SDK library that allows you to create a new multiplayer game or networking application! AutoLAN uses the a robust client server based networking model and is built on top of the high speed UDP transport layer. Connecting device A to device B is as simple... More...

Posted by M.Y.developers, Posted on 12 Jul 2012, Last updated 12 Jul 2012 | 19 comments

Match 3 Gems - Puzzle Game - prototype

Hi everyone! I would like to share a puzzle game code I have been working on for the last 4 days. This is a simple, early stage prototype of 'Match 3 Gems' type Puzzle Game but it is fully functional! Have a look at the video: http://www.youtube.com/watch?v=gY-z1beB2bM There is plenty things I could add to the code but it would be harder to understand so I decided to share it as it is. A few things you can learn... More...

Posted by Patsky - Patryk K., Posted on 8 Aug 2012, Last updated 8 Aug 2012 | 7 comments

Card Game Sample (Include All Basic Animation & Operation)

If you want to learn how to create a card game with Corona SDK. You can download my sample and take a look first. I already finished all the basic card movement animation and action. Since I don't have time to finish my game. So I share my code to everyone who want to create a high quality card game. Shuttle Cards, Flip Card, Double Click, Drap & Drop etc. 2012-8-24 Revised - Fix the download link Download... More...

Posted by roychan, Posted on 21 Aug 2012, Last updated 23 Aug 2012 | 6 comments

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

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... More...

Posted by roland.yonaba, Posted on 3 Sep 2012, Last updated 3 Sep 2012 | 9 comments

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... More...

Posted by roaminggamer, Posted on 15 Oct 2012, Last updated 4 Feb 2013 | 13 comments

Snippets: Samples, "Game", Editor

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. More...

Posted by StarCrunch, Posted on 20 Oct 2012, Last updated 20 Oct 2012 | 4 comments

Side Scroller Game

A side scroller game with Storyboard, Physics (collisions, gravity, forces) as well as Parallax Scrolling. Intended for beginners or people some a small to medium amount of coding experience. Comes with a video tutorial (about 2hrs all up) that shows how to build the entire game. The video tutorial begins at: http://www.youtube.com/watch?v=0GtUxdSeWzk&feature=youtu.be Get the full graphics and lua files here:... More...

Posted by Mark Falkland, Posted on 28 Dec 2012, Last updated 28 Dec 2012 | 4 comments

NeonPong - Complete Pong Sample Game/Template

I made a complete version of Pong for a demo/sample code example. I commented all of the code (heavily) and it wasn't all that complicated in the first place, so there should be no trouble with understanding it :) There is a CPU, different difficulties, (easy, medium, hard, and endless), and it does collision checking and moving of the ball without physics. It's also quite fun ;) More...

Posted by Caleb P, Posted on 17 Jan 2013, Last updated 30 Jan 2013 | 4 comments

Corona Tiled

Loads JSON saved map files from Tiled http://www.mapeditor.org/ Author: Michael Wilson / NO2 Games, Inc. - www.no2games.com More updates in v0.4 SUPPORTED JSON or LUA exported map files Multiple Layers Multiple Tilesets Custom Tile shapes Finding Objects by name Setting Physics properties from the map editor Object types (regular, polygon, line) that support physics properties Uses Corona Image Maps and Image Map... More...

Posted by no2games, Posted on 31 Jan 2013, Last updated 9 Apr 2013 | 1 comments

Jumping pony game

Jumping pony game is demo project for lutsk.io meetup. App use physics engine and touch events to move pony left or right. Gravitation move pony bottom and it bounces from the grass. It is a very easy example, targeted for the begginer Corona SDK developers. Total code lines is about 20. Video on Youtube Enjoy! More...

Posted by vova.sergeyev, Posted on 8 Feb 2013, Last updated 8 Feb 2013 | 0 comments

Simple Bubble Popper

Bubble Popper for the CoronaSDK This template was constructed to demonstrate many aspects of programming in lua for Corona. It is an updated version of some simple code I posted quite some time ago which helped many users get a start. This new version goes much further with graphics and the intent to show many different techniques that are not quickly identified when starting with Corona. You will learn How to... More...

Posted by TheRealTonyK, Posted on 24 Feb 2013, Last updated 13 Mar 2013 | 11 comments

Stackbuster: a Jawbreaker clone

I was asked to create a game like Jawbreaker from Windows, Windows Mobile and other devices. Here it is in its full glory. Does not need or use any assets, as everything is drawn using Corona's own graphics APIs. 1 2 3 4 5 6 7 8 9 10 ----------------------------------------------------------------------------------------- -- -- stackbuster.lua -- created by Raphael Salgado as BeyondtheTech -- version 1.0 -... More...

Posted by BeyondtheTech, Posted on 7 Mar 2013, Last updated 7 Mar 2013 | 1 comments

loadSoundLibrary: a quick way of structuring and loading your sound effects

If your code (and your build files) are getting a little discombobulated with all the sound effect files you have to load, this little code snippet can make loading sounds a lot easier with a lot less code. As your development progresses, many of you might notice a growing list of sound files sitting in the same folder as your image files as well as your lua code, so having a long directory could get a little messy... More...

Posted by BeyondtheTech, Posted on 8 Mar 2013, Last updated 8 Mar 2013 | 0 comments

CBResources

CBResources complements CBEffects, containing valuable resources like samples, tutorials, the most recent versions of CBGadgets, and more. CBResources has now been melded into the CBEffects GitHub repository, so you can download it there. Contribute to it's development, aid in the creation of the wiki, report bugs, or just download CBEffects to use at the GitHub page. Enjoy! Caleb More...

Posted by Caleb P, Posted on 20 Mar 2013, Last updated 17 Aug 2013 | 1 comments

EndlessScroller

Corona SDK example showing how to create and endless scroller type game. It does this by splitting up a spritesheet into multiple segments and scrolling them from right to left. As an old segment moves off the screen a new segment is created on the right. See the video at: http://youtu.be/UZjt6b4k7Io More...

Posted by funkyvisions, Posted on 9 Sep 2013, Last updated 9 Sep 2013 | 1 comments

Parental Gate

Implements Parental Gate functionality for Corona apps that want to be included in the App Store's KIDS section. It does this by showing a required age authorization dialog on startup that cannot be bypassed. Once the age has been selected it is persisted and the user will never be asked to answer the question again. The app can then use the age selected to show or hide various UI elements to conform to Apple’s... More...

Posted by funkyvisions, Posted on 25 Sep 2013, Last updated 25 Sep 2013 | 0 comments