Check out my
new book!
HTML5 Games book
Play Super Mario Bros in 14kB Javascript Here's an experiment in keeping things small and confined to one Javascript file. A piece of the old Super Mario Bros Nintendo classic. There are no external image or sound files, everything is rendered with Javascript using either canvas elements or old fashioned div-making tactics (for IE).

Hey! While you're here, why don't you also check out the new Games section, a section completely dedicated to online JavaScript web games! And subscribe to the feeds to get the latest updates and games! Now let's play Super Mario...

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.

There is also 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.

Performance varies somewhat between the different browsers, but Firefox, Opera, Safari and IE are all playable. The latest WebKit nightly seems to give Safari a speed boost.

Be sure to click the mouse on the game if Mario won't move. When you die, you have to reload the page to start over. And yes, you can move left. Sorry.


Play Super Mario Bros without music
Play Super Mario Bros with music

Or try the larger double size version:
Play Super Mario Bros (2X) without music or Play Super Mario Bros (2X) with music

The script has been compressed to 14kb with the YUI compressor.
Here's the uncompressed script (35kb), if anyone is interested. The structure may look a bit weird, a lot of things have been moved around to get better compression.


If you liked this, be sure to check out the Super Mario Kart JavaScript game as well. Have fun!
⇓ 247 comments «Oldest   ‹Older   1 – 200 of 247   Newer›   Newest» Steve Streza

Very impressive!

April 8, 2008 11:29 AM
Anonymous

doesn't seem to work properly on FF3 beta or the latest webkit

i get this

http://tinyurl.com/6924qh

April 8, 2008 12:05 PM
Ryan

It works fine for me under FF 3, beta 5. Very nice. :)

April 8, 2008 12:10 PM
Jon Wise

Fantastic job! Nice tight code, fairly faithful implementation. Superb!

April 8, 2008 12:13 PM
CupBoy

Thanks!

@anon: Both the latest webkit and FF3 beta 5 work fine here. Not sure what your problem is.

April 8, 2008 12:18 PM
Hixie

I get the same as anon. Works in Opera 9.5beta, though. I'm on Mac, if that matters.

April 8, 2008 12:32 PM
CupBoy

Probably a mac problem then. Oh well, not much I can do about that right now, I'm afraid. Thanks.

April 8, 2008 12:39 PM
Anonymous

Really cool. A bit sluggish on IE though. And I'm working on a tetris game, but this game beats it. =)

April 8, 2008 12:40 PM
ap

For me, rendering is broken if the browser default encoding is set to anything but Latin-1 (e.g. to Windows Cyrillic AKA Windows-1251). Both Firefox and Safari have this problem, so chances are that both browsers are performing correctly.

April 8, 2008 12:43 PM
Jon Lee

I'm speechless, this is amazing! How many lines of code? (prior to js compression)

April 8, 2008 12:48 PM
Andrei

amazing... for usability, add a few tips on the left side. Also, whenever Mario dies, it doesn't restart right away.

April 8, 2008 12:54 PM
rez

siq

April 8, 2008 1:05 PM
Anonymous

if you go off the left side of the screen, you're stuck.
when you die and fly up then fall down off the screen, you can still jump. and you can jump as many times as you want too... even when you fall off the bottom of the screen after dying, you can still jump your way back up.

April 8, 2008 1:08 PM
James Guapacho

Great!!!!

April 8, 2008 1:11 PM
Anonymous

I like how you can outrun the 'camera'...

@ap
Thanks! Works perfect.

April 8, 2008 1:33 PM
Andrea Giammarchi

really good stuff! nice experiment, and works great with FF3 b5

April 8, 2008 1:37 PM
Anonymous

I get the same as anonymous on my PC (Firefox 2). It works when I switch away from Unicode.

April 8, 2008 1:40 PM
Anonymous

but: the complete original super mario land gameboy rom is only 8kb.

April 8, 2008 1:56 PM
Mark

COOL.

Works (slowly) on my iPhone. No music, and no keyboard.

April 8, 2008 2:10 PM
Anonymous

I like how theres no flag, and at the end you just step into white. It's like that episode of star trek where Picard dies and meets Q.

