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

HTML5平台的发展是福还是祸?

发布时间:2013-02-22 17:36:37 Tags:,,,,

作者:Craig Chapple

虽然最初被誉为浏览器游戏的未来以及打破Flash垄断世界的武器,但是HTML5也遭遇了各种批评,包括很难进行代码编写以及拥有一连串破碎的功能。

HTML5的代码平台(HTML规范的第五次迭代)本应该是开发商们面向各种平台和浏览器创造并推出游戏的一站式服务,但是发展却未像想象中那般一帆风顺。

新平台除了包含全新的HTML标记语言,同时还整合了其它功能和API,如CSS3,SVG以及JavaScript,如此我们便能将一些新功能嵌入现代浏览器中,如视频和音频,而用户也无需安装各种插件便能使用这些功能。

尽管这在某种程度上也发挥着作用,并且像微软,苹果,谷歌和摩斯拉等W3C联盟下的公司也共同创造了一个开放标准,但是该平台所存在的问题仍然不容忽视。

html5(from networkingstar)

html5(from networkingstar)

功能缺陷

也许当前HTML5所面临的最大问题是音频的执行,许多开发者都表示遭遇过音频崩溃的情况。Remode Studios的技术总监Chris Herbert表示,音频仍然在给该平台功能拖后腿,频繁出现像滞后和文件格式不符等问题,不过他也相信在未来这些问题定能得到最大改善。

他说道:“HTML5中的确有些领域需要改善,而音频则是最落后的一大块,特别是在手机浏览器方面。”

“问题主要是关于声音数据是如何从声道中置换出来,许多浏览器都会出现滞后或跳转现象。”

“同时,音频文件的格式支持也总是很不一致,有些浏览器支持ogg vorbis,也有些浏览器(如Safari)支持MP3格式。”

“这些问题显示出了这一技术仍处于发展初期,但是从其潜能来看,我相信HTML5将比之前的HTML更快速地成熟起来。”

YoYo Games的首席执行官Sandy Duncan(负责2D引擎Game Maker)也同意音频是HTML5的薄弱之处,但是他也认为基于HTML5的跨平台属性,这一问题最终定能得到改善。

他说道:“的确存在音频缺陷。”

“浏览器行家知道这一点,并且也致力于解决这一问题,但是因为不同平台使用的是不同的核心浏览器,所以他们需要进行全面检查以确保这一问题不会影响到其它功能,并逐步做出改变。”

“全新的WebAudio API将能派上用场;它提供了非常灵活的音频系统并且摆脱了音频标签的负担。”

但是跨平台工具SGX Engine的创造者Steven Goodwin表示,解决问题本身也存在着问题。他认为解决方法中可能会出现分歧,而这与HTML5最初所设定的属性是相矛盾的。

Goodwin说道:“谷歌和摩斯拉都创造了这一问题的解决方法,但却是基于不同方式。”

“这与过去几年困扰网页平台的问题一样。虽然中间件是一个很好的临时解决方法——SGX本身使用的是jPlayer程序库,如此便退回到Flash平台上,但是真正有效的解决方法是W3C与应用和浏览器开发者们共同创造一个所有人都能够遵循的良好标准。”

调试噩梦

在音频问题出现的同时,其程序设计也开始备受争议了。尽管许多开发者不习惯基于JavaScript语言编写代码,但也有一些开发者找到了变通方法和适当的工具能够帮助自己克服像跨浏览器兼容性以及JavaScript调试等问题。

Goodwin说道,基于这一语言开发应用就好似做着“调试噩梦”,在运行过程中仍保留着失误而不是在编译阶段便扼杀掉,使得游戏创造过程显得更加紧张。

他认为JavaScript因为这些问题已经烙上了一些坏名声了。

他解释道:“如果你使用的是像C++等语言,你便更有可能保持理智。”

“作为一种语言,JavaScript是非常优秀的,但是因为开发者总是使用这一语言与一些糟糕的浏览器进行互动,从而为它惹来了一些坏名声。”

就这一点,Herbert站出来维护HTML5,并表示这并不是一种难以编程的语言,相反地,JavaScript拥有许多完美的功能能够帮助开发者创造优秀的浏览器游戏,而开发者只需要习惯于这种语言便可。

Herbert说道:“HTML5并不是一个难以编程的平台,这是一个快速建造原型的完美环境。”

