News for hackers. Stuff that matters.
Re:A simple starting point for 2D JavaScript games by potomak on Sunday November 17, 2013 @05:48AM (#6748398)
I really like this kind of approach to 2D games JavaScript development.

I'm regularly using CraftyJS to develop 2D games but I feel like there's something wrong in the development process. The library is huge and therefore hard to maintain, and I'm only using a little part of it.

By using a "gameloop" library and npm + browserify to define dependencies you can include whatever rendering library you want (pixi.js, three.js, etc.).

Re:A simple starting point for 2D JavaScript games by alecthomas on Sunday November 17, 2013 @08:05AM (#6748729)
I wouldn't personally call Crafty "huge", but it certainly is monolithic in the sense that the bundle comes with two renderers, input management, game loop, sound, entity-component system, and so on. Which is a bit, ironic given the main goal of ECS is to decouple systems.

IMO it would be a much nicer library if it was just the ECS, with add-on modules for rendering, sound, etc.

Re:A simple starting point for 2D JavaScript games by Kiro on Sunday November 17, 2013 @04:26AM (#6748216)
Why do you need npm or even a server for this?
Re:A simple starting point for 2D JavaScript games by CodeWithCoffee on Sunday November 17, 2013 @05:17AM (#6748329)
Modules. NPM is the largest JavaScript dependency manager, and it is one of the easiest to install (because it comes with Node).
Re:A simple starting point for 2D JavaScript games by tantalor on Sunday November 17, 2013 @03:04AM (#6748064)
Where's the demo/download/repo link?
Re:A simple starting point for 2D JavaScript games by sethvincent on Sunday November 17, 2013 @03:27AM (#6748101)
It might still take a few minutes for gh-pages to build the site, but here's the example repo: https://github.com/sethvincent/simple-game-example
Re:A simple starting point for 2D JavaScript games by sethvincent on Sunday November 17, 2013 @03:16AM (#6748088)
I wasn't going to put up a demo since it's so little, but yes, that would be useful. Setting up the repo with github pages now.
Re:A simple starting point for 2D JavaScript games by film42 on Sunday November 17, 2013 @12:24AM (#6747719)
Really awesome run-through, thanks for posting!
Re:A simple starting point for 2D JavaScript games by sethvincent on Sunday November 17, 2013 @12:46AM (#6747770)
Cool! I'm glad you liked it.