Word Snap Starter Kit

This starter kit will allow you to rapidly write 'word snap' style games and edit puzzles for your game.

RoamingGamer RoamingGamer

Also Included

This starter kit is made using a standard base that can be found in all current and future 'try before you buy' kits. Those parts are:

The Viewer

Basic Usage

local utils = require "easy.utils"
local wordSnap = require "easy.wordSnap"

local group = display.newGroup()
local back = display.newRect( group, centerX, centerY, fullw, fullh )

local params = 
   tileColor         = utils.hexcolor("#e96a5d"),
   tileStroke        = utils.hexcolor("FFFFFF"),
   tileStrokeWidth   = 2,

   landColor         = utils.hexcolor("#1b3679"),
   landStroke        = utils.hexcolor("#edff47"),
   landStrokeWidth   = 2,

wordSnap.createViewer( group, centerX, centerY, "level_1_1.json", params)

The Editor

Basic Usage

local mode = "edit" -- edit view

if( mode == "edit" ) then
   local utils = require "easy.utils"
   require "presets.presets" -- For button maker
   local wordSnap = require "easy.wordSnap"

   wordSnap.setFonts( "viewer.ttf", "editor.ttf" )


   local wordSnap = require "easy.wordSnap"  
   wordSnap.createViewer( nil, centerX, centerY, "level_1_3.json" )

Quick Reference


wordSnap.createEditor( group ) - Creates and starts the editor.


wordSnap.createViewer( group, x, y, puzzleName, params ) - Creates a puzzle 'viewer'.

The 'viewer' is essentially a fully functional game instance that you can place anywherey you like, in any group you like.

Note: All puzzle definitions are assumed to be in the folder ~/puzzles/.


wordSnap.getPuzzleInfo( puzzleName ) - Gets info about puzzle and returs it as a table.

Returned Table Fields

Note: All puzzle definitions are assumed to be in the folder ~/puzzles/.


wordSnap.resetLayoutToStart( instant ) - If you're running the viewer, this will set all puzzle pieces back to the starting (unsolved) position.


wordSnap.setFonts( vFont, eFont ) - Sets default font for viewer and/or editor.


wordSnap.setTileDimensions( width, height ) - Set the width and height of tiles.

Important! -- If you are going to change this, be sure to set it to the same value while editing as you do during viewing or your puzzle layouts may look goofy.


wordSnap.setFlySettings( newTime, newEasing ) - Changes the fly behavior for tiles that snap back to the unsolved position.


wordSnap.start( ) - If you are running the viewer, calling this enables touch interactions if they were previously disabled.

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:

  1. Post to this forum: https://forums.coronalabs.com/forum/553-other-third-party-tools/
  2. Make sure the title starts with: Word Snap Starter Kit and includes a short and meaninful name for the the problem.
  3. In the body of the post give me clear, concise, and precise description or question.

~ The Roaming Gamer

RoamingGamer Copyright © Roaming Gamer, LLC. 2008-2017; All Rights Reserved