“对于那些习惯于C#或Java的开发者来说,JavaScript的OPP可能会比较古怪,不只是因为第一眼的语法较为陌生,同时这里也不存在有关‘类’的明显定义。”

“尽管任何OOP设计模式将转化为JavaScript,但是开发者仍需要花些时间去适应这种改变。”

尽管在未来这些技术问题将得到解决(游戏邦注:许多公司都在研究最佳解决方法),但是HTML5在不远的未来将迎来另一个大问题,即用户基础的规模。

吸引用户

尽管这一平台已经吸引了数亿用户的注意(根据报道其用户超过了8亿),但是它的最大竞争对手Flash已经拥有了超过20亿的用户,并获得了当前大多数浏览器的支持,但现今却只有40%的浏览器支持HTML5。

面对如此强大的竞争对手,特别是自身还带有种种初期问题,HTML5真的很难超越Flash,但是不管怎样,这一技术仍属于开发阶段。

社交游戏巨头Spil Games的首席执行官Peter Driessen说道:“随着越来越多浏览器适应了HTML5的规格,其用户数也将不断增加,而我们也仍然在等待更多用户去升级他们的浏览器。”

“HTML5并不适合于过时的浏览器,但是现在仍有许多人在自己的计算机或手机上使用这些浏览器。”

不过Duncan相信这一问题不可能长期威胁这一平台,因为许多新浏览器已经甩开Flash而整合了HTML5,苹果和微软也分别在iOS和Windows 8中选择抛弃Flash。

他断言:“伴随着Chrome,Firefox,Opera以及现在的IE上的自动升级功能,我认为用户将自然地被引进这一新世界中,不管他们是否愿意。”

“说实话,早前的浏览器不仅速度较慢,有时候还会出现各种漏洞,并具有一定的安全隐患,所以自动升级功能才是最佳选择。”

“这对于开发者们具有很大的吸引力,因为‘大多数’用户将会在意自己的游戏运行方式是否是最新的,如果不是他们便会去下载新浏览器。”

Scirra的网页开发者Tom Gullen也表示同意,他认为随着该平台的不断发展,用户最终一定能够接受它,所以开发者们都不要对此感到畏惧。

Gullen继续说道:“显然,HTML5是网页平台的下一个快速发展领域。”

“只要HTML5继续发展,浏览器也继续支持这一新技术,其用户基础也将会不断提高,并最终超越Flash。”

Ludei(创造了CocoonJS)的首席技术官Ibon Tolosana认为,如果开发者现在接纳了这一技术,那么当HTML5变成网页开发的标准时他们便能大获其利。

他同时也说道,尽管人们对JavaScript存在着各种争议,但它却也成为了开发者们最常使用的开发语言之一。

发展潜力

他说道:“应对即将到来的改变是开发者逐渐在自己的项目中采用这一技术的重要原因。”

“最近,JavaScript已经成为了GitHub(游戏邦注:一个用于使用Git版本控制系统项目的共享虚拟主机服务)中最受欢迎的开发语言,甚至超越了Python和Java。HTML5是开发项目的很好选择,开发者们不应该忽视它。”

“开发者们需要先理解HTML5所提供的功能与结果,然后决定哪种技术才是最佳选择。”

“基于用户基础,我们相信用户对于HTML5的接纳只是时间的问题,其最终用户将会达到Flash现在的水平。”

不管用户最终是自愿还是被迫接受这一技术,我们都不能忽视HTML5所具有的各种优势。

Driessen认为,无需辗转于各种平台进行开发便意味着能够大大节省成本。

他说道:“比起面向不同手机平台而修改游戏,HTML5能够帮助开发者们节省下大量的时间与金钱。”

“多亏了HTML5的开放标准,开发者只需要开发一次游戏便可,并且基于支持HTML5的浏览器,他们能够在所有设备中轻松地开发游戏,如PC,iPad,iPhone以及Android手机。”

产业标准

他还补充道,除了能让开发者在各种设备上创造游戏,它还让用户可以随时玩游戏,而省掉各种安装麻烦。

Remode Studio的创意总监Martin Darby也同意无需安装任何插件在浏览器上运行一款游戏是HTML5所提供的巨大福利,甚至让开发者们可以绕开苹果的应用商店和审批过程。

“很明显,苹果不愿再支持Flash,而微软也紧随其后在其Windows 8设备上整合了HTML5。”

Darby说道:“因为这不属于WC3的职权范围,所以一些主要的平台提供者很难予以支持。”

