bigbang.coffee is a coffeescript library that allows you to create graphical and evented programs (like games) in coffeescript or javascript using plain mathematical functions. It was inspired by the 2htdp library for racket.
The bigbang
function starts a new universe whose behaviour is
specified by the options and handler functions designated.
- Purely functional event handlers like
on_tick
transform the world from one state to the next. - The world is drawn on the appropriate canvas by the
to_draw
function. - Clock ticks are optional and also provide "clock mode", where changes are queued and drawing happens every actual clock tick (which is useful for games).
Examples
→ https://github.com/obfusk/bigbang-examples
→ http://bigbang-examples.herokuapp.com
bigbang-snake
snake game w/ bigbang.coffee
→ https://github.com/obfusk/bigbang-snake
→ http://bigbang-snake.herokuapp.com
- Felix
→ Comments