• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

jakesgordon/javascript-snakes: An HTML5 Snakes Game

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

jakesgordon/javascript-snakes

开源软件地址:

https://github.com/jakesgordon/javascript-snakes

开源编程语言:

HTML 54.9%

开源软件介绍:

Javascript Snakes

An HTML5 Snakes Game

SUPPORTED BROWSERS

  • Chrome 13/14
  • Firefox 5/6
  • IE 9
  • Safari 5
  • Opera 11

KNOWN ISSUES

  • No sound FX in Safari because of delay when playing elements
  • Opera ignores volume and plays music/sounds very loud (and slightly delayed - uck!)

DEVELOPMENT

for all of the gory details checkout the blog article (coming soon)

The game is split into multiple source files (.js, .css and .png) that must be unified (and minified) for the final run-time game:

snakes.js      # the unified javascript file
snakes.min.js  # the unified and minified javascript file
snakes.css     # the unified css stylesheet
snakes.min.css # the unified and minified css stylesheet
fruit.png      # multiple fruit image spritesheet
head.png       # multiple snake head image spritesheet

If you have the Ruby language available, Rake tasks can be used to auto generate these unified files:

rake assets:create   # re-create unified javascript/css asset files
rake assets:resprite # re-create css sprite image files

These must be run every time you change one of the source files.

To make development easier, an auto-asset-generating Rack server can be used that will automatically recreate the unified asset files when they detect a change in the underlying source files:

rake assets:server   # run a simple Rack server that autogenerates unified assets files automatically on change

TODO

  • gameplay: specials - speedup, slowdown, shrink, temporary immunity
  • presentation: fixed width font for high score table ?
  • presentation: better styles when current score >= high score, new high score flash the moment score >= high score
  • presentation: game over message
  • usability: back button support (hashtag support for credits vs highscores vs game ?)
  • performance: use invalid rectangles to only update changed segments (will help when length > 100)
  • techdebt: use event driven pub/sub patterns instead of allowing snake/score/court to call back into game object
  • techdebt: move score rendering out of score class and into render class
  • techdebt: abstract credits list into re-usable Game.Credits class
  • techdebt: abstract highscore list into re-usable Game.Leaderboard class
  • future: player vs player
  • future: player vs AI
  • future: touch support

License

MIT license.

NOTE: the graphics and sounds included in this project are royalty free resources paid for and licensed from iStockPhoto, Lucky Lion Studios and Premium Beat. They are licensed ONLY for use in this project and should not be reproduced.

Thanks for your honesty!




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap