Before You Start

Before You Start

  1. Photoshop optimisaition

  2. 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!

  3. Layer names

    Before you start adding buttons and animations, follow the rules below. It is much easier to add interactivity with finalized names rather than to edit all of them afterward. 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 identical names.

    • 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 would 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” is correct.

    • 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 named with Lua commands

    • Only user Western characters as layer names.

  4. Keep Layer Names Short for text layers

    Text layer names are originally created using the content of the text from the canvas in Photoshop. 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.) Don’t forget all text, besides the ones used in Sync audio feature, also are exported as images.

  5. Grouped layers

    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 that images are not rendered 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.

  6. 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.

  7. Ultimate Config When creating a new project, Ultimate Config is the default. This configuration optimizes the screen resolution for various devices, and @2x, @4x images are produced. Ultimate Config is the most popular configuration of Solar2D.

    If your audience is iPad users only, just create a project for iPad Air only.

    Universal/New Universal project from Kwik3 is optimized better for iPad, but Ultimate Config is a little bit better for both iPhone/iPad

    ref. Ultimate Config 320x480

  8. 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 a project with several actions.

  9. 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 to tweak animations).

    • export image ON
  10. Export page only

    You can enter the target page number to be published. Kwik only processes the target page only to generate lua files.

    • export page ON
  11. 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.

  12. Fireworks

    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 the sub layers and move them outside the original folder they came in.