Live data from Hacker News

1k minecraft

js1k.com

31–34 of 34 posts

Re: 1k minecraft

#31
post #21
post #16

Earlier quoted context omitted.

Why would it be any more difficult than rendering the water?

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.

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

#32
post #25

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.

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

#34
post #32
post #25

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.

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.

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.
Post reply on HN