Hacker News new | past | comments | ask | show | jobs | submit login
Tutorial: Create a Mobile HTML5 Farming Game with LimeJS (binpress.com)
40 points by adambenayoun on Oct 17, 2012 | hide | past | favorite | 11 comments



It's awesome that people are writing articles on this stuff, but man -- some of the code in those examples is pretty rough.


Any specific examples you'd like to site? I always enjoy learning new things by seeing how people might re-factor or rewrite existing code samples.


The block that starts with the comment `//shop items`:

`var label` gets declared 3 times inside each loop iteration. Even if JS had block scope, which it doesn't, that would be pretty bad.


Thanks for noticing that kevincennis I've just corrected it.


Glad to see some HTML5 game dev articles up. Since this thread is bound to attract devs involved in HTML5 game creation, is impact.js any good? I find Lime.js to be severely lacking in tools to create something like a platforming game (I'd really rather not write physics and collision code).


In LimeJS you can use the Box2D library to simulate physics, you don't have to write it yourself.

For collision detection is pretty easy, as the Closure Library (which LimeJS is built around) comes with "bounding box" support to perform this very easily.


Construct 2 uses Box2d and Easel.js I believe.. I've seen a number of html5 game tutorials on tutsplus for easel.js but they mostly seem to be "copy what the dev did step by step" as opposed to really explaining things well.

Still this might be worth looking at.


Am I the only one worried about the 100x Farmville clones that will now be built by 15 year olds and spammed across the social sites. =) Great tute though.


I'm worried about the other 99x if I decide to crank one out...


great tutorial!


cooooool




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: