Coffee2D HTML5 游戏引擎

程序名称:Coffee2D

授权协议: MIT

操作系统: 跨平台

开发语言: JavaScript

Coffee2D 介绍

Coffee2D 是一个 HTML5 游戏引擎,它将开发 HTML5 Canvas 游戏中大量的工作抽象出来,例如 CoffeeScript 特性(如
class 关键字)来更好的与游戏和 CoffeeScript 集成。

Coffee2D 当前提供:

  • 简单场景图

  • 精灵渲染

  • 事件处理

  • 动画

  • Isometric 地图

组件:

class Card extends Component
  constructor: (@suit, @value) ->
    super()
    @setSize(50, 80)
    # the rectangle will be drawn automatically
    @addChild new Rect 0, 0, @size.w, @size.h, 'white'

  update: (dt) ->
    # dt is delta time passed since last update
    # (update stuff...)
    super()

  draw: (ctx) ->
    # ctx is the canvas context associated with this scene
    # (draw additional stuff other than the rectangle...)
    super()

事件处理:

# event origin is automatically set to unit
unit.dispatchEvent {type: 'kill', target: enemy}
enemy.addListener 'kill', (evt) -> if evt.target == enemy then enemy.die()

# can also fire events from Event class, origin will not be set
Event.dispatchEvent {type: 'init'}

Coffee2D 官网

https://github.com/LanJian/coffee2d

相关编程语言

BlazeDS 是一个基于服务器的Java 远程控制(remoting...
OVal 是一个可扩展的Java对象数据验证框架,验证的规...
Volta 是一套开发工具,专为开发分布式、实时系统应...
OpenDDS 是一个开源的 C++ 实现的 对象管理组织 OMG...
JADE (Java Agent DEvelopment Framework) 是一个完...
FastMM ,在D2006和2007中已代替了原来的内存管理器。