“结果便是任何运行于开放网页上的内容都能让你避开应用商店以及苹果的审批过程。”

Goodwin认为HTML5的另一个优势是能够利用大量的工具,如它自身的SGX引擎,帮助开发者更轻松地开发游戏。他也表示这种优势将继续发展。

他说道:“HTML5的主要优势是让开发者可以使用大量开发工具,并且通常情况下这些工具都是免费的。”

“Chrome和Firefox都拥有很棒的调试器,并提供最重要的IDE功能,如Flex Builder。如此便大大缩短了开发者执行改变的周转时间,让他们能够拥有足够时间快速建造原型并保持游戏的平衡。”

“除此之外,因为JavaScript已经出现一段时间了,所以有很多人才已经习惯于这种语言的各种问题,并找到了最佳解决方法,能够处理服务指向游戏中所必要的客户端与服务器间的交流。”

尽管从表面看来Adobe忠实于Flash,至少从某种程度上来看是这样的,但是现在他们也开始加入HTML5趋势,创造各种工具去帮助开发者利用这一技术的性能。

Adobe的集体产品经理Deepa Subramaniam说道,开发者最终还是应该选择最适合自己,并且满足自身需求的平台。

她说道:“HTML的各种性能,包括图像,音频/视频,数据管理以及应用开发等都将不断完善,但是为了覆盖所有著名的浏览器和平台则需要花一定的时间。”

“开发者们必须分析内容的种种需求,并基于这些需求去创造并选择最适当的技术。”

未来

尽管HTML5面对着种种批评,并带有音频缺陷等问题,但是开发者们仍非常热衷于支持这一平台,并愿意看着它不断向前发展,希望创造一种单一规范让自己能够轻松地将游戏推向各种设备。

Gullen相信这种希望很快便会实现,不需要几年时间HTML5便会成为所有现代媒体设备上最受欢迎的平台。

他说道:“我相信在5年之内,也许只需要1,2年,HTML5将成为浏览器游戏的标准平台。”

“Flahs已经是过时的专利技术。它曾经拥有鼎盛时期,但却不是现在。Adobe便是把握住了这一事实才慢慢转向HTML5。”

“我预计在5年之内,所有现代媒体设备都将能够支持HTML5。这是一种让人兴奋的技术,并具有最广阔的发展前景。”

不管开发者是否喜欢,HTML5的发展是必然的。所以他们必须接纳这一技术,即使这意味着在HTML5潜能最终爆发出来前他们需要经历各种考验。

本文为游戏邦/gamerboom.com编译,拒绝任何不保留版权的转载,如需转载请联系:游戏邦

HTML5: A blessing or a curse?

by Craig Chapple

Initially heralded as the future of browser gaming and the next step beyond the monopolised world of Flash, HTML5 has since faced criticism for being tough to code with and possessing a string of broken features.

The coding platform, the fifth iteration of the HTML standard, was supposed to be a one stop shop for developers looking to create and distribute their game to a multitude of platforms and browsers, but things haven’t been plain sailing.

Not just including the new HTML mark-up language, but also incorporating other features and APIs such as CSS3, SVG and JavaScript, the platform was supposed to allow for the easy insertion of features for the modern browser such as video and audio, and provide them without the need for users to install numerous plug-ins.

And whilst this has worked to a certain degree, and a number of companies such as Microsoft, Apple, Google and Mozilla under the W3C have collaborated to bring together a single open standard, the problems it possesses cannot be ignored.

Breaking up

Perhaps the biggest issue currently plaguing HTML5 is its audio implementation, which many developers claim is broken. Chris Herbert, technical lead of Remode Studios, says that audio is considerably behind the rest of the platform’s features, with problems such as lag and file support, although he believes there could be vast improvements in this area in the future.

“There are clearly areas of HTML5 that need some work, audio being an area that’s lagging behind quite dramatically, particularly in mobile browsers,” he says.

“The problems mainly relate to how sound data is swapped out of sound channels, many browsers are experiencing a lag, or in some cases jumps or pops.

“Also, the support for audio file formats is inconsistent, with some browsers favouring the ogg vorbis format whilst others – such as Safari – favour the MP3 format.

“Issues such as these highlight that this is a technology in its infancy, but given its potential as a fully featured platform in its own right, I believe that we will see HTML5 find maturity much quicker than previous incarnations of HTML.”

