News for hackers. Stuff that matters.
Re:Create a Game Character with HTML5 and JavaScript by mrspeaker on Wednesday July 06, 2011 @06:08AM (#2733219)
Errrgh! That's a shame his site died - a great tutorial on giving character to your characters. When the player sprite is standing still he independently (and subtly) adds breathing motion and limb motion, and blinking.

If you make games, then bookmark it and come back later!

Re:Create a Game Character with HTML5 and JavaScript by gcr on Wednesday July 06, 2011 @10:53AM (#2734147)
CoralCDN mirror: http://www.williammalone.com.nyud.net/articles/create-html5-...

Edit: nevermind, it doesn't cache the javascript so the example doesn't actually work

Re:Create a Game Character with HTML5 and JavaScript by messel on Wednesday July 06, 2011 @09:22AM (#2733739)
thanks for the review. I hit the site was about to give up but will review it later. Bringing life to characters through animation is well worth checking out for a budding clientside coffeescripting, canvas slinging, html5'er

The google web cache was viewable: http://webcache.googleusercontent.com/search?q=cache:QKa7OUg...

Re:Create a Game Character with HTML5 and JavaScript by jechen on Wednesday July 06, 2011 @05:47AM (#2733158)
This guy's HTML5 tutorials are freaking amazing, honestly can't express how grateful I am to people who's willing to put in the extra effort to help others learn. The servers are being hammered, though.
Re:Create a Game Character with HTML5 and JavaScript by tilt on Wednesday July 06, 2011 @06:06AM (#2733207)
Quote!

Yeah I think HN did some hurt :b

Re:Create a Game Character with HTML5 and JavaScript by gary4gar on Wednesday July 06, 2011 @08:48AM (#2733620)
All just because of twitter :-(

Warning: file_get_contents(http://api.twitter.com/1/statuses/user_timeline.xml?screen_n...) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request in /home/content/w/i/l/willieohwillie/html/twitter/twitter-cacher.php on line 86

Fatal error: Cannot use string offset as an array in /home/content/w/i/l/willieohwillie/html/header.php on line 319

Re:Create a Game Character with HTML5 and JavaScript by f1gm3nt on Wednesday July 06, 2011 @09:29AM (#2733759)
I think this is a better example of why you need to have code in place to fail gracefully.

try { file_get_contents(http://api.twitter.com/1/statuses/user_timeline.xml?screen_n...); } catch (Exception $e) { }

OR

if ($contents = @file_get_contents(http://api.twitter.com/1/statuses/user_timeline.xml?screen_n...) { //stuff }

Re:Create a Game Character with HTML5 and JavaScript by wlievens on Wednesday July 06, 2011 @06:00AM (#2733192)
Can't read the page because the twitter shoutbox gives an error...
Re:Create a Game Character with HTML5 and JavaScript by jasonkester on Wednesday July 06, 2011 @06:07AM (#2733216)
Amazing that anybody would actually put 3rd party API code on the main execution path for rendering their site. What's the best case result? That your website renders correctly after only a 1 second pause?

This sort of widget is best lopped off entirely, or if you think it's absolutely essential, it's something that you load from javascript after all your resources have finished loading and rendering.

Never put your users' experience into the hands of a 3rd party. Other people's code is, nearly without exception, non-debugged, brittle garbage. Wrap it in four layers of try/catch and for the love of jebus, keep it out of your critical path.

Re:Create a Game Character with HTML5 and JavaScript by lemming on Wednesday July 06, 2011 @11:32AM (#2734337)
Hell is other people's code?
Re:Create a Game Character with HTML5 and JavaScript by bschaefer on Wednesday July 06, 2011 @06:21AM (#2733240)
Re:Create a Game Character with HTML5 and JavaScript by jqueryin on Wednesday July 06, 2011 @07:24AM (#2733370)
And here's the straw that broke the camel's back:

    file_get_contents(http://api.twitter.com/1/statuses/user_timeline.xml?screen_name=williamMalone) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request in /home/content/w/i/l/willieohwillie/html/twitter/twitter-cacher.php on line 86

    Fatal error: Cannot use string offset as an array in /home/content/w/i/l/willieohwillie/html/header.php on line 319
Add some error handling and skip showing your timeline when this arises and be on your merry way.
Re:Create a Game Character with HTML5 and JavaScript by canistr on Wednesday July 06, 2011 @03:20PM (#2735431)
Site looks to be back up and it looks great. Thanks!
Re:Create a Game Character with HTML5 and JavaScript by benologist on Wednesday July 06, 2011 @01:59PM (#2735070)
How would you handle the collision detection on this?
Re:Create a Game Character with HTML5 and JavaScript by BioX on Thursday July 07, 2011 @04:46AM (#2737754)
Wow, this is a very cool site. Thanks for the post.
Re:Create a Game Character with HTML5 and JavaScript by sushumna on Wednesday July 06, 2011 @05:41AM (#2733137)
This is excellent.