Cherry is a starter for CoronaSDK App to help building your game.
- Introduction
- Usage
- Libraries
- Starters
- Components
- Music and Sounds
- License
- Third Parties
- Games using Cherry
You may extend Cherry framework, or just pick few components, in order to start your own game.
- clone Cherry next to your project, and symlink the lib to your project root:
ln -s ../Cherry/cherry cherry - add a
main.luawith
-- main.lua
require 'cherry.main'
require 'src.app'- add a
src/app.lua - then call
App.start()with your options
-- src/app.lua
App:start({
name = 'YourGame',
version = '1.0',
})- add a
env/development.json
{
"silent": true,
"invincible": true,
"view-testing": "playground"
}see env settings for more options.
A typical tree should be :
βββ Cherry
βΒ Β βββ cherry
βΒ Β βΒ Β βββ assets
βΒ Β βΒ Β βΒ Β βββ images
βΒ Β βΒ Β βΒ Β βββ sounds
βΒ Β βΒ Β βββ core
βΒ Β βΒ Β βββ components
βΒ Β βΒ Β βββ engine
βΒ Β βΒ Β βββ libs
βΒ Β βΒ Β βββ screens
βΒ Β βββ test
βΒ Β
βββ YourGame
βΒ Β βββ cherry -> ../Cherry/cherry
βΒ Β βββ assets
βΒ Β βΒ Β βββ images
βΒ Β βΒ Β βββ sounds
βΒ Β βΒ Β
βΒ Β βββ build.settings
βΒ Β βββ config.lua
βΒ Β βββ env
βΒ Β βββ src
βΒ Β βΒ Β βββ components
βΒ Β βΒ Β βββ extensions
βΒ Β βΒ Β βββ models
βΒ Β βΒ Β βββ screens
βΒ Β βββ test
βΒ Β βββ main.lua
UT with busted: http://olivinelabs.com/busted/
use luarocks to install busted and luacov
> ./test/run
ββββββββββββ
12 successes / 0 failures / 0 errors / 0 pending : 0.014314 seconds
A Screen implements the Composer library.
- Start by creating a new
screen, for instance duplicate the simplest onesrc/screens/Playground.lua - Register your new screen in the Router :
YOUR_NEW_SCREEN = 'YourNewScreen' - Now you can open your screen from anywhere calling :
Router:open(Router.YOUR_NEW_SCREEN)
- Each
modelshould implementnewandshowfunctions, for instance read how Item is built. - Register your model in main.lua :
YourModel = require 'game.models.YourModel' - Use
YourModel:new()during theLevelDrawerparsing - Use
YourModel:show()during theGamerendering
Either use these components within the full workflow or pick them one by one to use it in your own game.
See documentation for the complete components list and options.
See documentation for the complete components list and options.
- screen routing
- game Camera
- touch controller
- sound library (music + effects)
- an API to register effects from CBEffects.
- user profile and game status
- google analytics events (a lot are already plugged in the workflow)
Courtesy of VelvetCoffee, you may use the samples from /assets/sounds for your own game, providing you credit VelvetCoffee for the work and link to :
https://soundcloud.com/velvetcoffee
You may use Cherry or a part of it in a free or commercial game or app, providing you follow the BSD crediting requirements, provided in the project LICENSE
- Cherry uses the awesome particle effects provided by CBEffects.
- There are some adapted functions from Underscore.Lua
- Mobile GUI assets from GraphicBurger
- Avatars from Tiny Speck
- Profile icon designed by Miguel C Balandrano
- Phantoms released on November 2015 as the actual source for
- Look in app.App to see what you may override with
App:start(options) - Look in engine.Game to see what you may override with
Game:YourStuff()
- env files simple example: development.json
{
"silent": true,
"view-testing": "Playground"
}
- adding custom screens
- extending/overriding
engine.Game
- setting custom bg
- setting custom gravity
- defining colors
- defining analytics ids
- defining facebook ids
- defining ios id
