

Create a Game Character with HTML5 and JavaScript - tilt
http://www.williammalone.com/articles/create-html5-canvas-javascript-game-character/1/

======
mrspeaker
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!

~~~
gcr
CoralCDN mirror: [http://www.williammalone.com.nyud.net/articles/create-
html5-...](http://www.williammalone.com.nyud.net/articles/create-html5-canvas-
javascript-game-character/1/)

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

------
jechen
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.

~~~
tilt
Quote!

Yeah I think HN did some hurt :b

------
gary4gar
All just because of twitter :-(

Warning:
file_get_contents([http://api.twitter.com/1/statuses/user_timeline.xml?screen_n...](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

------
f1gm3nt
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...](http://api.twitter.com/1/statuses/user_timeline.xml?screen_name=williamMalone));
} catch (Exception $e) { }

OR

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

------
wlievens
Can't read the page because the twitter shoutbox gives an error...

~~~
jasonkester
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.

~~~
lemming
Hell is other people's code?

------
canistr
Site looks to be back up and it looks great. Thanks!

------
benologist
How would you handle the collision detection on this?

------
BioX
Wow, this is a very cool site. Thanks for the post.

------
sushumna
This is excellent.

