Archive for the ‘JavaScript’ Category

I was trying out Adobe Edge Animate the other night, and wanted to get a simple walk cycle animation happening.

Sonic sprite sheet

Eventually I decided it was too hard to get something something simple going, and that it wasn’t scalable.  I could get 1 sonic animating, but what if I wanted 100?

So, I decided to do it with with JavaScript instead. After a quick google, and some minor modifications to the code, I created this.

http://benxtan.com/test/sonic/

All The Sonics running across 6 screens.

Features:

  • 100 Sonics running across the screen
  • Each Sonic is running at a randomised speed and frame rate
  • The speed is relative to the frame rate (faster speed = faster frame rate)
  • Also added a MIDI of a song from Green Hill for good measure =)
Advertisements