10 ms·
Lemmings 404 page
- JGNWW 14y agoI got 255. I'm the worst.
- ComputerGuru 14y agoHalf on-topic, half off-topic: WebGL Lemmings port: http://webglgaming.com/lemmings/index.php http://webglgaming.com/lemmings/index.php
- funkaster 14y agoDHTML lemmings? DHTML? is this from 1998? :D - Oh, sorry... it says 2004. I don't think this is WebGL. [edit] format
- Cthulhu_ 14y agoActually, that is a copy of DHTML lemmings from before the age of WebGL, Ajax, CSS sprites (alistapart only came up with an article about CSS sprites a year later), html5, or any of that fancy modern stuff kids these days play with. The original is at http://www.elizium.nu/scripts/lemmings/ http://www.elizium.nu/scripts/lemmings/. And background info / blogpost, written seven years later by the author: http://crisp.tweakblogs.net/blog/3881/dhtml-lemmings-primer.html http://crisp.tweakblogs.net/blog/3881/dhtml-lemmings-primer....
- salad_fingers 14y agoHere's a more up-to-date version which uses HTML5 and AJAX - http://bombsite.org/jslems/ http://bombsite.org/jslems/
- dougk16 14y agoObviously this is taken to a fun extreme, but it reminds me of a good practice: error pages should be treated as yet another way to engage with your visitor. Too many times I see people relying on the ugly default error pages provided by a web framework.
- rsingla 14y agoNot sure if I'd count it as "best ever" but it was amusing. Definitely a subtle way to just have fun.
- mitchi 14y agobest 404 page i've seen ! I ended up playing. Code is pretty neat. I thought you'd need more lines than this. http://www.romainbrasier.fr/js/lemmings.js http://www.romainbrasier.fr/js/lemmings.js
- hk__2 14y ago`this.img=eval($('.last'));` Why is he using eval here?
- vizon 14y agoI have no clue, and it's bothering me. MDN says: >> If the argument of eval() is not a string, eval() returns the argument unchanged. I copied the code and tried it both ways, saw no apparent difference. I don't think it does anything.. I could be wrong...
- deleted 14y ago[deleted]
- obituary_latte 14y agovar ims = document.getElementsByTagName('img'); var event = document.createEvent("MouseEvent"); event.initMouseEvent("mouseover", true, true, window); for(var i=0;i<ims.length; i++){ ims[i].dispatchEvent(event); } :(
- tlrobinson 14y ago$("img").mouseover()
- obituary_latte 14y agoWait...jQuery is available?? double :(
- redidas 14y agoWas this double :( a response to the fact that jQuery is available and shouldn't have needed to be? Or because you just wrote 6 lines of javascript when you could have written 1? I read it as the first, and had this immediate reaction: - I'd rather write the 1 line of jQuery over the 6 in vanilla javascript - I'd rather read the 1 line of jQuery to understand what is going on instead of the 6 in vanilla javascript - jQuery didn't actually impact your experience much... as you didn't realize it might even be available.
- waxjar 14y agoI'd take the 6 lines of vanilla javascript any day over loading the full jQuery library to get away with writing only a single line. If jQuery isn't use anywhere else on the page, that is.
- FuzzyDunlop 14y agowindow.setInterval(function() { $('img').mouseover(); }, 500); So you can catch the ones that haven't been created yet.
- oboizt 14y agoWay better than a simple "Oops, page not found, blah, blah, blah"
- __abc 14y agoI feel bad the lemmings splat and die :/
- thibaut_barrere 14y agoYou could write a script to save them all!
- __abc 14y agoI wrote that prior to realizing it was a game :) I can now save a lot of them. I feel much better.
- timinman 14y agoNone died on my watch: var saveTheirSouls = function() { $('img').trigger('mouseover'); setTimeout( function() { if ($('img').length > 1) { return saveTheirSouls() } else { return false; } }, 1000); }; saveTheirSouls();
- martin-adams 14y agoOne of my favourite 404 pages was this: http://www.homestarrunner.com/systemisdown.html http://www.homestarrunner.com/systemisdown.html
- MichaelApproved 14y agoThat's not not a 404 page (missing page). It seems like it's supposed to be a 500 page (server error) or 503 page (unavailable) but it incorrectly returns a 200 status which means everything is OK. Edit: Corrected the 50X error information thanks to the responses below.
- fixedd 14y ago500 isn't server busy, it's server error.
- eknkc 14y agoI'd say being busy can be considered as an error. 503 (Unavailable) is more suitable for that I guess.
- throwaway54-762 14y agoYeah, IIRC 5-8 years ago Apache used to return 500 when PHP scripts timed out... hence association with "busy."
- Hello71 14y agoIt is correct for a request for a page named "error" to result in a 200 OK status meaning that the page named "error" was successfully retrieved. It would not be correct for a request for a page named "error" to return 404 Not Found if the page named "error" was retrieved successfully. It would also not be correct for a request for a page that does not exist to return the page named "error" with a 200 OK status.
- MichaelApproved 14y ago
- freethejazz 14y agowell, that's the longest amount of time I've spent on a 404 page...
- zopticity 14y agoSo many lemmings. Gotta catch 'em all!
- rplnt 14y agoIt's much easier if you resize the tab - they all fall in a nice little column (and it doesn't change if you resize it after the load).
- foxbunny 14y agoThis is better than any of the solutions using JavaScript!
- iMark 14y agoAs much as I love the 404, even more so I adore the immediate response of the hacker news community to find the best way to save all the lemmings. Bravo!
- tantalor 14y agoSolid 6 FPS in Chrome :(
- bryceneal 14y agoin chrome console: winCount = count = 404; while ($('img').length > 0) { $('img').remove(); }
- Cushman 14y agoI've said it before, but: What's the deal with 404 pages? If the content has moved, I should get a 30x redirect. If the server has a way of guessing what I wanted, I should get 300 Multiple Choices. If the server knows that what I'm looking for isn't anywhere, I should get 410 Gone. 404 is supposed to mean that the server has no idea what I'm looking for, no idea how to find it, no idea where to look. In that case, I don't want a page to load. I don't want a tab to open. I definitely don't want to download a Flash game, or a 500kb JPEG, or infinity many Lemming images. I just want my browser to mark that link as dead and let me know in as unobtrusive a way as possible, "Hey, you clicked on some bullshit!" Let me either search the domain or click something else. Not to rag on creative 404s, and I know it's a bit of a pipe dream. Just a peeve of mine.
- watty 14y agoWell I do think that "404" should be more visible but everything else is just part of design. It's like complaining that blogs should be just text or that CSS3 is pointless. It's design, it's interesting, I like it.
- TheZenPsycho 14y agoif you feel the point of "design" is simply to make something look pretty, or interesting, then you missed the point.
- philip1209 14y agoI use Cloudflare's 404 pages feature, which incorporates possible intended destinations. I haven't had a chance to make a custom 404 page (e.g. with Google's 404 widget), so this gets the job done. e.g. http://www.philipithomas.com/does_not_exist http://www.philipithomas.com/does_not_exist
- cypher543 14y agoIs that page customizable in any way? My first impression is that it looks like a parked domain landing page, which I instinctively ignore and close immediately.
- adrockdust 14y agoWhat would you say if I told you I saved 396 - manually?
- drhodes 14y agoI'd say you used a tablet.
- zaius 14y agoSave them all! (firefox only) MutationObserver(function(event) { $(event[0].addedNodes[0]).mouseover(); }).observe($('body')[0], {childList: true}); $('img').mouseover();
- jasonkostempski 14y agoMuch cooler than mine. I just ran $('img').each(function() { $(this).mouseover(); }); every few seconds. Something cool should have happened.
- chadscira 14y agopretty awesome, this works in chrome new WebKitMutationObserver(function(event) { $(event[0].addedNodes[0]).mouseover(); }).observe(document.body, {childList: true});
- gravitystorm 14y agoI just resized my browser to be about an inch wide, and then they all fall in a straight line past the cursor. I guess you could call that a workaround :-)
- SonicSoul 14y agohmm... i was planning to run out and buy a taller monitor, but your workaround just saved me hours!
- skiplecariboo 14y ago
- andrewflnr 14y agoThis is really hard on an iPad. You can trigger a mouse over with a light touch, but it's not reliable.
- rjzzleep 14y agoDUDE, do you mind me taking this page? :D
- housey 14y agoYou can't save them all! :|
- deleted 14y ago[deleted]
- snu 14y agoGreat page, only thing that its missing is the nuke button!
- krizan 14y agoTested in Chrome Version 24.0.1312.52 m var savedCount = 0; var saveFromDeathInterval = setInterval(function(){ for(var i=0;i<tabLemmings.length;i++){ var lem = tabLemmings[i]; if(lem.etat == 'tombe'){ lem.etat = 'para'; lem.paraOpen(); savedCount++; } } if(savedCount == 404) { clearInterval(saveFromDeathInterval); } },2000);