Javascript Super Mario

CupBoy from the Nihilogic blog wrote a Javascript Super Mario engine which compresses down to just 14K. This includes all of the audio and sprite data for the little demo, which are both encoded within the single Javascript file.
The sprites are stored in custom encoded strings in a format that only allows 4 colors for each sprite but in turn only takes up around 40-60 bytes per sprite.We also have MIDI music embedded as base64-encoded data: URI's. No music for IE, though, and it seems all the other browsers each have different, minor problems with it, but it sort of works.
It is by no means a complete clone or anything, it's not even an entire level and several key things are missing, such as mushrooms, Koopas and stuff. It was merely done as a sort of proof-of-concept and to see how small it could get.
Granted, you're not going to fit an entire, completed Super Mario in 14KB, but just think about what was accomplished here. The image at the top of this post is probably about 30K. In half the size, CupBoy has a rudimentary side-scroller rendering engine, music, simplified physics and collision detection, and most of the artwork for the original's first level.
Super Mario in 14kB Javascript
John Resig's dissection of the game's encoded data
Posted by Jason Striegel |
Apr 12, 2008 08:02 PM
|
Permalink
| Comments (0)
Recent Entries
- Nice overview of the YouTube API
- Javascript Super Mario
- Automatic outbound link analytics with jQuery
- Silence your hard drive
- Air on the EeePC
- Relational database using jQuery and HTML tables
- Javascript marker clustering for Google Maps
- Windows Mobile del.icio.us plugin
- HOWTO - Encode any string into a trigonometric function
- Add keystroke user verification to Gnome
Bloggers
Welcome to the Hacks Blog!
Categories
- Ajax
- Amazon
- AppleTV
- Astronomy
- BlackBerry
- Blogging
- Body
- Cars
- Cryptography
- Data
- Education
- Electronics
- Energy
- Events
- Excel
- Excerpts
- Firefox
- Flash
- Flickr
- Flying Things
- Food
- Gaming
- Gmail
- Google Earth
- Google Maps
- Government
- Greasemonkey
- Hacks Series
- Hackszine Podcast
- Halo
- Hardware
- Home
- Home Theater
- iPhone
- iPod
- IRC
- iTunes
- Java
- Kindle
- Knoppix
- Language
- LEGO
- Life
- Lifehacker
- Linux
- Linux Desktop
- Linux Multimedia
- Linux Server
- Mac
- Mapping
- Math
- Microsoft Office
- Mind
- Mind Performance
- Mobile Phones
- Music
- MySpace
- MySQL
- NetFlix
- Network Security
- olpc
- OpenOffice
- Outdoor
- Parenting
- PCs
- PDAs
- Perl
- Philosophy
- Photography
- PHP
- Pleo
- Podcast
- Podcasting
- Productivity
- PSP
- Retro Computing
- Retro Gaming
- Science
- Screencasts
- Shopping
- Skype
- Smart Home
- Software Engineering
- Sports
- SQL
- Statistics
- Survival
- TiVo
- Transportation
- Travel
- Ubuntu
- Video
- Virtualization
- Visual Studio
- VoIP
- Web
- Web Site Measurement
- Windows
- Windows Server
- Wireless
- Word
- World
- Xbox
- Yahoo!
- YouTube
Archives
Recent Posts
- Javascript Super Mario
- Automatic outbound link analytics with jQuery
- Silence your hard drive
- Air on the EeePC
- Relational database using jQuery and HTML tables
- Javascript marker clustering for Google Maps
- Windows Mobile del.icio.us plugin
- HOWTO - Encode any string into a trigonometric function
- Add keystroke user verification to Gnome
- Practical fluid mechanics
www.flickr.com
|





Leave a comment