fogleman / Craft

A simple Minecraft clone written in C using modern OpenGL (shaders).
http://www.michaelfogleman.com/craft/
MIT License
10.39k stars 1.39k forks source link

Make light sources an actual block #124

Open Aaron1011 opened 10 years ago

Aaron1011 commented 10 years ago

I think it would be nice if light source corresponded to a placeable block/item, similar to torches in Minecraft. This could allow additional decoration. @fogleman: What do you think?

fogleman commented 10 years ago

I liked having signs writable on any block, hence I also like the flexibility in allowing any block to be a light source.

Aaron1011 commented 10 years ago

@fogleman: Okay. What about a texture that is applied to an existing block, like the way signs work? It would also make it clearer which blocks are actually light sources.

satoshinm commented 7 years ago

Although having any blocks act as a light source, or a sign, is a nifty feature, I think having distinct blocks with these capabilities could still be useful (especially in a potentially future "survival mode" where these blocks would be acquired through progressive gameplay), perhaps something like:

satoshinm commented 7 years ago

If there's interest, I added a placeable light block (call it "glowing stone", reusing the stone texture but with higher exposure) in my fork, straightforward: https://github.com/satoshinm/NetCraft/commit/70d2c02d341ea96773866f085d04fdf3161b8668 (adds an is_illuminated function to items.c, called in set_block and if returns nonzero it in turn calls set_light).