标签: 资讯频道 平台差异 挑战 跨平台移植游戏 | 发表时间:2012-02-09 18:13 | 作者:fanbinzhen

作者:Amos Laber





手机平台之间也是如此。iOS是目前最大的市场,Android和Windows Phone市场也有发展潜力。在同时考虑多个手机平台时,总要选择一个侧重平台,其他平台作为辅助。


植物大战僵尸(from gamasutra)

植物大战僵尸(from gamasutra)





















Jumping from web to mobile: Challenges of cross-platform game development

Amos Laber

For an indie developer working on game projects in the casual/social or mobile space, one of the earliest decisions to make is what platform to target. In most cases it’s a no-brainer, since the team or studio already gained experience developing a game for platform X, but then there is always the question of branching out to more platforms.

Mobile, web, or both?

In choosing the primary target platform for a casual 2D game, the typical dilemma is choosing between mobile and web – or to be more specific: Facebook or iOS. Both platforms offer access to hundreds of millions of users with solid support for micro transactions and social features, which in turn translate to a huge potential market.

Traditionally there are differences in genres that are successful on each of the platforms, but they are quickly shrinking, and the differences become mostly technical.

The same goes for other mobile platforms. iOS is currently the biggest market, with Android and Windows Phone (XNA) being just as good as potential targets. Whenever multiple mobile platforms are considered, one should always be the first, with the assumption that the rest of the mobile platforms will follow.

Real life examples of games that jumped from/to mobile and web are Plants vs. Zombies (ported to Flash from C++ and later to iOS) and Angry Birds, which jumped from iOS to almost any other mobile platform, available now as a Flash game, and is soon to be released on Facebook.

Both of these games, however, where successful enough to allow the developer fund the extra resources for porting – something that most indie developers don’t have.

The problem with porting

Porting an existing game from one platform to another can be a tedious and lengthy task. As opposed to the AAA game space, where often cross platform engines are used that enable a single code base to build for multiple platforms, in casual and mobile games, porting often means a complete rewrite of the game.

The prospect of stretching the budget and timeline of a game project in order to accommodate porting is forcing indie developers to limit the game to a single platform, since they rather spend that effort on making the game better.

Business dictates going for the better or bigger market, and usually by the time the game ships, the resources for porting are simply not available. This is the reason we see mobile developers limiting their games to a single platform.

In the best case, if the game gained success and popularity, it could take between six months to a year to release it on a different platform, but in most cases its simply not cost effective.

Being a coder, I’d like to focus on the technical aspect. With careful design and mindful planning, it is possible to provide the ability to budget for two or more platforms for the cost of one. Well, OK, not really for the same cost but with minimal overhead.

Can one size fit all?

A possible approach when planning building a new game code, is to plan ahead for the code and assets to be easily portable. In theory, it should not be a problem – good architecture does not rely on platform specific features, and modular design can be used to decouple the main game modules from platform specific components.

In practice, however, many challenges arise. There are differences in hardware (between different mobile devices and between web and mobile), in operating system capabilities, and finally in tools and programming languages – since every platform has a different language that is used to write native apps.

Some of these differences can be bridged by careful planning and using cross compilers. Tools like Unity3D or Corona will compile for different platforms, but that comes with a price – the developer is limited to whatever the tool supports, and it does not offer the flexibility of native code. For some cases these are a good fit, but I find them to be very restrictive.

As the saying goes: one-size-fits-all never fits. In short, the risk remains that we end up with lowest common denominator product that may not be fully optimized for any of the specific platforms.

Start with just one

Ideally we would want to be able to code for each platform using its native tools and libraries in order to give us flexibility. It is important to choose tools that you (or your team) are familiar with, and fits our coding style and architecture.

The choice of technologies, although subjective, is based on a set of key requirements that I identified as important for smooth development. These are:

Use common asset types (i.e. bitmaps, sprite sheets, etc)

Provide strong tooling for art and design

Strongly typed object-oriented language with decent debugging tools

Proven framework as a foundation, that can provide solid core features

In this case: Facebook – Flash / AS3, iOS – Cocos2D / Objective-C. One would have to come first and serve as the primary platform, while the secondary will adjust later. Right from the start we take advantage of the similarities between AS3 and Objective-C, so jumping between them will be easier.

Next time, on part 2, I will lay out a plan for a code framework that aims to offer a solution for the problem of portability across web and mobile platforms. ( Source: Gamasutra)

