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.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值