Sandy Duncan, CEO of YoYo Games, responsible for 2D-focused engine Game Maker, agrees that audio is broken and says that this is an issue that is being worked on, but due to the cross-platform nature of HTML5, will take time to be approved.

“As to audio being broken, yes it is a little,” he says.

“The browser guys know this, and are working hard to fix it, but with much of the core browser being used on many platforms, it has to be verified and checked a lot to make sure it won’t just kill something and that makes some changes a little slow to come through.

“The new WebAudio API will help though; it gives a very flexible audio system without the old baggage the audio tag brings.”

But the need to fix the issue is presenting its own problems, says Steven Goodwin, creator of cross-platform tool SGX Engine. He believes it has the potential to create a divergence in solutions, which seems against the nature of why HTML5 was developed in the first place.

“Both Google and Mozilla are building solutions to the problem, but in different ways,” says Goodwin.

“This is creating the same problems in divergence that plagued the web in years gone by. While middleware is a good interim solution – SGX itself uses the jPlayer library, which falls back to Flash – the real solution is for the W3C to work with app and browser developers to create a good standard that everyone can follow.”

A debugging nightmare

Whilst the issue of audio problems appears unanimously negative, issues with its programming are up for debate. Despite many devs being uncomfortable with coding in JavaScript, others have found workarounds and suitable tools to help with overcoming problems such as cross-browser compatibility and JavaScript debugging.

Goodwin says that developing in this language can be a “debugging nightmare”, as errors are allowed to sail through to run-time instead of being caught at the compile period, making creating games at times a torrid process.

But he believes that JavaScript has an unfortunate reputation because of these issues.

“If you write with the same diligence you would if it were C++, you will stand a better chance of keeping your sanity,” he explains.

“JavaScript, as a language, is very capable, it’s just unfortunate that it has a bad reputation because it was always used to interact with different – incompatible – browsers.”

Herbert goes as far as to defend HTML5 in this area, and says he does not feel it is difficult to program with, but on the contrary, JavaScript has many ideal features suited for creating browser games and that developers just need to become more accustomed to coding with the language.

“I certainly wouldn’t agree that HTML5 is difficult to program with, it’s an ideal environment for the sort of rapid prototyping,” says Herbert.

“OOP in JavaScript can be a little weird for developers used to C# or Java, not least because the syntax at first glance would be very forgiving but there’s no apparent and solid definition for what a ‘class’ is in JavaScript.

“Although any OOP design pattern will translate into JavaScript, it does take a little getting used to.”

Whilst these technical issues can be overcome in the near future as a plethora of companies search for the best standard solutions, another of the biggest obstacles HTML5 faces in the near future is the size of its userbase.

Attracting users

Whilst it is undoubtedly open to hundreds of millions of people – reportedly more than 800 million – its biggest rival Flash has a userbase of more than two billion, and it is supported by most current browsers, compared to just 40 per cent that support HTML5.

With Flash being so readily available and used by most potential customers, it has been hard for HTML5 to break through, particularly on the back of its early teething problems, and the fact that it is still under development.

“HTML5 use has definitely been picking up, with browsers rapidly adopting HTML5 specifications, but we’re waiting for consumers to update their browsers,” says Peter Driessen, CEO of social gaming giant Spil Games.

“HTML5 isn’t ideal for out-of-date browsers, which a sizeable chunk of the population still uses on its computers and mobile devices.”

But Duncan believes this won’t be a problem for the platform for long, with many new browsers ditching Flash altogether and integrating HTML5, whilst Apple and Microsoft have forgone the use of Flash on iOS and Windows 8 altogether.

“With the auto-update features of Chrome, Firefox, Opera and now Internet Explorer, I think users will be dragged kicking and screaming into the new world whether they like it or not,” he asserts.

“And to be honest, it’s for the best – old browsers are slow, sometimes bug ridden, and full of security holes, so an auto update is for the best.

“This makes it really attractive to developers though, as they can be assured that ‘most’ users who care about running things like games will probably be up-to-date, and if not, be willing to go and download a new browser to get there.”

Scirra’s web developer Tom Gullen agrees, saying that as long as progress is made, users will eventually adopt the platform anyway, so devs shouldn’t be afraid to use it.

“Some are but they shouldn’t be. It’s obvious to us that HTML5 is the next big growth area on the web,” states Gullen.

“As long as HTML5 keeps progressing as it is and browsers keep working to support it as well as possible, the userbase will keep on growing and eventually surpass Flash.”

