Live data from Hacker News

Show HN: A simple infinite world in WebGL

erkaman.github.io

41–50 of 61 posts

Re: Show HN: A simple infinite world in WebGL

#41
post #30
post #17

Earlier quoted context omitted.

Just arbitrary hand-tweaking. It was chosen because I though it looked good. When doing procedural generation like this, you basically just tweak constants 'til it looks good. There's no deeper reason behind it.

I'm hoping that this kind of interaction will be part of one of our first encounters with aliens, sometime in the far future. The aliens would ask why we had done something a certain way and the human answer would be: "Because it looks good".

Another example: bootstrap

Re: Show HN: A simple infinite world in WebGL

#42

There seems to be some missing triangles after a while (10-20 sec.) on Chrome on OSX Are these caused by some z-buffer issues caused by increasingly large coordinates?

It does looks like float32 errors from moving the camera too far in a scene. Seen it before while trying to create an infinite city in WebGL. I ended up creating a world offset for each sector, and every time the camera's position was more than a sector length, reposition the camera in the scene and adjust the sector offsets. May not be the best solution, but it was quick and worked.

You can use fixed-point math to avoid this, but it doesn't get all the cool language support.

Re: Show HN: A simple infinite world in WebGL

#43
post #40
post #2

In this demo, I implemented an infinitely continuing, vaporwave-like world in WebGL. If you can't run it for some reason, a recorded gif of the demo can be found here: https://github.com/Erkaman/wireframe-world . As for the implementation, it is not very difficult stuff; I divide up the world into chunks(just like in Minecraft), and as the camera traverses the world, the chunks that become out of range are thrown awa…

Might I recommend some fine CC-BY (vapor|synth|retro)wave music to accompany it? * https://stratfordct.bandcamp.com/album/airglow-memory-bank * http://stratfordct.bandcamp.com/album/stratford-ct-melior * http://stratfordct.bandcamp.com/album/stratford-ct-lux-aesti... * http://stratfordct.bandcamp.com/album/stratford-ct-secret-se... * http://stratfordct.bandcamp.com/album/stratford-ct-1-yr-anni... * http://stratfordct…

Thanks for these! My personal favorite retro-synth mix right now: https://soundcloud.com/quicksexfm/qsfm25

Re: Show HN: A simple infinite world in WebGL

#45
post #2

In this demo, I implemented an infinitely continuing, vaporwave-like world in WebGL. If you can't run it for some reason, a recorded gif of the demo can be found here: https://github.com/Erkaman/wireframe-world . As for the implementation, it is not very difficult stuff; I divide up the world into chunks(just like in Minecraft), and as the camera traverses the world, the chunks that become out of range are thrown awa…

Thanks for posting. This brings back a lot of fond memories for me. The good old days when I was still teaching myself DirectX and OpenGL. Copying and updating ancient demoscene tutorials. These sorts of vector terrain flythroughs, infinite wormholes, looping roller coasters, dancing sinewave text animations and eternally zooming julia sets were my bread and better for understanding geometry and shading. The Moment of Zen here is, as you noted, how little actual code is required to build a world. Keep going ;)

Re: Show HN: A simple infinite world in WebGL

#46
post #2

In this demo, I implemented an infinitely continuing, vaporwave-like world in WebGL. If you can't run it for some reason, a recorded gif of the demo can be found here: https://github.com/Erkaman/wireframe-world . As for the implementation, it is not very difficult stuff; I divide up the world into chunks(just like in Minecraft), and as the camera traverses the world, the chunks that become out of range are thrown awa…

Thanks for posting. This brings back a lot of fond memories for me. The good old days when I was still teaching myself DirectX and OpenGL. Copying and updating ancient demoscene tutorials. These sorts of vector terrain flythroughs, infinite wormholes, looping roller coasters, dancing sinewave text animations and eternally zooming julia sets were my bread and better for understanding geometry and shading. The Moment o…

