Super Starter Kit 2
SUPERCHARGING Corona SDK game development every day. ( GitHub || itch.io )
(Latest Release Version: 2018.01.02
) (Last Docs Update: 02 JAN 2018
)
What Is It?
Super Starter Kit 2 (aka SSK2) is a collection of libraries and utilities designed to take your Corona SDK development experience to a whole new level of efficiency and speed.
Globals | Variables & functions (optionally) added to the global namespace to speed up and simplify coding. |
Extensions | Adds 60+ new and improved features to: display.*, io.*, math.*, string.*, table.*, transition.* |
Libraries | ~30 libraries (and growing) that I have developed to solve common game and app design problems. |
External | A few libraries by folks that I find useful. (Appropriate licenses listed and included.) |
What Is In It?
Previously, SSK2 was split into a lite and PRO version. Additionally, I charged for both versions.
As of June 18th 2017. SSK2 is now free and comes in a single release containing:
- ssk2/ - The kit.
- validation/ - A test suite validating many (not all) features.
Installing SSK2
To use SSK2, simply:
- Copy the ssk2 folder and its contents to the same folder as your main.lua file.
- Add this to main.lua at or very near the top of the file:
require "ssk2.loadSSK"
_G.ssk.init()
Tip: SSK2 adds extra features to Lua and Corona so it is best to initialize it prior to requiring any other libraries or modules.
Configuring SSK2
The initialization example shown above uses the default settings for SSK2. You may want to change that.
ssk.init()
takes an optional table of key-value pairs { key1=value1, ..., keyN=valueN }
that allows you to configure the myriad options SSK2 provides.
Configuration Settings:
- debugLevel (
0
) - Values higher than 0 turn on debug messaging in SSK2 modules and libraries.- Valid range: [0, 2]
- gameFont (
native.systemFont
) - SSK2 uses a 'default' font for buttons and some other features. You can specify that default font by providing the name of a validttf
orotf
file in this setting. - launchArgs (
nil
) - Takes the value...
which is only available in main.lua. If provided it is used to further refine SSK2 settings based on what Corona has discovered about the current 'device' and passed on to your app in the launch args. - measure (
false
) - If set totrue
SSK2 will dump a listing of each library name and size to the console.
Example
_G.ssk.init( { launchArgs = ...,
measure = true,
gameFont = "Raleway-Light.ttf",
debugLevel = 2 } )
Validation Sampler
As time proceeds, there will me more and more free and paid content available using SSK2... but for now you can take a look at the Validation Sampler that comes with SSK2.
You will find the Validation Sampler in the ZIP-file you downloaded under ~/validation
.
To run the sampler, do the following:
- Copy the
ssk2/
folder (and all its contents) into~/validation/
. - Open main.lua in the SIMULATOR. This will display a menu of samples you can run.
- Click on any sample button to run that sample.
- Re-load simulator (CTRL+R or CMD+R) to see the menu again.
(Although it will work, the sampler is not designed to run easily on a device. i.e. You will need to quit the app to run a new sample.)
Special
SSK has a couple of (semi-) hidden feature attached to the module that you might find useful.
ssk.getDT()
- Returns the delta-time (in milliseconds) since the last frame.- You can use this instead of re-calculating it yourself over and over in various enterFrame() listeners that need delta-time.
ssk.getFrame()
- Returns current frame count (starts when SSK loads).
Metrics
For those folks who love metrics (admit it, you do), here are a few interesting details about SSK2.
Lines Of Code & Comments
Counting with cloc I get these metrics:
-------------------------------------------------------------------------------
Language files blank comment code
-------------------------------------------------------------------------------
Lua 58 2199 2386 9356
-------------------------------------------------------------------------------
Memory Footprint
A measurement of memory used per-library and in total:
--------------------------------------------------------------------------
-- Initalizing SSK
--------------------------------------------------------------------------
ssk2.core : 10 KB
ssk2.extensions.display : 1 KB
ssk2.extensions.io : 7 KB
ssk2.extensions.math : 5 KB
ssk2.extensions.native : 3 KB
ssk2.extensions.string : 13 KB
ssk2.extensions.table : 25 KB
ssk2.extensions.timer2 : 4 KB
ssk2.extensions.transition : 3 KB
ssk2.system : 2 KB
ssk2.colors : 16 KB
ssk2.display : 52 KB
ssk2.math2d : 30 KB
ssk2.cc : 6 KB
ssk2.actions.actions : 21 KB
ssk2.easyIFC : 128 KB
ssk2.easyInputs : 72 KB
ssk2.easyCamera : 14 KB
ssk2.misc : 64 KB
ssk2.pex : 18 KB
ssk2.dialogs.basic : 9 KB
ssk2.dialogs.custom : 5 KB
ssk2.factoryMgr : 4 KB
ssk2.android : 1 KB
ssk2.security : 9 KB
ssk2.persist : 2 KB
ssk2.points : 4 KB
ssk2.soundMgr : 21 KB
ssk2.easySocial : 2 KB
ssk2.shuffleBag : 4 KB
ssk2.meters : 7 KB
ssk2.files : 44 KB
ssk2.tiledLoader : 10 KB
ssk2.easyPositioner : 12 KB
ssk2.adHelpers.adHelpers : 2 KB
--------------------------------------------------------------------------
SSK Total : 626.11 KB
--------------------------------------------------------------------------
Tip: While I find it useful to have all parts of SSK2 present during development, I sometimes remove elements I'm not using during production.
To teach you about this, I will be soon write an article called: SLIMMING DOWN SSK2
~ The Roaming Gamer
Help!
Don't Panic
Are you having a problem with SSK2? If so, don't panic.
I regularly update SSK2 and its co-products. Most of the time problems can simply be traced back to not having the most up-to-date version of SSK2.
Are You Using The Latest Version?
Add this code at the end of main.lua
print( "SSK VERSION: " .. ssk.getVersion() )
If this prints out SSK VERSION: 2018.01.02
you have the latest version.
If not, then go download a new copy from your store page.
Tip: While you are checking, be sure to check that your co-products are up-to-date too.
Are You Getting Errors?
Did you get an error dialog, or are you seeing error/warning message in the console?
If so, read them and see if you have made a mistake on the line indicated.
If you think its me and not you, post a question in the forums. (See Posting Questions To Forums below.)
Are you typing ssk2
?
You may have noticed that while this is called SSK 2, I still use the old naming convention ssk.someFunction()
in my samples.
"Why," you ask?
I am a lazy coder and proud of it. Even one extra letter is too much repetetive typing for me. Also, I'm and old dog, and as the saying goes, "You can't teach an old dog new tricks."
So, if you have been doing this: ssk2.someFunction()
, get rid of the 2
and you will be good to go.
SSK2 ~= SSK Legacy
This is the guide for SSK2. If you are trying to use Legacy SSK and following this guide... well many things have changed. Please consider getting SSK2.
Get SSK2 Now! It will be worth every penny! ~ The Roaming Gamer
Posting Questions To The Forums
I will be providing help (exclusively) through the Corona SDK Forums. (Sorry: Direct e-mails and private messages will not be answered.)
When posting a question in the forums, be sure to follow these guidelines:
- Post to this forum: https://forums.coronalabs.com/forum/553-other-third-party-tools/
- Make sure the title starts with: SSK2 and includes a short and meaninful name for the the problem.
- Example Title:
SSK2: newImageRect() Paint Fill Parameter Not Working
- Example Title:
- In the body of the post tell me all of the following:
- Versions / Environment / Target
- Version of SSK you are using.
- Version of Corona SDK you are using.
- OS you are developing under.
- Where you are encountering the issue (Simulator(s) and or Device(s)).
- Error Message(s) (If Any)
- Error messages (put them in a code block for legibility)
- Summary Of Problem
- What you are trying to do.
- What you expected to see.
- What you saw instead.
- Why you think this is wrong (if there is no explicit error message.)
- Help Thyself
- Tell me what debugging steps you have tried.
- Versions / Environment / Target
Be clear, concise and precise.
The more effort you put into your post, the better I will be able to help you.~ The Roaming Gamer
Change History
2017
2017.12.11
- Updated system detection code. Can now detect true current OS, target OS, and device type (even in simulator).
- System, Globals, and Colors are exported all the time. I removed this option because too many of my products and even internal SSK features depend on them. Allowing users to disable export just lead to confusion and errors.
2017.12.04
- Changed version numbering system to date style: YYYY.MM.DD
- Fixed functionality and visual feedback for 2, 3, and 4 state image/filled-rect buttons.
2017.011
- table.dump() can take 'note' argument 2nd or 3rd field now - UPDATE
- Filled rectangle toggle buttons do not properly update - FIXED
- Safety code in 'stopCamera' method of tracking camera. - ADDED
- Documents and Destkop roots not properly discovered on OS X - FIXED
- Added ability to 'stop' a blocker created with misc.blockTouchesForDuration( duration, subtle ) instead of relying on an internal timer.
- Added third default images (square) for dialog tray.
- WIP: logger tool, event reflector tool, vScroller.
2017.010
- lite + PRO merged into a single FREE release.
- New math.* extension: math.isOdd()
- New math.* extension: math.isEven()
- Modified core/variables.lua to allow for 're-calculation on resize' Calling: ssk.core.calculateGlobals() will re-calculate.
- Improved 'marker' code in table.dump(), etc.
- Fixed typo in Files library.
- Swapped image order for "default_sound" button preset.
- Fixed typo in Factory Manager
- Added new function to Factory Manager - get( name ) returns reference to named factory.
- Added new custom editor features to Factory Manager. I'm working on making it easier to implement in-game editors with factories.
- Modified Easy Alert so that passing a blank buttons list will default to a single 'OK' button that simply closes the dialog.
- Added features to Sound Manager](libraries/soundMgr): altVolume field to further attenuate specific sounds within a category, removeAll() to stop and release all sounds.
- Incorporated fixes to Tiled Loader to optionally switch pieces to 'center-anchored', support rotated elements.
- Incorporated timer2 timer-library extention from Jason Schroeder's library.
- Added: _G.unrequire( path )
- Added: _G.trace( msg [, depth ] ) - A function and variable debug tracing helper.
- Added: table.xinspect( tbl ) - A safe version of table.print_r()
2017.009
lite + PRO
- Fixed bug in pex.lua where particle emitter was not added to (passed) group.
- Fixed bug with optional
retval
for misc.smartTouch and misc.smartDrag. - Fixed pingPong tag bug. Common tag name not propogated to ping/pong transitions.
- Added delay parameter to ssk.misc.easyShake()
PRO-only
- Added Ad helpers modules for: admob, applovin, house ads, inmobi, mediabrix, revmob, and vungle (not documented yet)
- Fixed bug where Android rating calls crashed.
- Fixed social.* docs.
- Added composer.* swipe extension (still work in progress so may change before final release.)
- Modified debug output levels for soundMgr to make it less verbose during normal use.
2017.008
lite + PRO
- Fixed issue with factoryMgr.new() - Previously if nil was passed for < x, y > then < centerX, centerY > was used as a default. This broke some of my standard factories which relied on nil values to mean: 'auto-place'. From now on, < x, y > values are passed to the factory instances without change.
- Added ssk.misc.createPieChart() factory
- Added ssk.misc.genCircleMask() helper
- Added ssk.misc.pingPong() helper
- Bug fix (key event autolistener not hooking up)
- Added table.tokenize() function to create token separated strings from tables (opposite of string.split()).
- Fixed bug in autolan require() that caused crash when enabling external libraries.
- Improved detection of iPhone 7 variants.
2017.007
lite + PRO
- Changed string.startswith to camelCase: string.startsWith()
- Changed string.endswith to camelCase: string.endsWith()
- Updated transition.color() onComplete to handle functions and methods.
- Fixed math2d.angleBetween() so that it takes vector tables and discrete values.
- Modified ssk.misc.rotateAbout() to make it more flexible.
- Added Run Length Encode/Decode External Module
2017.006
lite + PRO
- Critical fix to ssk.math2d - Added two missing functions/dependencies.
- Added ssk.misc.addSmartTouch( obj, params ) - Adds a touch handler that will work in all setups.
- Added ssk.misc.addSmartDrag( obj, params ) - Adds a touch handler that gives the object a drag-n-drop ability.
- Added ssk.misc.addPhysicsDrag( obj, params ) - Adds a touch handler that gives the object a drag-n-drop ability using physics.
2017.005
PRO-only
- Added Easy Positioner Tool/Module
- Added First Version of Tiled Loader
lite + PRO
- Added First Version of Factory Manager
- Added 'custom' dialog tray factory.
- Added forEach() as table.* extention
- Added forEachi() as table.* extention
- Added optional locked image/rect to buttons library (2/3/4 state button)
- Added optional toggled image/rect to buttons library (2/3/4 state button)
- Updated 'ignoreList' to allow it to gracefully handle 'nil' objects.
- Updated ssk.misc.getImageSize() to more nicely handle bad path.
2016
2016.001 .. 2016.004
- Initial Releases (of SSK2; SSK version 1 was released long before this...)
Copyright © Roaming Gamer, LLC. 2008-2016; All Rights Reserved