游戏邦在:
杂志专栏:
gamerboom.com订阅到鲜果订阅到抓虾google reader订阅到有道订阅到QQ邮箱订阅到帮看

供iOS游戏开发新手参考的5项技巧

作者:Tyler

本文提及的某些技巧仅适用于iOS开发过程。我们本可以简单地照搬所有的内容,但是我们想要将其进一步改善。首先,我们查看了其他资源,包括CoreJ2Me和ManiacDev。随后,我们找出最频繁出现的问题以及最有帮助的技巧,并将其精选为供iOS游戏开发新手使用的5大技巧。

iOS development(from blog.betable)

iOS development(from blog.betable)

1、根据手机的处理能力创建游戏

游戏运行可用的内存量通常比苹果宣传的256M处理能力要少得多。原因在于,手机的必要后台运行需要耗费一定的内存,而不必要的多任务进程使得情况变得愈发严峻。这也引向了第2个技巧。

2、关闭多任务处理

虽然许多应用不需要使用多任务处理功能,但大多数产品仍然在iOS上使用了这种方法。这种做法或许可以让用户很方便地跳转回游戏,但是它往往也会导致用户手机运行速度变慢,而且让开发过程更为复杂。幸运的是,关闭多任务处理功能是件很简单的事情:只需要打开info.plist文件,添加UIApplicationExitsOnSuspend或选择应用程序不在后台运行,然后将新值设置为YES或勾选方框即可。这样做应当不会影响游戏的用户体验,除非你的游戏需要很长的加载时间,而这个问题也就引出了下个技巧。

3、优化游戏使之快速启动

在你开发游戏时,要尽量削减所有不必要的内容。这意味着需要优化图片和精灵,在恰当的地方使用rgb4444纹理,并且使用Ogg-Vorbis音频编码格式。所有这些可优化的方面都能够最小化游戏下载和加载时间。

4、慎重混合

如果你能够避免,尽量不要混合使用Objective C和C++。但是,如果你确实同时使用了这两种语言,那么就要标注其分类和互动的位置。多种编程语言混合使用是件很棘手的事情,尤其是针对首次开发游戏的新手,所以可以适当做笔记或者给代码标色。

5、耐心等待应用商店审核

提交到应用商店需要很长的时间,而且它不会回复你事情的进展情况。要耐心,你的应用必须经过多次审核。确保你输入了正确的银行账户等信息,因为有些信息在提交之后便无法更改。

游戏邦注:本文发稿于2011年8月16日,所涉时间、事件和数据均以此为准。(本文为游戏邦/gamerboom.com编译,拒绝任何不保留版权的转载,如需转载请联系:游戏邦

5 Tips for Beginner iOS Game Developers

Tyler

At Betable, we are interested in helping game developers, so when we stumbled across this great writeup of iOS development tips by HungryHelga today, we wanted to share it with you all. There’s some great nuggets in that post that you could only get by dealing with the iOS development process. We could have just posted it, but we wanted to take it one step further to improve upon. First, we checked some other sources, including CoreJ2Me and ManiacDev, and then figured out which problems came up most often and which tips were the most helpful. Then we boiled down the result into the top 5 tips for beginner iOS game developers. Enjoy!

1. Build well within the phones processing limits

The amount of memory available for your game to run on is usually much less than the 256MB processing power touted in Apple’s marketing. This is due to the phone’s necessary background operations and has been made worse by apps that use multitasking unnecessarily. Which leads to our next tip..

2. Turn off multitasking.

While many apps don’t need multitasking, the majority of them still have it enabled on iOS. It might be convenient for a user to be able to jump back into your game, but often times slows down the user’s phone and can complicate the development process. Luckily, turning off multitasking is pretty easy: just open the info.plist file, add the key UIApplicationExitsOnSuspend or select Application does not run in background, and then set the new key to YES or fill in the checkbox. This shouldn’t dramatically harm the user experience of your game unless your game takes forever to load, which segways nicely into our next tip..

3. Optimize for quick game launch

As you build your game, try to trim fat whereever possible. This means tightly cropping your images and sprites, using rgb4444 textures when appropriate (HungryHelga notes that it’s great for detailed textures but awful for smooth gradients), and using the Ogg-Vorbis audio encoding format. All of these are small corners to cut that can minimize your download size and load time.

4. Mix with caution

If you can avoid it, don’t mix Objective C and C++, but if you use both then make note of which is which and where they interact. Mixing code languages is a bit tricky, especially for first-time developers, so take good notes and maybe even color-code your code. Also, you can get a crash in the Objective C memory cleanup from your mistakes in C++ memory allocation and de-allocation, so if that happens don’t necessarily go hunting for Objective C mistakes.

5. Be thorough and patient when submitting to the Apple Store

Submitting to the Apple Store takes a long time, and it doesn’t give you much indication of what’s going on. Be patient: your app has to go through multiple approval processes and these can take several minutes after you click Submit. Also, be sure that all of the data that you are entering as far as your bank account, your information and your app are all accurate the first time, because some of these things are impossible to change once they’ve been submitted.

We hope that helps, and definitely check the sites linked above for more iOS developer resources. If you enjoyed this article, you can subscribe to our blog, where we will be posting helpful game development tips every week. (Source: Betable Game Monetization)


上一篇:

下一篇: