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!
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!
Very impressive!
April 8, 2008 at 11:29 AM Anonymousdoesn't seem to work properly on FF3 beta or the latest webkit
April 8, 2008 at 12:05 PM Unknowni get this
http://tinyurl.com/6924qh
It works fine for me under FF 3, beta 5. Very nice. :)
April 8, 2008 at 12:10 PM AnonymousFantastic job! Nice tight code, fairly faithful implementation. Superb!
April 8, 2008 at 12:13 PM Jacob SeidelinThanks!
April 8, 2008 at 12:18 PM Hixie@anon: Both the latest webkit and FF3 beta 5 work fine here. Not sure what your problem is.
I get the same as anon. Works in Opera 9.5beta, though. I'm on Mac, if that matters.
April 8, 2008 at 12:32 PM Jacob SeidelinProbably a mac problem then. Oh well, not much I can do about that right now, I'm afraid. Thanks.
April 8, 2008 at 12:39 PM AnonymousReally cool. A bit sluggish on IE though. And I'm working on a tetris game, but this game beats it. =)
April 8, 2008 at 12:40 PM AnonymousFor 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 at 12:43 PM AnonymousI'm speechless, this is amazing! How many lines of code? (prior to js compression)
April 8, 2008 at 12:48 PM ph0rqueamazing... for usability, add a few tips on the left side. Also, whenever Mario dies, it doesn't restart right away.
April 8, 2008 at 12:54 PM Anonymoussiq
April 8, 2008 at 1:05 PM Anonymousif you go off the left side of the screen, you're stuck.
April 8, 2008 at 1:08 PM Anonymouswhen 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.
Great!!!!
April 8, 2008 at 1:11 PM AnonymousI like how you can outrun the 'camera'...
April 8, 2008 at 1:33 PM Andrea Giammarchi@ap
Thanks! Works perfect.
really good stuff! nice experiment, and works great with FF3 b5
April 8, 2008 at 1:37 PM AnonymousI get the same as anonymous on my PC (Firefox 2). It works when I switch away from Unicode.
April 8, 2008 at 1:40 PM Anonymousbut: the complete original super mario land gameboy rom is only 8kb.
April 8, 2008 at 1:56 PM MarkCOOL.
April 8, 2008 at 2:10 PM AnonymousWorks (slowly) on my iPhone. No music, and no keyboard.
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 at 2:15 PM Hixiecupboy: Add a character encoding declaration and you should be ok. e.g. an HTTP header like:
April 8, 2008 at 2:15 PM Michael R. Head"Content-Type: text/html;charset=iso-8859-1".
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.
April 8, 2008 at 2:16 PM Michael R. Head(running FF in the Ubuntu hardy beta release)
Switching character encoding to ISO-8859-1 fixes it on both FF3b5 and Epiphany/gecko-1.9.
April 8, 2008 at 2:20 PM AnonymousCool!
Amazing! Never thought these are ever possible with Javascript!
April 8, 2008 at 2:27 PM adminHow could you done this with js? You are the master of js, congragulations dude.
April 8, 2008 at 2:30 PM AnonymousDave Sickoo
http://veryamazing.blogspot.com
cojonudo!
April 8, 2008 at 3:02 PM AnonymousWorks fine in FF3b5 on Mac here.
April 8, 2008 at 3:13 PM AnonymousBut when I die, it complains I need a plugin for "text/plain".
All four versions work fine on my mac with firefox! Thanks!
April 8, 2008 at 3:48 PM bennnAwesome! Well done - really impressive from one js dude to anoher. :)
April 8, 2008 at 4:20 PM Yanuareverybody, try this..
April 8, 2008 at 4:27 PM Anonymousit's more interesting
http://nintendo8.com/game/629/super_mario_brothers/
Nice, but I can't help thinking that 14Kb is actually quite big.
April 8, 2008 at 4:52 PM AnonymousI'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.
Nice, but no music and no mushroom in the second question block..
April 8, 2008 at 4:58 PM AnonymousVery 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 at 5:28 PM SchillWell done! The Base64-encoded MIDI is cool, I guess it works in everything except IE these days (maybe IE 8, even?)
April 8, 2008 at 5:36 PM AnonymousI 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.
Pac-Man in 4K of 6507 assembly:
April 8, 2008 at 5:36 PM Carpathian66http://www.bytecellar.com/archives/000102.php
truly amazing!
April 8, 2008 at 6:37 PM Jasoncollision detection is a little off.
April 8, 2008 at 6:55 PM Anonymousamazing
April 8, 2008 at 7:13 PM AnonymousAWESOME!!
April 8, 2008 at 7:20 PM AnonymousWow! That's really frickin' cool.
April 8, 2008 at 7:21 PM AnonymousWeel done!
Neat little game. I died, and kept pressing the up arrow; you'll never fall if you do that, lol.
April 8, 2008 at 7:25 PM Anonymousdoesn't work right in FireFox, I could see and hear things, but not do anything.
April 8, 2008 at 7:35 PM AnonymousThat's insane. FF3b5 on Leopard work beautifully.
April 8, 2008 at 7:41 PM UnknownThis is truly amazing work. I'm impressed.
April 8, 2008 at 7:49 PM muzbye®hahaha.. that's correct. when mario died, you still can press up arrow, and the mario will be still flyin' around.
April 8, 2008 at 7:49 PM CameronNice code though... fantastic
Very awesome, nice work.
April 8, 2008 at 7:51 PM AnonymousWow!, aweasome. Fantastic job rlly.
April 8, 2008 at 7:57 PM AnonymousVery 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 at 8:05 PM Anonymousthe goomba keeps getting me
April 8, 2008 at 8:07 PM Anonymoustotally pointless. go get a job.
April 8, 2008 at 8:13 PM Anonymousthis is pretty ghey
April 8, 2008 at 8:19 PM AnonymousTo 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 at 8:21 PM Anonymouswow, I can't believe you did that in JS. I would have used python :-) nice job!
April 8, 2008 at 8:25 PM Matt McCarthy@Robb Montgomery: This might get him a job.
April 8, 2008 at 8:32 PM AnonymousWOW!
April 8, 2008 at 8:32 PM AnonymousThis is a very nice invention. I never thought the whole game can be designed only using 14kb. :)
April 8, 2008 at 8:33 PM RogGood 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 at 8:40 PM Jonathan Carl Broderickworks (slow) on my nokia n800 os2008, great job.
April 8, 2008 at 8:51 PM AnonymousThats incredible. Makes me look at javascript in a whole new way.
April 8, 2008 at 8:57 PM Anonymous@Volo Mike
April 8, 2008 at 9:01 PM AnonymousYour 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.
Well, I don't understand why some people here don't like this. It's a very well done script buddy!
April 8, 2008 at 9:17 PM TotoroI wish I had the knowledge and patience to do this. Congratulations =)
wow! you're a master!
April 8, 2008 at 9:38 PM Anonymousexcellent work. congratulations!
Well done!! Amazing job! How about mushrooms, stars, and other levels?
April 8, 2008 at 9:51 PM TerryAmazing!
April 8, 2008 at 10:05 PM AnonymousHowever, it works until I change encoding from gb2312 to utf-8
There's no encoding declaration; you should always use an encoding declaration on every HTML page (or do it server-side).
April 8, 2008 at 10:35 PM UnknownIt's not hard, just add <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> before the <title> and it solves everything.
Impressive !
April 8, 2008 at 10:36 PM ABHINAVVery impressive!
April 8, 2008 at 11:08 PM HayeshaGrate work.
April 8, 2008 at 11:11 PM JAVWorks smooth to be playable on an old pentium4 2000Mhz, firefox3 beta5, debian etch. Great work!
April 8, 2008 at 11:15 PM AnonymousReally Cool
April 8, 2008 at 11:22 PM AnonymousGreat job!
April 8, 2008 at 11:24 PM Anonymousthere's no music,and no mushrooms
April 8, 2008 at 11:29 PM Ashly LorenzanaOkay, seriously...
April 8, 2008 at 11:30 PM AnonymousNot 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
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 at 11:31 PM Jacob SeidelinHaven't been able to do anything before now. Added the encoding declaration, hope that works better.
April 8, 2008 at 11:51 PM Anonymousgreat script and idea :)
April 9, 2008 at 12:02 AM AnonymousIt sucks
April 9, 2008 at 12:26 AM AnonymousBoth 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.
April 9, 2008 at 12:55 AM AnonymousNice work.
Nice!
April 9, 2008 at 1:11 AM AnonymousIt does not have all the secret rooms i believe, but well done! It runs smooth on my safari browser.
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 at 1:20 AM AnonymousNo shrooms? I loved the schrooms :D
April 9, 2008 at 1:20 AM AnonymousSimply awesome
April 9, 2008 at 1:29 AM ubikVery impressive. CupBoy how long it took you to write it? You just opened gates of new world;)
April 9, 2008 at 1:51 AM もぎーRegards
Darek
Good job!
April 9, 2008 at 2:09 AM AnonymousI want to mushroom...
Really good :)
April 9, 2008 at 2:11 AM DeeDeyNo mushrooms tho :(
WOUW !!! Very nice ! Like my SuperMario on Nintendo 64
April 9, 2008 at 2:39 AM AnonymousLooks 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.
April 9, 2008 at 2:47 AM AnonymousBut that aside, great job! And it's a very nice proof-of-concept. :-)
Stunning! I miss the mushroom at start. :-)
April 9, 2008 at 3:12 AM Anonymouskb != kB. This is 14 Kilobytes of JavaScript, not 14 Kilobits, there is a massive difference.
April 9, 2008 at 3:17 AM AnonymousWhoaa, impressive.
April 9, 2008 at 3:49 AM AnonymousNow do Quake using the same tools :)
Hi, good job!
April 9, 2008 at 3:49 AM Jacob SeidelinBut 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.
@Andrzej Doyle: Yea, I know. The empty element was there for debugging purposes and I forgot to remove it. It's fixed now. Thanks.
April 9, 2008 at 4:00 AM Anonymous@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.
Dude, you are the man... very very impressive and a step in the right direction for web based gaming
April 9, 2008 at 4:21 AM Jim Hsweet 'n' slick
April 9, 2008 at 4:27 AM AnonymousNo mushrooms, no secret levels, no flag... = fail
April 9, 2008 at 4:34 AM Anonymouscool :)
April 9, 2008 at 4:46 AM Håvard PedersenYou can also run too far to the right, out of the screen :)
April 9, 2008 at 4:49 AM AnonymousGood!! It works fine.
April 9, 2008 at 4:57 AM UnknownGreat job!!
April 9, 2008 at 5:50 AM AnonymousThis is madness... you're a genius!
April 9, 2008 at 5:58 AM Augusto Kurt TMWamazing work! gratz!
April 9, 2008 at 5:58 AM TopperDude 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.
April 9, 2008 at 6:03 AM AnonymousI 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!
def. not a mac problem. working in camino.
April 9, 2008 at 6:15 AM Anonymousworks perfect in safari. and, in fact, much smoother than in failfox.
April 9, 2008 at 6:26 AM UnknownI only played it for a few seconds, but
April 9, 2008 at 6:28 AM Anonymous1) 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).
I think auther is too great and geneus.
April 9, 2008 at 6:49 AM PacoI want to eat kinoko
A.W.E.S.O.M.E
April 9, 2008 at 7:04 AM Josh MormannHoly Effing crap! NICE WORK ALL INVOLVED. AND EF THE NAYSAYERS!
April 9, 2008 at 7:18 AM AnonymousAwesome!!!
April 9, 2008 at 7:46 AM AnonymousYou've just raised a bar for the rest of us :)
Is this open source? E.g. could I put this on my own website?
April 9, 2008 at 7:47 AM UnknownЗачод!!
April 9, 2008 at 7:55 AM NicolasparExcelent Works, thanks!!!
April 9, 2008 at 8:04 AM AnonymousHoly hell. To do that in cross-browser compatible Javascript is something special indeed. Big props to you.
April 9, 2008 at 8:20 AM AnonymousCheck out http://TheGamersGuild.info
April 9, 2008 at 8:37 AM Francesco FracassiBrand spanking new. Be a part of the beginning of a huge site!
Huge!
April 9, 2008 at 8:41 AM Unknownthought it might be possible but not in 14kb, not even in 35kb...very cool!
April 9, 2008 at 8:47 AM AnonymousYOU OWE ME A MUSHROOM!!!
April 9, 2008 at 8:53 AM AnonymousSeriously though, this is amazing.
That's amazing! CompressorRater shows that if you served your JS gzipped you could get it down to ~7KB !
April 9, 2008 at 9:00 AM pambukI have to stop in order to jump :(
April 9, 2008 at 9:16 AM AnonymousGreat work (14kb!) but unplayable for me... I'm on Ubuntu 7.10, using Firefox (if that matters).
amazing.
April 9, 2008 at 9:24 AM AnonymousVery impressive, it's good to see people pushing limits on scripting.
April 9, 2008 at 9:36 AM AbhijeetReally impressive!
April 9, 2008 at 9:44 AM AnonymousI 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.
April 9, 2008 at 10:06 AM Anonymous3D 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 ...
NO MUSHROOM = FAIL!
April 9, 2008 at 10:16 AM Smokhow cool is that :)
April 9, 2008 at 11:59 AM Unknown14kb, you're pissing me. javascript chess with cpu opponent http://javascript.internet.com/games/javascript-chess-with-cpu-oppo.html
April 9, 2008 at 12:01 PM AnonymousAmazing, just amazing, you're a talented guy...
April 9, 2008 at 12:05 PM Anonymous®
Amazing!
April 9, 2008 at 12:10 PM jonserrYou are the best, javascrisching.
awesome,
April 9, 2008 at 1:17 PM pollakihey 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
para cuando el Mario 3? =P
April 9, 2008 at 2:04 PM AnonymousFantastico
April 9, 2008 at 2:24 PM Maria Andrea LenisYou are my new hero.
April 9, 2008 at 2:53 PM Anonymousawesome!
April 9, 2008 at 4:10 PM AnonymousWonderful!
April 9, 2008 at 4:20 PM ][][]I don't hear any music in Opera (9.27) though.
Very nice, sophisticated code!
April 9, 2008 at 4:44 PM MattAnother 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).
this is great, but there is a cheat. if you die you can keep on jumping up, but you cant move.
April 9, 2008 at 6:53 PM AnonymousImpressive, but not in the sense of size. 16kb of compressed JS is quite a lot of code...
April 9, 2008 at 7:10 PM Anonymousit loses a little of it's magic when considering the original mario, with all the bells and whistles, was only 40kb in total.
amazing stuff... kudos to your effort to squeeze things
April 9, 2008 at 7:21 PM rookie23wow nice i love it!
April 9, 2008 at 8:02 PM AnonymousIt's amazing!!!! nice job !!!
April 9, 2008 at 9:28 PM AnonymousHey,
April 10, 2008 at 12:32 AM Frankie!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.
It seems like the most of you have under estastinmated the power of javascript, there are some raytracers, lots of games and other stuff.
April 10, 2008 at 2:01 AM Anonymousyou 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.
Great application, man. Well done. Can't wait to see you do an online poker one.
April 10, 2008 at 2:31 AM AnonymousReally good work! Impressive!
April 10, 2008 at 2:37 AM AnonymousQuess
One word: WICKED!
April 10, 2008 at 2:41 AM David ShermanAWESOME!
April 10, 2008 at 5:06 AM AnonymousOne 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.
April 10, 2008 at 6:28 AM nitro2k01Other than that i LOVE it, great work.
I repeat what p01 said earlier. Nothing beats 3D Tomb II! It's a 4k JS game with 3D.
April 10, 2008 at 6:52 AM Anonymous@daniel thornbury
April 10, 2008 at 7:06 AM AnonymousImpressive, 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.
Happy!
April 10, 2008 at 7:30 AM AnonymousAt some point I want to revive my project at http://code.google.com/p/renderengine
April 10, 2008 at 8:25 AM AnonymousI'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.
I've seen more stuff in less ^_°
April 10, 2008 at 8:59 AM ValkinI might already know .theprodukkt
http://www.theprodukkt.com/kkrieger
First person Shooter in 96kb.
http://kk.kema.at/files/gfx/full1.jpg
Hey,
April 10, 2008 at 11:06 AM AnonymousI 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
Whoa !
April 10, 2008 at 12:19 PM AnonymousDamn... Compliments !
Pretty masochistic though ! :-)
Clap Clap Clap.
April 10, 2008 at 12:39 PM AnonymousI 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. :)
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 at 2:15 PM Anonymousmind blowing !
April 10, 2008 at 5:12 PM RaphaSantossux a lot...
April 10, 2008 at 5:41 PM Anonymousthe flash player is a very mucth better.
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.
April 10, 2008 at 5:55 PM AnonymousThat 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).
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).
April 11, 2008 at 7:48 AM Eat_My_Shortz@anonymous re: encoding - the encoding you selected will fail at ready.mobi.
Wow .. awesome in JavaScript!
April 11, 2008 at 8:44 AM AnonymousQuicktime for audio crashes my browser (FF2 on Windows). But maybe that's just me.
Non-audio version is fine.
hehe very cool
April 11, 2008 at 10:49 AM Unknownsince when can you go to the left in Super Mario Bros.?
April 11, 2008 at 11:44 AM Unknownbesides theres a bug when you go to the most left...
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 at 1:18 PM Anonymoustoedilly fotoshawped
April 11, 2008 at 6:49 PM ronzoxnunca sabré tanto java no me gustó tanto mario como para hacer eso... gran trabajo!!
April 11, 2008 at 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.
April 12, 2008 at 6:59 AM AnonymousTampoco me funciona en derivado de Safari...
(S60 Browser, javascript habilitado)
awesome!!
April 12, 2008 at 9:33 AM esquedeaquiaquihagan 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 at 9:42 AM Anonymousawesome
April 12, 2008 at 10:43 AM AnonymousWow!!
April 12, 2008 at 6:46 PM Mr.HydeAwesome guy!!
Great job!!
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 at 6:51 PM AnonymousExtremely neat, though by no means amazingly ground-breaking. (Sorry. ;-)
April 12, 2008 at 10:44 PM Lestat Malandro Porco Porto Alegre/RSThough 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.
uahu
April 13, 2008 at 10:04 AM Anonymousinsane.... absolutely insane... love it! let's port MAME to javascript :)
April 14, 2008 at 3:55 AM AnonymousThis Thing Rocks! :-)
April 14, 2008 at 6:38 AM JensemannPlease add a SPACE => Up Assignment for a
better Gameplay.
Really nice But you have a bug there. When Mario died you can still jump. :D
April 14, 2008 at 6:48 AM Mister PotatoThanks for this entertaining work
Jensemann
Amazing!!!
April 14, 2008 at 3:58 PM JamesVery impressive.
April 14, 2008 at 8:29 PM Anonymousnice dude!!
April 14, 2008 at 9:17 PM nagoon97 This comment has been removed by the author. April 15, 2008 at 2:46 AM Anonymousnever thought that that game can be done in javascript...
may i link your page to my blog???
Great work!
April 15, 2008 at 8:50 AM UnknownTwo suggestions: 1. a flag and castle at the end, and 2, perhaps a piranha plant or a koopa troopa besides the goombas.
Not dead yet!!!
April 15, 2008 at 10:02 AM AnonymousWhen 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.
yeah n1
April 15, 2008 at 1:01 PM AnonymousIts really but. May be a little bit to easy...
April 15, 2008 at 3:37 PM Anonymouswonderfull work.
April 15, 2008 at 10:09 PM AnonymousThat is SO COOOL!!!!! Loved running it on firefox in 64bit linux; Amazing that you did this in Javascript.
April 16, 2008 at 5:50 PM Anonymousdamnit! halfway through the game and still no mushroom! no flag at the end of the stage either! =) really nice though
April 17, 2008 at 12:02 AM AnonymousI played the whole thing, getting every coin. Worked great (FF2, XP).
April 17, 2008 at 4:29 AM Jay BoseAmazing work, what are you doing next?
Very creative, great job!
April 17, 2008 at 1:15 PM Anonymoussuparb
April 17, 2008 at 10:19 PM RyanNice work
April 18, 2008 at 1:40 AM Anonymoushttp://www.littleking.jp
Hi sorry but no music on FF 2.0. Collision good but commands OK. Fantastic game in 14KB and no external media...
April 18, 2008 at 3:04 AM AnonymousAntonio
Impressive. Never underestimate the power of Javascript. :D
April 18, 2008 at 5:46 AM AnonymousIMPRESSIVE!!
April 20, 2008 at 10:34 AM Anonymous再現はすばらしいですが不具合はあるようです。
April 21, 2008 at 3:51 PM AnonymousThe reappearance is wonderful but seems to have a problem.
Lavoro Davvero Molto Interessante.
April 22, 2008 at 9:03 AM AnonymousI love Mario Bros
April 23, 2008 at 2:22 AM AnonymousSome of the people that came here really need to learn to read:
April 24, 2008 at 7:39 PM Unknown"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."
I WONDER WHY THERE AREN'T ANY MUSHROOMS DUR NOW I'M GOING TO THROW THE WORD "FAIL" AROUND LIKE A RETARDED 4CHANNER
But in all serious, nice work. This amused me. :)
Quite nifty!
April 24, 2008 at 10:18 PM