Before You Start
Before You Start
Project and file names
Avoid long names for your projects and files and, DO NOT use characters like +-<>%,#;!. They may conflict with the XML convention used in Kwik’s file project. Also, DO NOT use capital letters in your PSD file names. Try to name everything in lower caps. Keep naming simple!
Before you start adding buttons and animations, follow the rules below. It is much easier to add interactivity with the final names than edit all of them afterwards. Basic rules include:
Avoid long names.
All layer names become variables when exported, meaning they use more memory and are more difficult to read. Also, they are going to be shortening anyways, as Lua will not allow variable names with more than 15 characters.
Avoid having multiple layers with the same name.
Kwik will not export the second layer with the same name as it will overwrite the first one, (which will make the Lua code crazy). Kwik will provide an alert error if it finds layers with same name.
DO NOT use characters such as + - <> %,#;!. for naming layers
These characters conflict with Lua language. Kwik removes these “strange” characters but, if they were used before in any button actions, it may generate errors during export.
Do NOT name your layers starting with numbers.
For example, a layer named 1, will generate an error. A layer named 01_Name will also generate an error. However, a layer named Name_01 will render is OK
Do not use Lua commands as names.
For example, a layer named “if” will conflict with the command if. Some Lua commands are: if, end, local, transition, play. A full list of Lua commands is here. Kwik will generate an alert error if it finds layers with Lua commands as name.
Only user Western characters as layer names.
Keep Layer Names Short for text layers
text layers names are originally created using the content of the text from the canvas. If you have a long paragraph, the layer name will be the entire content of the long paragraph! Long layer names cause problems in the generated code, so edit the layer names to make them shorter. (This is the most common problem we have seen from our users reporting issues.) And don’t forget all text, besides the ones used in the Sync feature, also exports as images.
Kwik exports grouped layers as a single image. Use them to create more complex elements (for example, a multi-layered button with text, shadows, etc.), or for the creation of static elements. A common issue is to have all page elements in a group layer expecting they will render separately. If you have a group with several layers, try to flatten them whenever it is possible. It will make the export process much faster.
Create a background layer
Kwik must find at least one art layer in order to export. Whenever is possible, create it first. This is also used as the place for “page swipe” events * Kwik always uses the bottom layer of your PSD as background. If it cannot find it, an error occurs.
Ulitimate Config When creating a new project, Ultimate Config is default. It is optimized screen resolution for various devices and @2x, @4x images are produced. Ultimate Config is the most popular config uration of Corona SDK.
If your audience is iPad users only, just create a project for iPad Air only.
Universal/New Universal project from Kwik3 is optimsed better for iPad but Ultimate Config is a little bit better for both iPhone/iPad
ref. Ultimate Config 320x480
Button and Animation names
Although Kwik offers an auto-naming feature, try to enter your own names (follow the rules above). It will help you to quickly edit your actions from the project view. This is a time saver for project with several actions.
Export images only once
Whenever is possible, after renaming all the layers, export them (Publish button) before adding actions. You can do that by clicking the button Settings, then enabling the Export images checkbox. After the first export, disable the Export images checkbox. From now on, the Preview button will work much faster, exporting only the code (use it as much as need to tweak animations).
- export image ON
Export page only
You can enter the target page number to be published. Kwik only processes the target page only to generate the lua files.
- export page ON
Don’t forget your icons and opening launch image
Kwik will help you to preview your project. However, your great comic or book will need the perfect icons (not the one we provide with Kwik’s logo) and a beautiful default/launch screen.
Several designers kept the old good projects in Fireworks as it offers vector tools not available in Photoshop. When using PSD files created by Fireworks, please note that they do NOT come with the background layer (everything comes inside a group layer). As you read above, it will not work! To resolve this issue, if you are opening a PSD file from Fireworks, simply select all sub layers and move them outside the original folder they came in.