Skip to content

Commit

Permalink
added json and Composer as requirements, started to update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisdugne committed Jan 30, 2017
1 parent fddfa15 commit 4daab99
Show file tree
Hide file tree
Showing 3 changed files with 89 additions and 29 deletions.
2 changes: 0 additions & 2 deletions app/App.lua
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,6 @@ function App:setup()
yellow = 'ff00ff'
})

utils.tprint(COLORS)

colorize = function(color)
return utils.toColor(COLORS[color])
end
Expand Down
3 changes: 3 additions & 0 deletions cherry.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
VERSION = '2.0'
--------------------------------------------------------------------------------
-- libs
json = require 'json'
composer = require 'composer'

_ = require 'Cherry.libs.Underscore'
utils = require 'Cherry.libs.Utils'
Vector2D = require 'Cherry.libs.Vector2D'
Expand Down
113 changes: 86 additions & 27 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,40 +20,72 @@ Cherry is an open source starter provided as a `CoronaSDK App` to help building
You may use Cherry as a base, or to pick components from, in order to start your own game.
Cherry provides the following facilities and libraries:

#### Game worflow

Avoid developing your screens by using many pre-defined `screens` to go straight to the point :

- Home + Options
- Level Selection
- Playground
- Score
- Profiles
- Credits
#### Using Cherry
- clone Cherry next to your project, and symlink it to your project root
`ln -s ../Cherry Cherry`
- add your env folder with your en settings
- add a `main.lua` with just `require 'src.app'`
- add a `src/app.lua` and require `Cherry` inside
```
CHERRY = require 'Cherry.cherry'
```
- then call `App.start()` with your options
```
App:start({
name = 'YourGame',
version = '1.0',
})
```

#### Starters

Each branch gives a fresh starter depending on your game requirements
A typical tree should be :

- `master`: level based Game
- many profiles management
- provide chapter + levels loading before to render Playground
```
├── Cherry
│   ├── _images
│   ├── app
│   ├── cherry.lua
│   ├── components
│   ├── engine
│   ├── libs
│   ├── screens
├── YourGame
│   ├── CBE
│   ├── Cherry -> ../Cherry
│   ├── assets
│   ├── build.settings
│   ├── config.lua
│   ├── env
│   ├── main.lua
```

- [one-profile-just-playground](https://github.com/chrisdugne/cherry/tree/one-profile-just-playground):
- game renders the Playground directly
- one player = no profiles screens/switches
#### Doc to provide
##### waiting for the doc, read the code
- Look in Cherry.app.App to see what you may override with `App:start(options)`
- Look in Cherry.engine.Game to see what you may override with `Game:YourStuff()`

#### Libraries
##### core
- env files
simple example: development.json
```
{
"silent": true,
"view-testing": "Playground"
}
```

Many libraries to provide easy tooling for your app :
- adding custom screens
- extending/overriding `engine.Game`

- screen **routing**
- game **Camera**
- **touch** controller
- **sound** library (music + effects)
- a sublevel to register **effects** from [CBEffects](https://github.com/GymbylCoding/CBEffects).
- **user** profile and game status
- google **analytics** events (a lot are already plugged in the workflow)
##### less important misc
- defining custom globals
- setting custom bg
- setting custom gravity
- defining colors
- defining analytics ids
- defining facebook ids
- defining ios id

#### Components

Expand Down Expand Up @@ -236,6 +268,33 @@ Use 2 background images to switch between `dark` and `light` modes.

- use `Background:darken()` and `Background:lighten()` wherever you need in your app to switch modes.


#### Cooldown
todo, read the code to understand the API
#### Chapters
todo, read the code to understand the API
#### Levels
todo, read the code to understand the API


## Libraries

Many libraries to provide easy tooling for your app :

- screen **routing**
- game **Camera**
- **touch** controller
- **sound** library (music + effects)
- an API to register **effects** from [CBEffects](https://github.com/GymbylCoding/CBEffects).
- **user** profile and game status
- google **analytics** events (a lot are already plugged in the workflow)







## Music and Sounds

Courtesy of [VelvetCoffee](https://soundcloud.com/velvetcoffee), you may use the samples from `/assets/sounds` for your own game, providing you credit VelvetCoffee for the work and link to :
Expand Down

0 comments on commit 4daab99

Please sign in to comment.