April 8, 2008 2:15 PM
Hixie

cupboy: Add a character encoding declaration and you should be ok. e.g. an HTTP header like:
"Content-Type: text/html;charset=iso-8859-1".

April 8, 2008 2:15 PM
Michael Head

I have the same "ugly FF3b5" problem as from the 2nd post. I've disabled all my FF addons, and it's still looks the same as the posted screenshot.

(running FF in the Ubuntu hardy beta release)

April 8, 2008 2:16 PM
Michael Head

Switching character encoding to ISO-8859-1 fixes it on both FF3b5 and Epiphany/gecko-1.9.

Cool!

April 8, 2008 2:20 PM
Faitoo

Amazing! Never thought these are ever possible with Javascript!

April 8, 2008 2:27 PM
admin

How could you done this with js? You are the master of js, congragulations dude.
Dave Sickoo
http://veryamazing.blogspot.com

April 8, 2008 2:30 PM
Anonymous

cojonudo!

April 8, 2008 3:02 PM
Anonymous

Works fine in FF3b5 on Mac here.

But when I die, it complains I need a plugin for "text/plain".

April 8, 2008 3:13 PM
Anonymous

All four versions work fine on my mac with firefox! Thanks!

April 8, 2008 3:48 PM
benn

Awesome! Well done - really impressive from one js dude to anoher. :)

April 8, 2008 4:20 PM
Maz-Yayan

everybody, try this..
it's more interesting
http://nintendo8.com/game/629/super_mario_brothers/

April 8, 2008 4:27 PM
Mathieu 'p01' Henri

Nice, but I can't help thinking that 14Kb is actually quite big.

I've been doing size optimization for some time, including some effects in 256 bytes, a simple remake of Wolfenstein 3D in 20 lines, and a Doom like ( with various enemies, items, levels, floor and ceiling mapping ) in 4Kb.

April 8, 2008 4:52 PM
Anonymous

Nice, but no music and no mushroom in the second question block..

April 8, 2008 4:58 PM
Anonymous

Very very impressive. As a guy that programs a bit of javascript to get this down to 14kb with those sorts o collisions etc. Wow, cudos man, that is rad.

April 8, 2008 5:28 PM
Schill

Well done! The Base64-encoded MIDI is cool, I guess it works in everything except IE these days (maybe IE 8, even?)

I have a few random JS projects on my own site which while not this light, are in similar spirit (ie., arkanoid and SoundManager 2.)

Super Mario World is an old favourite everyone knows though - again, nice work. Works fine for me on Firefox 3 B5.

April 8, 2008 5:36 PM
blakespot

Pac-Man in 4K of 6507 assembly:

http://www.bytecellar.com/archives/000102.php

April 8, 2008 5:36 PM
carpathian

truly amazing!

April 8, 2008 6:37 PM
Jason

collision detection is a little off.

April 8, 2008 6:55 PM
Anonymous

amazing

April 8, 2008 7:13 PM
Roo

AWESOME!!

April 8, 2008 7:20 PM
Anonymous

Wow! That's really frickin' cool.

Weel done!

April 8, 2008 7:21 PM
Anonymous

Neat little game. I died, and kept pressing the up arrow; you'll never fall if you do that, lol.

April 8, 2008 7:25 PM
Anonymous

doesn't work right in FireFox, I could see and hear things, but not do anything.

April 8, 2008 7:35 PM
Anonymous

That's insane. FF3b5 on Leopard work beautifully.

April 8, 2008 7:41 PM
nthdesign

This is truly amazing work. I'm impressed.

April 8, 2008 7:49 PM
bayu

hahaha.. that's correct. when mario died, you still can press up arrow, and the mario will be still flyin' around.
Nice code though... fantastic

April 8, 2008 7:49 PM
Cameron

Very awesome, nice work.

April 8, 2008 7:51 PM
Nicolás

Wow!, aweasome. Fantastic job rlly.

April 8, 2008 7:57 PM
Free Xbox 360 Elite

Very cool. It's very impressive that you managed to do that. I would like to see a whole level done and see how small you can get the file size down to.

April 8, 2008 8:05 PM
Anonymous

the goomba keeps getting me

April 8, 2008 8:07 PM
Robb Montgomery

totally pointless. go get a job.

April 8, 2008 8:13 PM
Anonymous

this is pretty ghey

April 8, 2008 8:19 PM
Volo Mike

To the guy that said, "but: the complete original super mario land gameboy rom is only 8kb." Yeah, but the gameboy has onboard graphics chips that handle things like sprites, screen swaps, moving background layers, and so on. You don't get that very easily in a browser. It's a miracle this developer got it down to 14kb. Hire that man!

April 8, 2008 8:21 PM
Anonymous

wow, I can't believe you did that in JS. I would have used python :-) nice job!

April 8, 2008 8:25 PM
Matt

@Robb Montgomery: This might get him a job.

April 8, 2008 8:32 PM
Anonymous

WOW!

April 8, 2008 8:32 PM
Louis Vuitton Replica

This is a very nice invention. I never thought the whole game can be designed only using 14kb. :)

April 8, 2008 8:33 PM
Rog

Good proof of concept - except that if I reload the page using FF 3b5, I can't MOVE! I can jump, but l-r arrows do jack squat. It does however work on the Wii (hook up a keyboard ppl, really it works. Just awfully slowly.)

April 8, 2008 8:40 PM
Jonathan Carl Broderick

works (slow) on my nokia n800 os2008, great job.

April 8, 2008 8:51 PM
Fingel

Thats incredible. Makes me look at javascript in a whole new way.

April 8, 2008 8:57 PM
Anonymous

@Volo Mike
Your obviously a noob. You cant do something like this in a server side language.

Every day when I find out something new of JS's abilities I continue to be amazed.

April 8, 2008 9:01 PM
Zim

Well, I don't understand why some people here don't like this. It's a very well done script buddy!
I wish I had the knowledge and patience to do this. Congratulations =)

April 8, 2008 9:17 PM
Totoro

wow! you're a master!
excellent work. congratulations!

April 8, 2008 9:38 PM
Anonymous

Well done!! Amazing job! How about mushrooms, stars, and other levels?

April 8, 2008 9:51 PM
Terry

Amazing!

However, it works until I change encoding from gb2312 to utf-8

April 8, 2008 10:05 PM
Anonymous

There's no encoding declaration; you should always use an encoding declaration on every HTML page (or do it server-side).

It's not hard, just add <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> before the <title> and it solves everything.

April 8, 2008 10:35 PM
Erwan

Impressive !

April 8, 2008 10:36 PM
ABHINAV

Very impressive!

April 8, 2008 11:08 PM
Hayesha

Grate work.

April 8, 2008 11:11 PM
JAV

Works smooth to be playable on an old pentium4 2000Mhz, firefox3 beta5, debian etch. Great work!

April 8, 2008 11:15 PM
Anonymous

Really Cool

April 8, 2008 11:22 PM
Anonymous

Great job!

April 8, 2008 11:24 PM
Anonymous

there's no music,and no mushrooms

April 8, 2008 11:29 PM
mona

Okay, seriously...

Not only is that incredibly badass that you coded this entirely in javascript (no external images?!?!?...pretty damn good!) but it is even cooler because you emulated the oldschool mario bros. game for the first nintendo systems. That, I do believe, makes you A PIMP! For real. I might be in love with you.


-Mona

April 8, 2008 11:30 PM
Jani

This is seriously nice! I've made a couple of JS based games as well, but this does beat 'em in gfx and smoothness... Not to mention size - that's an achievement.

April 8, 2008 11:31 PM
CupBoy

Haven't been able to do anything before now. Added the encoding declaration, hope that works better.

April 8, 2008 11:51 PM
jhOy iMPeRiaL

great script and idea :)

April 9, 2008 12:02 AM
Anonymous

It sucks

April 9, 2008 12:26 AM
Matt

Both game and music ran slow in Firefox 1.5.0.12, if that applies to anyone besides myself. Ran only slightly better in IE 6, and without music when it should have. Just as an FYI.

Nice work.

April 9, 2008 12:55 AM
projectmanagement

Nice!

It does not have all the secret rooms i believe, but well done! It runs smooth on my safari browser.

April 9, 2008 1:11 AM
Anonymous

I am amazed! As a proof of concept this is fantastic. I'm going to be studying your code for a hours tonight. Gonna need some Java in the morning. I have never thought of using javascript as a platform for web based games.

April 9, 2008 1:20 AM
Anonymous

No shrooms? I loved the schrooms :D

April 9, 2008 1:20 AM
Anonymous

Simply awesome

April 9, 2008 1:29 AM
ubik

Very impressive. CupBoy how long it took you to write it? You just opened gates of new world;)

Regards
Darek

April 9, 2008 1:51 AM
もぎー

Good job!
I want to mushroom...

April 9, 2008 2:09 AM
Chris

Really good :)

No mushrooms tho :(

April 9, 2008 2:11 AM
dey

WOUW !!! Very nice ! Like my SuperMario on Nintendo 64

April 9, 2008 2:39 AM
Andrzej Doyle

Looks like the death music failing to play is an off-by-one error. For whatever reason, your aSounds array has three elements in it - the main theme, a noop element, then the death music. The die() function calls playMusic(1), which (correctly!) plays nothing. Changing this call to playMusic(2), or removing the element sound element, should cause the death music to work properly.

But that aside, great job! And it's a very nice proof-of-concept. :-)

April 9, 2008 2:47 AM
madpilot

Nice work! I love the use of the canvas element - quite ingenious. I did the same thing, but in pure HTML, CSS and JavaScript using just divs - http://myles.eftos.id.au/blog/2008/04/09/swing-your-hands-from-side-to-side-how-to-abuse-javascript/

April 9, 2008 3:00 AM
Martin

Stunning! I miss the mushroom at start. :-)

April 9, 2008 3:12 AM
Anonymous

kb != kB. This is 14 Kilobytes of JavaScript, not 14 Kilobits, there is a massive difference.

April 9, 2008 3:17 AM
devolute

Whoaa, impressive.

Now do Quake using the same tools :)

April 9, 2008 3:49 AM
Anonymous

Hi, good job!
But I found some issue with jump:
if I press 'up' arrow (jump) and then, when Mario in the air, press 'left' or 'right' I can move only a little range. Then Mario stops like he hits on wall.

April 9, 2008 3:49 AM
CupBoy

@Andrzej Doyle: Yea, I know. The empty element was there for debugging purposes and I forgot to remove it. It's fixed now. Thanks.

@madpilot: Very nice! This version does actually work using just divs as well. That's how it's done when running it in IE. That's actually how it was done in all browsers to start with, until the canvas thing was rather hastily tacked on in the end.

@Darek: I have no idea, really. I started doing the sprite thing a few years ago, but then it just sat in the corner for ages..

And seriously people, read the post. I told you there are no mushrooms.

April 9, 2008 4:00 AM
Anonymous

Dude, you are the man... very very impressive and a step in the right direction for web based gaming

April 9, 2008 4:21 AM
Jim H

sweet 'n' slick

April 9, 2008 4:27 AM
Anonymous

No mushrooms, no secret levels, no flag... = fail

April 9, 2008 4:34 AM
gwo

cool :)

April 9, 2008 4:46 AM
Håvard Pedersen

You can also run too far to the right, out of the screen :)

April 9, 2008 4:49 AM
Mega69

Good!! It works fine.

April 9, 2008 4:57 AM
Michele

Great job!!

April 9, 2008 5:50 AM
Anonymous

This is madness... you're a genius!

April 9, 2008 5:58 AM
Augusto Kurt TMW

amazing work! gratz!

April 9, 2008 5:58 AM
Topper

Dude I am beyond impressed. I think only guru programmers who have dabbled with inline images and advanced javascript, sine waves for jumping, physics acceleration, scrolling panes and so will really appreciate what you have achieved here.

I am calling other programmers into my office to show them and the latest comment was "fuck me" and "damn hes good", "give that guy a job".

Well done!

April 9, 2008 6:03 AM
Anonymous

def. not a mac problem. working in camino.

April 9, 2008 6:15 AM
Anonymous

works perfect in safari. and, in fact, much smoother than in failfox.

April 9, 2008 6:26 AM
Jesse

I only played it for a few seconds, but

1) wasn't there supposed to be a super mario shroom in the second "?" box at the beginning of the game?

2) shouldn't the box before the first pitfall be invisible, and contain a 1-up shroom?

Stopped playing after that. Sluggish in IE 6 on Win XP (what I'm stuck with at work).

April 9, 2008 6:28 AM
Anonymous

I think auther is too great and geneus.

I want to eat kinoko

April 9, 2008 6:49 AM
RaYY

A.W.E.S.O.M.E

April 9, 2008 7:04 AM
DAQ Newb

Holy Effing crap! NICE WORK ALL INVOLVED. AND EF THE NAYSAYERS!

April 9, 2008 7:18 AM
Anonymous

Awesome!!!

You've just raised a bar for the rest of us :)

April 9, 2008 7:46 AM
Remy Blaettler

Is this open source? E.g. could I put this on my own website?

April 9, 2008 7:47 AM
Yellow

Зачод!!

April 9, 2008 7:55 AM
Nicolaspar

Excelent Works, thanks!!!

April 9, 2008 8:04 AM
Greg

Holy hell. To do that in cross-browser compatible Javascript is something special indeed. Big props to you.

April 9, 2008 8:20 AM
TheGuy

Check out http://TheGamersGuild.info
Brand spanking new. Be a part of the beginning of a huge site!

April 9, 2008 8:37 AM
Francesco Fracassi

Huge!

April 9, 2008 8:41 AM
Jerome

thought it might be possible but not in 14kb, not even in 35kb...very cool!

April 9, 2008 8:47 AM
matt

YOU OWE ME A MUSHROOM!!!

Seriously though, this is amazing.

April 9, 2008 8:53 AM
Arthur Blake

That's amazing! CompressorRater shows that if you served your JS gzipped you could get it down to ~7KB !

April 9, 2008 9:00 AM
pambuk

I have to stop in order to jump :(
Great work (14kb!) but unplayable for me... I'm on Ubuntu 7.10, using Firefox (if that matters).

April 9, 2008 9:16 AM
Ornamo

amazing.

April 9, 2008 9:24 AM
Jeremy Butler

Very impressive, it's good to see people pushing limits on scripting.

April 9, 2008 9:36 AM
Abhijeet

Really impressive!

April 9, 2008 9:44 AM
Mathieu 'p01' Henri

I don't like to pull the plug like this, but seeing the ecstatic reactions to this game prototype, it seems that many haven't seen 3D TOMB II.

3D TOMB II is a DOOM like in less than 4Kb of JavaScript featuring several enemies & items, levels generation, texture generation, walls floor and ceiling mapping ...

April 9, 2008 10:06 AM
Anonymous

NO MUSHROOM = FAIL!

April 9, 2008 10:16 AM
Smok

how cool is that :)

April 9, 2008 11:59 AM
red456

14kb, you're pissing me. javascript chess with cpu opponent http://javascript.internet.com/games/javascript-chess-with-cpu-oppo.html

April 9, 2008 12:01 PM
Richard Holt

Amazing, just amazing, you're a talented guy...

®

April 9, 2008 12:05 PM
Luis

Amazing!

You are the best, javascrisching.

April 9, 2008 12:10 PM
jonserr

awesome,
hey did anyone write the control buttons for it. if not do you mind if i give it a shot. it loads fine on the iPhone but no controls.

much oblige

April 9, 2008 1:17 PM
pollo. ..

para cuando el Mario 3? =P

April 9, 2008 2:04 PM
Anonymous

Fantastico

April 9, 2008 2:24 PM
Maria Andrea Lenis

You are my new hero.

April 9, 2008 2:53 PM
Cristian

awesome!

April 9, 2008 4:10 PM
Anonymous

Wonderful!

I don't hear any music in Opera (9.27) though.

April 9, 2008 4:20 PM
][][]

Very nice, sophisticated code!
Another example that has some things in common with your Super Mario clone: Jangaron.
It also implements a classic game, in this case "Tron", is written in fairly tight code (80kb uncompressed), and features unprecedented DHTML graphics, even 3D as in your Doom prototype (but does not use canvas).

April 9, 2008 4:44 PM
Matt

this is great, but there is a cheat. if you die you can keep on jumping up, but you cant move.

April 9, 2008 6:53 PM
daniel thornbury

Impressive, but not in the sense of size. 16kb of compressed JS is quite a lot of code...

it loses a little of it's magic when considering the original mario, with all the bells and whistles, was only 40kb in total.

April 9, 2008 7:10 PM
Chandoo

amazing stuff... kudos to your effort to squeeze things

April 9, 2008 7:21 PM
Rookie23

wow nice i love it!

April 9, 2008 8:02 PM
kuei

It's amazing!!!! nice job !!!

April 9, 2008 9:28 PM
Jurgen Estanislao

Hey,

I found what you did quite interesting and I would like to ask something important regarding the super mario javascript.

We have a site and we are thinking of using it there. That said I would like to discuss it with you.

Please do email me at jurge16@yahoo.com so that we can talk about it.

Thanks mate.

April 10, 2008 12:32 AM
frank

It seems like the most of you have under estastinmated the power of javascript, there are some raytracers, lots of games and other stuff.
you have to use google!
try to search for games or just go to Ajaxian where they post a lot of stuff of web development.

JavaScript might be like syrup, but these days they just keeps on adding water to the mix.

It seems like the sound doesn't work on FF3 beta 4 but that's not a major problem.

Great work Nihilogic! I didn't get what kid of lisence it was released under but i will study your code and maybe fix a few bugs or so.

In conclusion i will just tell that i'm currently writing on a 3D roleplaying game in JavaScript and php, many people have told me that it's impossible but what i have seen this far it looks like i can complete the project.

April 10, 2008 2:01 AM
Anonymous

Great application, man. Well done. Can't wait to see you do an online poker one.

April 10, 2008 2:31 AM
Quess

Really good work! Impressive!
Quess

April 10, 2008 2:37 AM
Anonymous

One word: WICKED!

April 10, 2008 2:41 AM
Super Wasabi

AWESOME!

April 10, 2008 5:06 AM
Epitaph

One problem I noticed was the lack of conservation of momentum while in the air. as well as the ability to jump and then start moving, considering you have no momentum in any direction this should be impossible. What i have done to fix this in the past is to establish a boolean value that represents if the char is on the ground or not. If the char is on the ground, let the player change its momentum. If the char is off the ground STILL let him, but at a very very diminished rate.

Other than that i LOVE it, great work.

April 10, 2008 6:28 AM
nitro2k01

I repeat what p01 said earlier. Nothing beats 3D Tomb II! It's a 4k JS game with 3D.

April 10, 2008 6:52 AM
Anonymous

@daniel thornbury

Impressive, but not in the sense of size. 16kb of compressed JS is quite a lot of code...

it loses a little of it's magic when considering the original mario, with all the bells and whistles, was only 40kb in total.

this mario was done in javascript on a web browser. the original mario was written in optimized compiled code. i'd say 14kb is impressive.

April 10, 2008 7:06 AM
Kagayaki

Happy!

April 10, 2008 7:30 AM
Brett Fattori

At some point I want to revive my project at http://code.google.com/p/renderengine

I'd like to get some more people involved. I think this is amazing, and would like to see people really put the browser to use. With faster browsers every day, Javascript is quick becoming a good gaming platform.

April 10, 2008 8:25 AM
Anonymous

I've seen more stuff in less ^_°

I might already know .theprodukkt

http://www.theprodukkt.com/kkrieger

First person Shooter in 96kb.

http://kk.kema.at/files/gfx/full1.jpg

April 10, 2008 8:59 AM
Anonymous

Too bad Super Mario Bros sucks anyway.

April 10, 2008 9:35 AM
Valkin

Hey,

I would like to have a talk to you about a potential job offer/freelance work, could you please contact me on leon.bollerup@startforce.com .

With Kind Regards,
Leon Bollerup
Project Manager, www.StartForce.com

April 10, 2008 11:06 AM
Fuzz10

Whoa !

Damn... Compliments !
Pretty masochistic though ! :-)

April 10, 2008 12:19 PM
Anonymous

Clap Clap Clap.

I cannot believe this size of the source. Even 35 kb is small.
The graphics is ultra compressed.
Hardly possible to make much smaller. The code is compact and efficient (as you would expect).

The combination is unbelievable.
I had heard about javascript games.
But I didn't think it was possible to make them with so few lines of code.

You impressed me (and I am a savy coder).


This is not exactly something one's girlfriend appreciates. Look honey what I have done!!
And it is only 14kb!!
Oh, good for you. btw what is a kb?

Get a life.
You have too much spare time. :)

April 10, 2008 12:39 PM
Anonymous

If you liked this Mario "clone" in 14Kb of minified JavaScript, you might enjoy Castle Wolfenstein, a "clone" of Wolfenstein 3D in 17 lines of JavaScript with a several levels, a map editors, dogs attacking you ...

April 10, 2008 2:15 PM
Anonymous

mind blowing !

April 10, 2008 5:12 PM
RaPhAaAAaaa

sux a lot...
the flash player is a very mucth better.

April 10, 2008 5:41 PM
Anonymous

Wow. Just...wow. The double-size version chugs and skips input-read occasionally on my computer (might be my old computer), but the single -size works great. The minor issues of not having koopas and 'shrooms are more than justified by the fact that the source is microscopic. Original NES carts were, if I remember correctly, 128kb minimum, but I don't know how big SMB was. It's no small feat to compress the game into less than 1/10 that, especially in a language as (relatively) bulky as Javascript! Very impressive coding, people. Very impressive coding.

That said, I did have a problem with the music. I don't mind that it was in MIDI, or even that the main tune was just a portion of the song. The impressively tiny size, again, justifies those factors. But could you have picked a DIFFERENT MIDI that got the melody right, or even the few notes that were used? Some of the notes in the track were off-key, others off-tempo, and a few just plain wrong. After turning off the music, the game felt much better though, so I didn't let that detract from my game experience (beyond the first ten seconds).


It's easy to ignore the absence of koopas, but it's tough to ignore an off-key version of the soundtrack playing right into your ears. Encoding a new MIDI into Javascript might be a royal pain, but fixing that will eliminate the single biggest flaw of the game (in my opinion).

April 10, 2008 5:55 PM
mobi Enthusiast

Nice work! Keeping these file sizes small is key. If you're going to put this on a dot mobi, remember that most of the world is seeing the internet for the first time and will be less critical than this bunch (grin).

@anonymous re: encoding - the encoding you selected will fail at ready.mobi.

April 11, 2008 7:48 AM
Eat_My_Shortz

Wow .. awesome in JavaScript!

Quicktime for audio crashes my browser (FF2 on Windows). But maybe that's just me.

Non-audio version is fine.

April 11, 2008 8:44 AM
Anonymous

where the fuck is the mushrooms, vines, flowers? where's the fucking flag pole and castle? Fail...

April 11, 2008 9:26 AM
richard

hehe very cool

April 11, 2008 10:49 AM
Daniloguenther

since when can you go to the left in Super Mario Bros.?
besides theres a bug when you go to the most left...

April 11, 2008 11:44 AM
Charles

in ie7.0 it runs off the page to the right and the same thing in firefox 3beta ... in other words ... the game is not inside the frame or part is not hidden and the gam takes up the whole width of the screen to the right instead of being neat and nice in a little box like it should be ... can anyone give me a tip please hot to fix it

April 11, 2008 1:18 PM
Anonymous

toedilly fotoshawped

April 11, 2008 6:49 PM
ronzox

nunca sabré tanto java no me gustó tanto mario como para hacer eso... gran trabajo!!

April 11, 2008 8:18 PM
German

@ronzox: java tiene poco que ver con javascript además de ser lenguajes de sintaxis parecida, pero la orientación es completamente distinta.

Tampoco me funciona en derivado de Safari...
(S60 Browser, javascript habilitado)

April 12, 2008 6:59 AM
Anonymous

awesome!!

April 12, 2008 9:33 AM
charles Esquiaqui

hagan esto dejense matar y apenas los toquen que mario hace la mueca del porque empiecen a presionar ctrl para brincar , el prgrama calcula la distancia de salto en el aire y saltando puedes llevar a mario al cielo jajajajajaj y el calculo es tan correcto que cuando sale de la pantalla hacia arriba se dmora en caer lo que subio saltanto ajajaj.

April 12, 2008 9:42 AM
Anonymous

awesome

April 12, 2008 10:43 AM
Ramon Bispo

Wow!!

Awesome guy!!

Great job!!

April 12, 2008 6:46 PM
garrett

Nice, however it was disipointing that i could not find any muchrooms. normaly there is a muchroom on the 2nd question mark box. and ya it was good ne ways

April 12, 2008 6:51 PM
frem

Extremely neat, though by no means amazingly ground-breaking. (Sorry. ;-)

Though they didn't use canvas, there were a lot of really cool games something like five or six years ago at the now dead javascript-games.org. Oh Javascript-Games.org, I pine for thee.

April 12, 2008 10:44 PM
Lestat Malandro Porco Porto Alegre/RS

uahu

April 13, 2008 10:04 AM
rateaprof

insane.... absolutely insane... love it! let's port MAME to javascript :)

April 14, 2008 3:55 AM
Anonymous

This Thing Rocks! :-)

Please add a SPACE => Up Assignment for a
better Gameplay.

April 14, 2008 6:38 AM
Jensemann

Really nice But you have a bug there. When Mario died you can still jump. :D
Thanks for this entertaining work
Jensemann

April 14, 2008 6:48 AM
Mister Potato

Amazing!!!

April 14, 2008 3:58 PM
James

Very impressive.

April 14, 2008 8:29 PM
Poche

nice dude!!
never thought that that game can be done in javascript...
may i link your page to my blog???

April 14, 2008 9:17 PM
nagoon97 This comment has been removed by the author. April 15, 2008 2:46 AM Spirithound

Great work!
Two suggestions: 1. a flag and castle at the end, and 2, perhaps a piranha plant or a koopa troopa besides the goombas.

April 15, 2008 8:50 AM
ApeWare

Not dead yet!!!
When you die, click the up-arrow and you can fly! see video example here:
http://screencast.com/t/jvtzqoDw

Cool!!! Great job. Much fun in such a small package.

April 15, 2008 10:02 AM
Anonymous

yeah n1

April 15, 2008 1:01 PM
DSL Tarif

Its really but. May be a little bit to easy...

April 15, 2008 3:37 PM
Develoweb

wonderfull work.

April 15, 2008 10:09 PM
Anonymous

That is SO COOOL!!!!! Loved running it on firefox in 64bit linux; Amazing that you did this in Javascript.

April 16, 2008 5:50 PM
Vae Victis

damnit! halfway through the game and still no mushroom! no flag at the end of the stage either! =) really nice though

April 17, 2008 12:02 AM
Scientist

I played the whole thing, getting every coin. Worked great (FF2, XP).

Amazing work, what are you doing next?

April 17, 2008 4:29 AM
jaybose

Very creative, great job!

April 17, 2008 1:15 PM
pragnesh

suparb

April 17, 2008 10:19 PM
Ryan

Nice work
http://www.littleking.jp

April 18, 2008 1:40 AM
Antonio

Hi sorry but no music on FF 2.0. Collision good but commands OK. Fantastic game in 14KB and no external media...
Antonio

April 18, 2008 3:04 AM
Anonymous

Impressive. Never underestimate the power of Javascript. :D

April 18, 2008 5:46 AM
Milla Valkeasuo

IMPRESSIVE!!

April 20, 2008 10:34 AM
Naohiro19

再現はすばらしいですが不具合はあるようです。

The reappearance is wonderful but seems to have a problem.

April 21, 2008 3:51 PM
Mondo Libero

Lavoro Davvero Molto Interessante.

April 22, 2008 9:03 AM
Post a Comment