Indeed, keep going, and you may reach this level of awesome:

https://www.youtube.com/watch?v=_YWMGuh15nE

(Quite realistic terrain generated by a 4 kilobyte binary, along with music. Source code and its discussion here: https://news.ycombinator.com/item?id=11848097)

Re: Show HN: A simple infinite world in WebGL

#47
post #2

In this demo, I implemented an infinitely continuing, vaporwave-like world in WebGL. If you can't run it for some reason, a recorded gif of the demo can be found here: https://github.com/Erkaman/wireframe-world . As for the implementation, it is not very difficult stuff; I divide up the world into chunks(just like in Minecraft), and as the camera traverses the world, the chunks that become out of range are thrown awa…

Thanks for posting. This brings back a lot of fond memories for me. The good old days when I was still teaching myself DirectX and OpenGL. Copying and updating ancient demoscene tutorials. These sorts of vector terrain flythroughs, infinite wormholes, looping roller coasters, dancing sinewave text animations and eternally zooming julia sets were my bread and better for understanding geometry and shading. The Moment o…

Inigio Quillez' homepage has lots of cool articles about this kind of stuff, so please check it out: http://www.iquilezles.org/www/index.htm

Re: Show HN: A simple infinite world in WebGL

#48
post #40

Earlier quoted context omitted.

Might I recommend some fine CC-BY (vapor|synth|retro)wave music to accompany it? * https://stratfordct.bandcamp.com/album/airglow-memory-bank * http://stratfordct.bandcamp.com/album/stratford-ct-melior * http://stratfordct.bandcamp.com/album/stratford-ct-lux-aesti... * http://stratfordct.bandcamp.com/album/stratford-ct-secret-se... * http://stratfordct.bandcamp.com/album/stratford-ct-1-yr-anni... * http://stratfordct…

Thanks for these! My personal favorite retro-synth mix right now: https://soundcloud.com/quicksexfm/qsfm25

I blindly clicked this at work. Big mistake.

Re: Show HN: A simple infinite world in WebGL

#49
post #40
post #2

In this demo, I implemented an infinitely continuing, vaporwave-like world in WebGL. If you can't run it for some reason, a recorded gif of the demo can be found here: https://github.com/Erkaman/wireframe-world . As for the implementation, it is not very difficult stuff; I divide up the world into chunks(just like in Minecraft), and as the camera traverses the world, the chunks that become out of range are thrown awa…

Might I recommend some fine CC-BY (vapor|synth|retro)wave music to accompany it? * https://stratfordct.bandcamp.com/album/airglow-memory-bank * http://stratfordct.bandcamp.com/album/stratford-ct-melior * http://stratfordct.bandcamp.com/album/stratford-ct-lux-aesti... * http://stratfordct.bandcamp.com/album/stratford-ct-secret-se... * http://stratfordct.bandcamp.com/album/stratford-ct-1-yr-anni... * http://stratfordct…

Thank you for the links! Since I did not really know where to find CC-licensed music, I did include any music.

Re: Show HN: A simple infinite world in WebGL

#50

Earlier quoted context omitted.

Thanks for posting. This brings back a lot of fond memories for me. The good old days when I was still teaching myself DirectX and OpenGL. Copying and updating ancient demoscene tutorials. These sorts of vector terrain flythroughs, infinite wormholes, looping roller coasters, dancing sinewave text animations and eternally zooming julia sets were my bread and better for understanding geometry and shading. The Moment o…

Indeed, keep going, and you may reach this level of awesome: https://www.youtube.com/watch?v=_YWMGuh15nE (Quite realistic terrain generated by a 4 kilobyte binary, along with music . Source code and its discussion here: https://news.ycombinator.com/item?id=11848097 )

The author then went on to produce a WebGL version in ShaderToy: https://www.shadertoy.com/view/MdX3Rr

He also wrote ShaderToy...

Post reply on HN