Ibon Tolosana, CTO of CocoonJS creator Ludei, says that HTML5’s potential to dominate as the web development standard is a key benefit of adopting it now, rather than get caught out and left behind once it becomes the norm.

He also says that despite the criticisms aimed at JavaScript, it has become one of the most common development languages in use.

Untapped potential

“Being prepared for the imminent change is an important reason for developers to start adopting the technology gradually in their projects,” he says.

“Recently, JavaScript has become the most popular development language on GitHub, surpassing Python and Java. HTML5 can be a great option to develop some projects in and developers should not overlook it.

“The first step is to understand the features and results that HTML5 has to offer and then decide which technology is the best option.

“In terms of user base, we believe that HTML5 adoption is inevitable and will be only a matter of time when its userbase will be as big as where Flash is now.”

As well as its inevitable adoption by the masses, whether welcomed or forced upon them, there are still many benefits from using HTML5 that are often looked over in the face of its more serious problems.

Driessen believes that not having to take on as much work developing for various different platforms means that the cost effectiveness of using it outweights its issues.

“Browser-based gaming, and thus HTML5, saves developers time and money which they otherwise lose when having to modify games for different mobile platforms,” he says.

“Thanks to HTML5’s open standard, devs only have to develop a game once, and it can be easily deployed on all devices with browsers supporting HTML5 such as PCs, iPads, iPhones and Google phones.”

An industry standard

He adds that as well as making games available on multiple devices, it allows users to instantly play their games, rather than have to deal with installation hassles and the delays in having to download them from app stores.

Remode Studio’s creative director, Martin Darby, agrees that the ability to run a game in a browser without plug-ins is a huge boon for HTML5, and even allows developers to bypass Apple’s own store and its approval processes.

“Clearly Apple’s reluctance to support Flash and now Microsoft following suit with its Windows 8 devices is giving HTML5 a lot of momentum at the moment.

“Because it falls under the remit of the WC3 it will be a lot more difficult for major platform providers to drop support for it,” says Darby.

“The upshot of this is that anything running on the open web effectively allows you to side-step the app store and all of Apple’s terms and approval processes that go with it.”

Goodwin believes that another of HTML5’s benefits is being able to make use of a wider range of tools, such as his own SGX Engine, than was available under Flash, helping make development easier. This, he says, is something that will only continue to improve.

“The main benefit is being able to use a wider range of development tools. And they’re usually free,” he says.

“Both Chrome and Firefox have good debuggers, and provide the most important functionality of IDEs such as Flex builder. Consequently, the turnaround time from implementing a change, to testing it live, are very short making it ideal for rapid prototypes, and game balancing.

“Also, because JavaScript has been around for ages, there’s a large talent pool available who are used to the problems – and solutions – of the language, and can handle the client-server communications necessary in service-oriented games.”

And, despite the company’s obvious allegiance to the use of Flash, at least in part, Adobe has also begun to join the HTML5 trend, creating tools to help developers leverage its capabilities.

Adobe group product manager Deepa Subramaniam says, though, that developers should ultimately choose the platform that is right for them, and that matches their needs.

“HTML capabilities around graphics, audio/video, data management and application-development, will improve in time – but it does take longer for consistent implementation to be reached across popular browsers and platforms,” she says.

“It’s important for developers to analyse the requirements of the content they are aiming to build and choose the appropriate technology based on those needs.”

The future

It seems that despite all of the criticisms HTML5 faces, and its big issues with problematic features such as audio integration, developers are keen to keep on supporting the platform and see it through to the end, in the hope of creating a single standard that can allow their games to be deployed across multiple devices with ease.

Gullen believes that this will happen sooner rather than later, and it could take just a couple of years to become the most popular platform integrated into modern media devices.

“I do believe, however, that in less than five years – maybe only one or two – HTML5 will be the standard for browser games and yes, this will be a good thing,” he states.

“Flash is very old proprietary technology. It’s had its moment and now it’s time to move over. Adobe knows this as well and is shuffling over to HTML5.

“Within five years I expect and hope that just about every modern media device will support HTML5 in some capacity. It’s an exciting technology with an exciting future ahead of it.”

It seems then, whether developers like it or not, HTML5 is here to stay. So they’ll have to adapt, even if that means they are dragged kicking and screaming all the way through until its potential is fully realised.(source:develop-online)


上一篇:

下一篇: