论坛首页 Web前端技术论坛

HTML5 WebGame开源工具之impactjs

浏览 11405 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
作者 正文
   发表时间:2012-08-28   最后修改:2012-08-28

 

     随着浏览器(PC/Mobile)功能的不断增强,特别是近几年来HTML5系列技术,CSS3及JS引擎的快速发展,使用传统的Web前端开发技术来开发网页已经成为了一个新的趋势。就我个人个遇到的几个框架及近期别人推荐的进行一些分析。主要针对使用HTML+CSS+JavaScript技术来开发游戏的技术做一分类,其它第三方语言实现的中间件平台只在最后简要介绍。

          HTML Web Games的游戏开发,目前主要有以下三类方式:

  • 纯DOM+CSS的传统方式实现游戏
  • Canvas/WebGL & CSS3 实现游戏
  • SVG方式开发游戏

当然,介于这三类之间的混合方式也有人已经在尝试,类似于目前比较火的Hybird Native Web App的理念,毕竟,只要能快速,高效解决问题的技术才是好技术。

        由于HTML5技术这两年的迅速普及,大多数入门的游戏开发入门者,主要接受的是使用Canvas技术来开发游戏。但对于使用纯DOM+CSS的传统技术组合开发游戏与Canvas开发游戏二者性能上的比较,很多资深开发者们,不停地做着性能测试,来支持自己的观点。主要是基于以下考虑:canvas提供的API太基础了,游戏开发者如果使用canvas,就意味着放弃了CSS这个浏览器“亲生的”样式工具。于是接着就涌现出了很多基于canvas的库,来辅助开发者快速开发游戏。但这些canvas库的封装性能来渲染图像的性能与使用DOM+CSS进行图片渲染的性能的PK目前还未有定论。就个人的测试,小游戏开发方面性能差别可以忽略。前端界有一个大拿做了一个js动画库,基于同一套代码生成基于canvas,webgl,css 各自渲染的效果,很不错(http://labs.hyperandroid.com/static/caat/)。

       下面对于目前比较流行的一些游戏工具库进行介绍。

      ImpactJS是目前最强大的一个js 2D游戏开发平台,当然是商业版的(http://impactjs.com),(国内有一个不要脸的人做了一个盗版http://www.kilofox.net/, 真TMD的不要脸呀)。不管是新手还是资深的开发者,使用这个库都可以快速开发出来游戏。作者很nice,半年前我以研究者的身份买了一份进行了测试,基本上照着示例不到十分钟就做出来了一个带简单AI的小游戏.

 

    从平台本身的角度,这款框架有以下特性:

  • 良好的跨平台性,目前作者发布了测试版的iOSImpact,通过 OpenGL 直接将JavaScript 源代码的执行结果渲染到屏幕上。这完全跳过了 iPhone 的手机 Safari,避免了这个浏览器固有的一些问题。iOSImpact完成之后,期待AndroidImpact出来,哈哈。
  • 目前市面上最好的Web版2D关卡编辑器Weltmeister,快速地可以对游戏进行界地图编辑
  • 强大的游戏调试菜单,很像我们调试JS时使用的firebug, 快速地看到每一个游戏实体的更新,渲染FPS等。
  • 作者的更新很迅速,可以在github上查看到他非常勤奋地在推进这个框架,论坛中的开发者们也很活跃。目前有一个专门收集使用impactjs的游戏网站http://www.pointofimpactjs.com/
  • 第三方工具的支持,如与Appmobi这家强大的移动游戏开放平台商的合作。Appmobi提供了专门的impactjs版的SDK供开发者开发游戏。与打包工具phonegap等的结合,与著名物理引擎Box2D的结合等。

 

查看ImpactJS本身的代码架构,可以看到,它包括了制作一款游戏的各个方面:

  • 核心的模块定义,动态加载,扩展了原生JS的类似于underscore.js的工具类库,系统整体FPS控制等,资源预加载。
  • 逻辑处理 包括游戏场景控制器,活动对象控制,多层地图控制,计时器及输入检测
  • 声音资源的处理(前景声音,背景声音),在HTML5相关的浏览器厂商还在为标准争论的时候,这是我目前已知的解决声音播放的比较好的一款JS游戏库
  • 特效处理 基本所有的游戏库都会有这方面的处理,不过好像在这块ImpactJS做得还不够好。

四月的时候,Jesse Freeman 出了一本《Introducing HTML5 Game Development》的书,全程引导开发者用 Impact 创建游戏。它涵盖了从建立工作环境到游戏打包发布的所有内容。横向对比而言,ImpactJS算是目前相当不错的一款基于canvas的游戏引擎。

 

   发表时间:2012-08-28  
。。。这个 好像 真不是什么镜像

http://www.techinasia.com/chinese-net-user-steals-game-engine-sells-price-hosts-silent/
0 请登录后投票
   发表时间:2012-08-28  
Recently we’ve been bringing you the saga of Cloudstone, a Western-developed indie game that was totally copied by Chinese “developers” and remains hosted on Tencent’s game platforms. Think that was just an isolated example? Think again.

Meet Impact, a Javascript game engine developed and sold by Dominic Szablewski that helps users make HTML5 games. Now meet Impact’s illegal ‘Chinese version’; an exact copy of Szablewski’s site and product that Szablewski has absolutely nothing to do with. The only differences are that the copied version costs way less, it comes with no after-sales support, and the money it generates is deposited into the bank account of a thief, not the engine’s real developer.


The real Impact site is on the left; the site illegally selling copies of Impact for half price is on the right
Szablewski says he first became aware of that someone in China was copying his website and illegally selling his game engine back in June. He told Tech in Asia:

I first tried to contact [the guy who stole my game engine] directly via email. Asked what he was up to and what it would take to make him stop. Obviously I never received an answer.

A few days later I emailed his hoster [the US-based Softlayer] with the request to suspend his account. Again, never received an answer.

On June 19th I registered an account on kilofox.net [the illegal Chinese copy's domain] to look at the site a bit closer. The response to this was a DOS attack on impactjs.com [the official Impact website] that brought the site down temporarily.

The copied site, kilofox.net, is registered to one Long Yang, and the address listed along with its registration is in Harbin, the capital of China’s Heilongjiang province, although the Kilofox site suggests Long may now live in Beijing. When contacted by Tech in Asia with an request for an interview, Mr. Long responded:

The website [kilofox.net] is mine, but the product is not mine. I don’t think an interview is necessary.

Further attempts by this site to contact Mr. Long have been ignored.

Interestingly, Long’s site is hosted by Softlayer, a US-based hosting company that one would expect to be more responsive to claims of copyright violation. But Szablewski says that Softlayer has not been helpful:

On July 5th I got someone from Softlayer on the phone who told me that they can only respond to DMCA takedown requests. So I prepared a DMCA and sent it via fax to Softlayer. I never heard back and finally gave up on the whole thing.

A Softlayer customer service representative confirmed to Tech in Asia that Softlayer does require a DMCA report to investigate copyright claims, but further requests for comment or clarification on this specific case went ignored by Softlayer. The copied site is still up and is conducting business as usual.

Needless to say, this whole incident has been quite damaging to Szablewski’s business:

The bottom line is: I don’t know how many sales I lost. Prior to all this, I sold about 3-6 licenses per month to Chinese customers. This has gone down to about 2 licenses per month, while sales for all other countries have gone up. With numbers this low, it’s hard to say if it’s a fluke or really a consequence of the Chinese clone.

Since kilofox.net went online, I received numerous emails from Chinese customers who were confused whether the site was legitimate. After I told them it was not, they expressed how disappointed and embarrassed they were that someone from their country stole my product.

It’s a tough situation really. It’s not so much the sales I lose because of this, but the reputation for the game engine. I.e. when someones buys it from the fake site and does not receive the service and updates they would get from me.

That’s all depressing enough, but here’s the reason why this kind of thing should be taken seriously by every single person doing business in China. Szablewski told Tech in Asia:

I had some very happy customers from China and I would love to continue selling it in China, but honestly, stuff like that makes it hard for me to see China as a viable country to do business in.

That attitude is pretty widespread outside China and, as this case and the case of Cloudstone illustrates, it’s not unfounded. Do the majority of people in China’s tech industry pull tricks this dirty and lazy? Of course not. But perhaps more could be done within the community to discourage this kind of copying because it is destroying China’s reputation as a good place for smart people in technology to do business.

It also seems like Softlayer should be taking this more seriously than it apparently is. Perhaps there was some problem with the DMCA report Szablewski submitted, but if that’s the case, Softlayer apparently considers itself above explaining that to us.

This kind of theft should be approached from several directions at once. China’s tech community needs to be more direct and more vocal about its distaste for this sort of behavior. Hosts — whether they’re American, Chinese or anything else — need to take copyright violations seriously and investigate and rectify problems swiftly. Ideally, the thieves would also be brought up of criminal charges or at least forced to provide financial compensation to the people they’ve stolen from. That last one may be more difficult to accomplish given the complex nature of international law, but the first two should be easy. Why aren’t they happening?

0 请登录后投票
   发表时间:2012-08-28  
。。。人家那是商业版,你买个copy就拿出去买,那叫镜像?人家发现之后联系过你们,你们不回复,拒绝回复,还dos攻击人家网站。你们tmd就是耻辱,别tmd往我国IT行业脸上抹黑好么
0 请登录后投票
   发表时间:2012-08-28  
嗯,我开始的时候没有仔细看,那个中文的盗版站点太TMD不要脸了
0 请登录后投票
   发表时间:2012-09-03  
唉,害的我都tmd不好意思说自己是中国程序员。

人肉吧,强烈要求人肉这个贱人。

Domain Name      : kilofox.net
PunnyCode        : kilofox.net
Creation Date    : 2005-12-27 00:00:00
Updated Date     : 2011-11-22 18:08:54
Expiration Date  : 2012-12-27 00:00:00
Registrant:
  Organization   : Long Yang
  Name           : Long Yang
  Address        : Jinhe,Jincheng,Shuangcheng,Heilongjiang,P.R.C.
  City           : haerbinshi
  Province/State : heilongjiangsheng
  Country        : china
  Postal Code    : 150138
Administrative Contact:
  Name           : Long Yang
  Organization   : Long Yang
  Address        : Jinhe,Jincheng,Shuangcheng,Heilongjiang,P.R.C
  City           : haerbinshi
  Province/State : heilongjiangsheng
  Country        : china
  Postal Code    : 150138
  Phone Number   : 86-0451-53248254
  Fax            : 86-0451-53248254
  Email          : kilofox2009@yahoo.com


0 请登录后投票
   发表时间:2012-10-02  
没错,“盗版”是我们做的!
但是,我要澄清如下几点:
1、我们放出的 Impact 的源码,不是你所谓的“盗版”!凡是懂点儿网页知识的,都可以轻松复制下 Impact 的源码。我们所做的,只是整理一下源码,让爱好游戏开发的人员能够更方便地查看。
2、我们当初放出 Impact 的源码,是应圈内几个网友的要求,是为了让不愿意花钱购买商业版的用户能够使用上 Impact。这也体现了互连网的开放精神。
3、我当时收到你的邮件了,说实话,我一看是什么版权保护什么组织的,都没仔细看内容,然后就直接删除了。我为什么要回复你?你算个什么东西?你配吗?还威胁我,说要让我在业界混不下去,我呸!老子是被吓大的?实话告诉你,我是东北人,不服的就直接来找我单挑!可以带片刀,有本事带枪也可以!
4、你以为注册几个小号在这里埋汰我,就可以蒙蔽大家的双眼?我放出个 js 源码就给IT业抹黑了?要是没有IT业的破解人员的辛勤工作,放出 Windows,估计你还在用DOS呢!
5、“还dos攻击人家网站”——我虽然没攻击过别人的网站,但还是听说过“DDOS”这个词的。什么叫“dos攻击”?恶心不?你造的词?我敢发誓我没有攻击过任何网站;你敢发誓你没有昧着良心诋毁我吗?看来,确实是有个不要脸的,还好意思说别人!我呸!某个组织的走狗!
6、你不是要找我吗?“人肉”也用不着兴师动众吧?你给大伙工钱啊?我在北京市朝阳区曙光西里甲1号第三置业大厦B座1902室。你有种,就来找我,我奉陪到底!不敢来,就别在论坛里瞎叫唤,好不好?
1 请登录后投票
论坛首页 Web前端技术版

跳转论坛:
Global site tag (gtag.js) - Google Analytics