News for hackers. Stuff that matters.
Re:1k minecraft by VieElm on Tuesday November 25, 2014 @03:02PM (#8659393)
The creator wrote up a blog post on his entry:

http://birdgames.nl/2014/04/js1k-post-mortem-minecraft/

Lots of very interesting details, but surprised to see setInterval instead of requestAnimationFrame

Re:1k minecraft by emsy on Tuesday November 25, 2014 @05:04PM (#8660005)
maybe because it saves a few bytes? I don't think performance advantages were the reason.
Re:1k minecraft by networked on Tuesday November 25, 2014 @03:21PM (#8659482)
Very nice! The texturing and lighting are what really makes this demo. Unfortunately, it only displays correctly for me in Firefox Developer Edition, not FF 33.0, in which the picture is skewed: http://i.imgur.com/7i74m36.jpg.

If you're into tiny cube-based 3D engines also have a look at this demo for the Lobster programming language (http://strlen.com/lobster): http://i.imgur.com/ZZWFkXn.jpg. Its entire source code fits in the screenshot.

Re:1k minecraft by kazinator on Tuesday November 25, 2014 @11:42PM (#8661129)
"tiny cube-based" -- is that the same as "voxel based"?
Re:1k minecraft by andywood on Wednesday November 26, 2014 @12:08AM (#8661165)
I'd say it depends on context. Historically, voxels have been analogous to pixels. This has been somewhat blurred by Minecraft, and the widespread reporting on and discussion of it.

At first, the cubes in Minecraft are analogous to tiles (as in the tiled backgrounds or maps of 2D games), but when you use them to build models and things, then they become like large voxels.

Re:1k minecraft by acomjean on Tuesday November 25, 2014 @04:00PM (#8659683)
FWIW,

Firefox 33.1 (Mac) seems to work fine....

Re:1k minecraft by linuxlizard on Tuesday November 25, 2014 @04:18PM (#8659777)
Dagnabbit. 33.1.1 not working for me. Chrome works. (OSX 10.9.5)
Re:1k minecraft by Andrenid on Wednesday November 26, 2014 @02:28AM (#8661418)
FF 33.1.1 on OSX 10.10.1 works fine for me.
Re:1k minecraft by chrisan on Thursday November 27, 2014 @01:57PM (#8668448)
Both 33.1 and 33.1.1 (noticed updated when I went to about) on OSX 10.10.1 were skewed for me
Re:1k minecraft by jstanek on Tuesday November 25, 2014 @05:09PM (#8660031)
FF 33.1 on Windows 8.1 isn't working for me either.
Re:1k minecraft by sz4kerto on Tuesday November 25, 2014 @03:32PM (#8659546)
Nice - though I must say this kind of graphics (with music..) was done in similarly sized 1k/4k assembly demos -- https://www.youtube.com/watch?v=G1Q9LtnnE4w
Re:1k minecraft by Jare on Tuesday November 25, 2014 @05:39PM (#8660199)
Formally speaking, both Descent and Minecraft (inspirations for each respective intro) are based on cubes, but I don't think there are many more similarities. In any case, thanks for that blast from the past!
Re:1k minecraft by bshimmin on Tuesday November 25, 2014 @03:02PM (#8659394)
Impressive!

I can't help but love things like this, if for no reason other than that it makes programmers look like bona fide magicians (and thus justifies exorbitant day-rates).

Re:1k minecraft by libria on Tuesday November 25, 2014 @03:32PM (#8659548)
Sort of. Every field has its wizards and it’s usually easy to tell them apart from the apprentices.
Re:1k minecraft by sysk on Tuesday November 25, 2014 @10:18PM (#8660975)
I wonder if a few bytes could be saved by encoding the source in 7bit ascii, decoding and running through eval. Not sure if that makes sense.
Re:1k minecraft by unwind on Wednesday November 26, 2014 @08:45AM (#8662236)
I don't think 7-bit ASCII behaves the way you think. It's typically the same 8-bit bytes but with the most significant bit clear. So, there's no saving to be had, it doesn't "contract" the bits across neighboring bytes.
Re:1k minecraft by sysk on Saturday November 29, 2014 @04:18PM (#8675116)
Yes but that's exactly what I meant. ASCII wastes 1 bit by character (the 8th bit isn't used). What if the source was encoded in such a way that it is "contracted" (the unused bit of the first character is the first bit of the second character, etc). Sorry for the 3 days late reply. The decoding function would have to be very small to make it worth it though.
Re:1k minecraft by monk_e_boy on Tuesday November 25, 2014 @03:05PM (#8659410)
Doesn't work in FF 33.1.1 on windows 8 -- each line of the image/video is shifted so the result looks \\\\\\\
Re:1k minecraft by tech-no-logical on Tuesday November 25, 2014 @03:31PM (#8659544)
same on FF34 / win 7.

added image : http://imgur.com/9xK3JoK

Re:1k minecraft by im3w1l on Tuesday November 25, 2014 @03:59PM (#8659676)
Working for me on FF 33.1 win 8

EDIT: and FF 33.1.1

Re:1k minecraft by debacle on Tuesday November 25, 2014 @03:24PM (#8659494)
It's working for me in FF 33.1.1 on Windows 7.
Re:1k minecraft by simonbh on Tuesday November 25, 2014 @04:02PM (#8659689)
it also works for in in FF 3.1.1 in Arch Linux
Re:1k minecraft by frtab on Tuesday November 25, 2014 @05:03PM (#8660002)
Same for me on Iceweasel 31.2.0 on Debian
Re:1k minecraft by Aardappel on Tuesday November 25, 2014 @06:13PM (#8660365)
This one in Lobster, roughly the same amount of code, no textures, but is interactive (you can actually mine & build): http://i.imgur.com/ZZWFkXn.jpg
Re:1k minecraft by akx on Wednesday November 26, 2014 @02:26AM (#8661416)
What are the sizes of `vec.lobster` and `3dhelpers.lobster` though...
Re:1k minecraft by FraKtus on Tuesday November 25, 2014 @10:10PM (#8660959)
Many other are sweet, this one uses WebGL and is very nice http://js1k.com/2014-dragons/demo/1868 (tested on Chrome)...
Re:1k minecraft by comrh on Tuesday November 25, 2014 @03:27PM (#8659516)
If I remember correctly the lava is the hardest thing to efficiently render, correct? Cool regardless.
Re:1k minecraft by talmand on Tuesday November 25, 2014 @04:46PM (#8659912)
Why would it be any more difficult than rendering the water?
Re:1k minecraft by comrh on Tuesday November 25, 2014 @05:43PM (#8660222)
Light comes off of it. So it moves, flows and such like the water but it also has to render the lighting effects relative to all that. I could be wrong though, I know the water is difficult to render as well.
Re:1k minecraft by simias on Wednesday November 26, 2014 @03:45AM (#8661561)
I haven't looked at the code of this demo but it seems there's no dynamic lighting at all, the "lighting" of the face of each cube depends only on which side it's facing as far as I can tell.

You can see that the underside of trees is pretty luminous for instance.

Re:1k minecraft by iaw on Wednesday November 26, 2014 @12:25AM (#8661199)
I don't think I've ever seen this site before. It's fantastic
Re:1k minecraft by leeluolee on Tuesday November 25, 2014 @07:57PM (#8660709)
Incredible!!