Username or E-mail
Password (Forgot?)
New? Sign Up
Join or Sign In
Forums Stencylpedia Stencyl TV Translations Go Pro - Plans & Pricing Download Stencyl


Switch to Book Layout

1: Getting Started

  • Getting Started
  • Crash Course
  • Crash Course 2
  • StencylForge

2: Building Logic

  • What is a Behavior?
  • Creating a Behavior
  • Attributes
  • Game Attributes
  • Attribute Types
  • Events
  • Our Behaviors

3: Actors

  • What are Actors?
  • Animations
  • Motion & Forces
  • Physics
  • Controls
  • Collisions & Groups
  • Killing vs. Recycling
  • Tweening
  • Effects
  • Chapter 3 Challenge

4: Scenes

  • Scene Basics
  • The Camera
  • Tilesets
  • Regions
  • Drawing Text & HUDs
  • Changing Scenes
  • Music, Sounds & Channels
  • Backgrounds
  • Customizing Actors
  • Chapter 4 Challenge

5: Game Mechanics

  • Saving
  • Pausing
  • 3rd Party Services
  • Web Requests

6: Advanced Topics

  • Get/Set Attributes
  • Custom Events
  • Blending Modes
  • Lists
  • Custom Blocks
  • Continuous Collisions

7: Testing & Tuning

  • Testing Games
  • Optimizing Performance 1
  • Optimizing Performance 2

8: The Last 10%

  • Flash Publishing
  • Standalone Apps
  • iOS App Store
  • Chrome Store
  • Making Money

M1: Mobile - Intro

  • Getting Started
  • Testing on your Device
  • Flash -> iOS Guide

M2: Mobile - Basics

  • Atlases
  • Drawing Text
  • Retina Display
  • Accelerometer
  • Joystick
  • Universal Games

M3: Mobile - Services

  • iAds
  • Game Center
  • In-App Purchases

M4: Mobile - Publishing

  • Debugging
  • Publishing to the App Store
  • Optimizing Performance
  • Promoting your Game

A: Troubleshooting

  • Showstoppers
  • General FAQ
  • iOS FAQ
  • The 90% Memory Warning
  • Recovering Broken Games
  • Can't Export to SWF
  • Reloading Documents
  • Generating Logs
  • Flash Security Settings
  • How to Report Bugs

B: How-To Guides

  • Importing Assets
  • Scene Designer
  • Code Mode
  • Font Editor
  • Pencyl (Image Editor)
  • Tile Editor (Shapes)
  • Game Cleaner

C: Reference

  • Glossary
  • Block Reference
  • Useful Shortcuts
  • Stencyl API

D: Resources

  • Stencyl TV
  • Abigayl's Guides
  • Giving Critiques
  • Creating Extensions
  • Translating Stencyl
  • Credits

3.0 Drafts (In Progress)

  • What's New in Stencyl 3.0?
  • Setup (Android)
  • Setup (Desktop)
  • Setup (iOS) - Concepts
  • Setup (iOS) - Mac
  • Setup (iOS) - Windows
  • Testing iOS on Windows
  • iOS Troubleshooter

  • Mobile App Scaling
  • Full Screen Mode
  • Simple Physics
  • Backgrounding an App

  • iOS App Store
  • Mac App Store
  • Windows Store
  • Google Play
  • HTML5

  • Android Ads
  • Android Purchases (WIP)
  • 4" Form Factor (iPhone 5)
  • Mobile Input
  • Mobile Features

  • Extending the Engine
  • iOS / Android Extensions
  • Developing the Official Extensions
  • Developing the Engine

  • iAds (Revised)
  • Game Center (Revised)
  • iOS Purchases (Revised)
  • Atlases (Revised)
  • Drawing Text (Revised)
  • Joystick (Revised)
  • Accelerometer (Revised)
  • Sounds (Revised, WIP)
  • Debugging (Revised, WIP)
  • iOS Performance (Revised)
Level: Beginner

Porting from Flash to iOS

This article describes the process of porting a Stencyl-made Flash game to iOS. Porting involves 3 steps.

  1. Convert the game to a mobile game
  2. Clean up behaviors that use Flash-specific functionality
  3. Import double-resolution graphics


Before You Begin...

Back up your game, just in case something goes wrong.

If the game uses any Code Mode behaviors (as opposed to Design Mode behaviors with embedded code), you must remove those behaviors before porting your game over.


Step 1: Convert to a Mobile Game

First, check the File menu for the option “Convert to Mobile Game.”

You’ll be prompted to save the game. Click yes. After that, the game will automatically close and reopen.

If you’re on a Mac, try running the game in the simulator right away. If you’re lucky, it’ll run without a hitch. If not, read on...


Step 2: Clean Up Behaviors

Your game may be using functionality that’s only available in our Flash engine. If you try running your game as-is, and it crashes or is missing functionality, this might be the case.

The good news is that resolving this issue is fairly simple. First, locate any blocks that have the Flash icon on them.

Wrap logic that uses these blocks in a “do only in Flash” block (Flow > Advanced). That’s it!

If you continue running into issues, consult our Debugging guide for details.


Step 3: Import 2x Graphics

After confirming that your game runs, you’ll want to import all the graphics back in at double-resolution, or else they will appear pixelated on newer devices that contain a Retina (HD) Display.

Consult the Retina Display guide for details.

Note: If you plan to make an iOS game, you should plan this from the beginning before you create any game graphics. Short of using utilities such as scale2X to re-size your graphics, the only way to ensure your game will look good is to create higher resolution graphics from the get-go.


Tips & Gotchas

1) Convert mouse input to the equivalent touch blocks (show below). They work with both touch and the mouse!

2) Objects are smaller than you’d expect on an iPhone or iPod touch. The actual dots per inch (DPI) is significantly higher, which means anything displayed will appear smaller. You may need to increase their size when porting over to the iPhone.

3) Mobile devices are more sensitive when it comes to performance. Keep that in mind when designing your game.

4) Text Drawing can drag performance down. Use Labels instead.

5) You may get a message about the Atlas size being exceeded. Consult the Atlas guide for details.



Last Updated: 2012-04-03 by Jon

9732 have read this article
Disclaimer: The Stencyl Team does not actively monitor comments on articles. If you're seeking help for your game, please ask a question on the forums. Thanks!
2 Comments
TimNedvyga
Yep, how i can get back to Flash from Flash/Mobile?
0 11 months, 2 weeks ago
Frixolydian
How do I undo this action? I accidentally clicked and accepted because I wanted to try it, but now the resolution thing bugs me.
0 1 year, 1 week ago



Commenting Guidelines

Sign In to Comment

Make Games

  • What is Stencyl?
  • Roadmap
  • Pricing

Play

  • Arcade
  • Showcase

Community

  • Forums
  • Chat
  • Translations

Help

  • Stencylpedia
  • Stencyl TV

About Us

  • Blog
  • Contact Us
  • Press
  • Privacy
Follow Stencyl on Twitter



© 2013 Stencyl, LLC.