相关 [独立 开发 跨平台] 推荐:


- - GamerBoom.com 游戏邦
对于在休闲、社交或手机领域里从事游戏项目制作的独立开发商而言,最先需要确定的是目标平台. 多数情况下这都不是个问题,因为团队或工作室会根据已经拥有的游戏开发经验来决定目标平台,但团队向其他平台扩张时总是会面临诸多问题. 在选择休闲2D游戏的主要目标平台时,通常会纠结于手机和网页这两个选择,更具体地说,就是选择Facebook还是iOS.

跨平台开发工具Qt SDK 1.1.3发布

- tinda - Solidot
chinakr 写道 "Nokia于本月1日发布了Qt SDK 1.1.3,更新内容包括功能改进和软件质量提升. Qt SDK 1.1.3下载链接:Windows版,Linux版(32位),Linux版(64位)和Mac OS X版.


- - InfoQ cn
Moscrif是构建在定制虚拟机上的跨平台移动开发环境. 尽管该平台提供了访问原生设备的功能,但编程语言却是JavaScript的一个定制版本. 据公司联合创始人Michal Habalcik所说,Moscrif已支持iOS、Android、Symbian、Windows Mobile和Bada等平台,而且还将在微软发布API之后,添加对Windows Phone 8的支持.


- - IT技术博客大学习
iMAG是一个非常简洁高效的移动跨平台开发框架,开发一次可以同时兼容Android和iOS平台,有点儿Web开发基础就能很快上手. 当前移动端跨平台开发的框架有很多,但用iMAG还有一个好处,就是用iMAG开发出的App是原生的. iMAG采用XML + JavaScript(配置 + 脚本)的开发方式,它的原理是将符合iMAG开发规范的XML文件解释成对应的原生应用代码来执行.


- - FEX 百度 Web 前端研发部
最近出现的 React Native 再次让跨平台移动端开发这个话题火起来了,曾经大家以为在手机上可以像桌面那样通过 Web 技术来实现跨平台开发,却大多因为性能或功能问题而放弃,不得不针对不同平台开发多个版本. 但这并没有阻止人们对跨平台开发技术的探索,毕竟谁不想降低开发成本,一次编写就处处运行呢.

使用 Vagrant 打造跨平台开发环境

- - Linux - 操作系统 - ITeye博客
参考地址1: http://segmentfault.com/blog/fenbox/1190000000264347. 参考地址2: http://blog.phpor.me/2014/10/12/vagrant-%E6%9C%AC%E5%9C%B0%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83.html.


- - CSDN博客推荐文章
内心强大才敢于承认错误,但是首先你要敢于去试错. 现在做客户端开发的公司都会面临一个巨大的问题,那么就是跨平台. 对于目前上市面上的移动设备来说. Android、IOS、WindowsPhone、BlackBattery等等移动设备系统,让我们在开发适配上都很头痛. 但是由于Google与Apple公司的竞争,现在创业公司主要关注的就只有是Android和IOS应用程序了.


- - IT瘾-dev
  跨平台一直是老生常谈的话题,cordova、ionic、react-native、weex、kotlin-native、flutter等跨平台框架的百花齐放,颇有一股推倒原生开发者的势头. (事实上更多是共存发展)看完本篇,相信你会对于当下跨平台移动开发的现状、实现原理、框架的选择等有更深入的理解.


- - SegmentFault 最新的文章
一直以来,效率都是互联网企业的生命线. 而 “通过技术升级实现三个人干五个人的活,赚四个人的工资”是企业和个人一直渴望达到的双赢局面. 随着行业竞争加剧,为进一步提升开发效率,跨平台开发逐渐的成为了互联网行业的刚需. 这样的大趋势下,一些头部互联网公司基于自身技术背景和当时技术条件,推出了不同类型的跨平台解决方案.


- - SegmentFault 最新的文章
虽然B/S是目前开发的主流,但是C/S仍然有很大的市场需求. 受限于浏览器的沙盒限制,网页应用无法满足某些场景下的使用需求,而桌面应用可以读写本地文件、调用更多系统资源,再加上Web开发的低成本、高效率的优势,这种跨平台方式越来越受到开发者的喜爱. Electron是一个基于Chromium和 Node.js,使用 HTML、CSS和JavaScript来构建跨平台应用的跨平台开发框架,兼容 Mac、Windows 和 Linux.