[HN Gopher] City in a Bottle - A 256 Byte Raycasting System
___________________________________________________________________
City in a Bottle - A 256 Byte Raycasting System
Author : bubblehack3r
Score : 244 points
Date : 2024-05-20 14:46 UTC (21 hours ago)
(HTM) web link (frankforce.com)
(TXT) w3m dump (frankforce.com)
| EpiMath wrote:
| that's a pretty fun read.
| immibis wrote:
| Remnants by Alcatraz - similar 256-byte MS-DOS demo - youtube
| link included: https://www.pouet.net/prod.php
|
| I think this one is more impressive for being in Javascript,
| which often has worse density than 16-bit x86 machine code.
| elvis70 wrote:
| I think the correct link is:
| https://www.pouet.net/prod.php?which=96536 The source code is
| also included
| immibis wrote:
| I'm a moron. Somehow I read "width" and deleted the
| irrelevant parameter because people have different screen
| sizes and the site should auto-detect instead of using my
| one.
| beagle3 wrote:
| Not necessarily worse density - variables are 1 byte names vs
| 2+ byte load instructions (often 3).
|
| But the thing that gives JS a huge advantage here is the
| "standard (dweet) library" which has sin/cos/fill/line etc
| whereas x86 bios has "switch mode" and then it's just a pixel
| array.
| briansm wrote:
| 'Spongy' does something similar in 128 bytes, half the size.
|
| https://www.pouet.net/prod.php?which=53871
|
| http://www.youtube.com/watch?v=36BPql6Nl_U
|
| The name comes from the 'Menger Sponge' fractal it's based on:
|
| https://en.wikipedia.org/wiki/Menger_sponge
| peter_d_sherman wrote:
| Related:
|
| How [Atari 2600] Pitfall Builds its World:
|
| https://evoniuk.github.io/posts/pitfall.html
|
| Procedural Generation [Elite, early 8-bit game]:
|
| https://procedural-generation.tumblr.com/post/112509130817/e...
|
| Procedural Generation [general article]:
|
| https://en.wikipedia.org/wiki/Procedural_generation
|
| Somewhat related:
|
| Lazy Evaluation [from Functional programming (FP) languages]:
|
| https://en.wikipedia.org/wiki/Lazy_evaluation
|
| Random observation:
|
| If a given raytracing algorithm
| (https://en.wikipedia.org/wiki/Ray_tracing_(graphics) only
| evaluates visible points for a 2D image created as a view from a
| set of 3D data -- then that's sort of similar to the FP concept
| of Lazy Evaluation, that is, "delay the evaluation of an
| expression until its value is needed"...
|
| Which in turn, prima facie, seems at least cursorily related to
| _" Observation collapses the wave function":_
|
| https://en.wikipedia.org/wiki/Wave_function_collapse
| elijahbenizzy wrote:
| that's spectacular -- the information density we perceive is off
| he charts for such a small amount of code.
|
| Makes me wonder if LLMs aren't the best way to model the world at
| all...
| thfuran wrote:
| Why would you think they are?
| nabla9 wrote:
| From the same author: 1K Pinball Game in JavaScript
| https://frankforce.com/lu1ky-pinball-code-deep-dive/
| tedunangst wrote:
| This is very cool, but it's a bit unfortunate the loop runs
| continuously the entire time I'm trying to read the article and
| overheating my laptop.
| TazeTSchnitzel wrote:
| Oh so that's why my phone felt unusually warm the last few
| minutes!
| rossant wrote:
| That was amazing.
| taylorius wrote:
| Oh I like that! That's awesome, nice one man!
| codetiger wrote:
| This is amazing, both the work and the article
| Marazan wrote:
| If you like this you'll love #tweetcart on Twitter.
|
| Tweet sized programs for the Pico-8 virtual console.
___________________________________________________________________
(page generated 2024-05-21 12:00 UTC)