Hacker News new | past | comments | ask | show | jobs | submit login
The Vanishing Of Ashlar: 4kb demo using GPU for sound and pathtracing (demozoo.org)
201 points by blopeur on May 26, 2020 | hide | past | favorite | 44 comments



I know that a huge part of the demoscene culture is keeping your trade secrets close, but I'd love to see a YouTube playlist where authors or people with significant graphics experience do in-depth teardowns. Those of us like myself who only take a passing interest from afar are still blown away by how amazing results of demos like "elevated" from 2009 [1]. I've heard Iñigo Quílez, but I am curious if there are people interested in doing teardowns of winners moreso than elementary concepts (although of course the latter is much more applciable outside of the demo scene).

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


Do demosceners keep secrets like that? I only know of the ones who publish super detailed blogs about techniques, because... those are the ones I read. E.g. https://trixter.oldskool.org/2015/04/07/8088-mph-we-break-al... And a much more recent one, video here (I recommend watching the chat replay! Should start ~ 7h02m40s) https://www.twitch.tv/videos/589179638?t=7h02m40s and blog post http://www.sizecoding.org/wiki/Memories


Yes, the demoscene and gamedev culture is the antithesis of the FOSS one.

That was always the best thing about old days demoscene, specially at the parties, having one group proving that something deemed impossible on platform X was actually possible, and then having other discovering how they might have done it, and topping it with something even better.

The game dev culture evolved from the demoscene.

Nowadays due to the FOSS influence, there are some people sharing, but they are mostly the exception to the rule.


> The game dev culture evolved from the demoscene.

I'm not sure that's the case. The demoscene really started with the Amiga in the mid 80s while game development was already its own thing. Maybe they influenced each-other but I wouldn't say one evolved from the other.


It actually started on the C64, as a by-product of game cracking. People would first add their "handles" into cracked games, then some small intros before the game. These intros soon became competetive, and were made stand-alone, known as demos. There was some overlap of game and demo-scene, but not much until around 1992 or so, on the Amiga.


I'd say that's correct these days, with one exception: DICE came from The Silents (TSL), who were well known in the Amiga scene.

https://en.wikipedia.org/wiki/DICE_(company)

Back in the Amiga days there did seem to be a bit more migration of ex-demo coders becoming game developers. Probably Team17 were the best known.


I'd disagree. Gamedev may be closed-source, but most developers (ea being a notable exception, i think?) release white-papers, and do presentations concerning technical and workflow innovations they've achieved, and make them available to the wider industry without patent.

The papers tend to cover everything from general implementation, to details such as cache optimizations they discovered later on in development. If you reach out to the devs over twitter, they're often more than happy to answer any questions that you may have.

Not open by foss plug-and-play standards, certainly. But technologically, they're absolutely open.


Actually EA has released a lot if interesting stuff in recent years.

Frostbite technicaly solutions: https://www.ea.com/frostbite/news Rendering research papers: https://www.ea.com/seed/publications


Most of those presentations are available via IGDA membership and GDC attendance.

You also don't get to learn about anything that is game console related unless you get access to the Nintendo, Sony, Microsoft, Google internal dev forums.

Finally, yes there is stuff like GPU and Game Gems book series, but usually when one mentions that, many seem allergic to buy such books at 50+ € a piece.


Ferris does awesome and in-depth breakdowns of demos/tools he built:

https://www.youtube.com/channel/UC4mpLlHn0FOekNg05yCnkzQ/pla...


Here's a great explanation of the history and techniques in the "Logon's Run" [1] demo for Amstrad CPC:

http://norecess.cpcscene.net/the-elders-scrollers.html

[1] https://floooh.github.io/tiny8bit/cpc-ui.html?file=cpc/logon...


A lot of sceners in the size competition space work quite openly via e.g. https://www.shadertoy.com/

Most of the visuals in a Windows 4k demo are going to lie in the shaders these days anyway.

For smaller sizes, like 256b to 32b the source isn't going to be significantly more readable than a disassembly.


For those who haven't seen his work already: https://iquilezles.org/index.html


I enjoy reading his blog as well. One of my favorite posts is:

https://www.iquilezles.org/blog/?p=4765

"Though – at some level, all facts that you know are untrue. 1. To a toddler, Mickey Mouse dancing in a film is a character that undoubtedly exist in front them. 2. But that is false, everybody knows a film is just lots of “images”, right? 3. Well, that’s false too, to a nerd images are “a matrix of tiny colored squared pixels” 4. But that is false too, a professional programmer knows pixels are not squares but point-samples trying their best at filtering an analog signal” So, while all are partial truths in a given context, they are also false at the next level of understanding.

These conflicts of false truths usually gets resolved easily: most of us rarely enjoy knowing more than one or two levels of truth to any particular topic anyways, and ignorance makes happiness. On the other hand, an experienced communicator can adjust her speech and pick the right truth based on the audience she’s talking to, assuming there’s little variance in the audience’s profiles.

But, what happens when something needs to be communicated to a huge audience of varying levels of education or interest in a topic that is important to everybody? Say a nation wide message. When you address a disparate audience of millions that need an explanations, how do you choose the level of reality you going to operate in; which of all the false truths are you going to employ to convey your message?"


https://directtovideo.wordpress.com/ is another excellent demoscene "in-depth explanations" blog.


Some of the larger demoparties will often have breakout sessions where sceners provide talks on how they do what they do.



NuSan (https://twitter.com/NuSan_fx) does regular livestreams where he writes a shader from scratch in a couple of hours. They're always impressive and you can learn a lot from seeing his process. He also puts the code for his work up on Shadertoy which is really helpful.


Inigo Quilez does similar things on his youtube channel [1] and site [2].

[1] https://www.youtube.com/channel/UCdmAhiG8HQDlz8uyekw4ENw

[2] http://iquilezles.org



I do wonder how much my dislike of and inability to learn from video tutorials shuts me off from some wonderful content.

But try as I might I just can't focus for more than 30 seconds and I can feel my irritation rising and my desire to find some non-spoken version of the same material increasing.


Especially agree when it’s a ten minutes of talking and fumbling around on what really should’ve been maybe three photos and three sentences in a blog post. Go and watch almost any video on building or fixing electronics and you’ll see what I mean.


How much functionality does a demo like this get for free in addition to its own 4KB of code? For example, do modern GPUs have rich functions like createAmazingFractalGeometry() which these demos then piece together?


It's usually quite small--fractal geometry can be very succinctly described in a parametric way. The mandelbrot set can be described with just a small equation and a range of values to display.

They're not getting much from the GPU at all. Procedural modelling Houdini style is very common and you will find that algorithms to describe models/textures are often quite small, especially when compressed.

These days we do a lot of procedural generation of content, but then we don't make the user re-generate it because it does have a performance penalty--GPUs have plenty of RAM and tons of bandwidth, so it usually doesn't make sense.

source: Did some dev work on Houdini


A lot of the geometry looked to me like it was done using constructive solid geometry, which usually uses signed distance fields. These can be represented very succinctly. See [0] for details.

[0] https://www.iquilezles.org/www/articles/distfunctions/distfu...


yes and no. the usual rule is that you're allowed the "basic installation" of the OS and GPU drivers present on a demoparty computer. the fractal geometry example is a poor one since fractal geometry requires minimal shader code to generate, but if you were to trace a modern windows 4k demo it does probably run at least a few MB (if not tens of MB) of executable code between the shader compiler, the GPU driver upload process, etc.


The OS provides functionality to set up the GPU and to compile code for it, and to shove samples into a sound card. That is it.


These demos are some of the last arenas in software development where real skills can be displayed. Elsewhere it's mostly shuttling data from one field to another with some business logic, API glue and other cruft and to hell with the RAM footprint. Awesome stuff, thank you for posting.


I agree that demos like this are a wonder of "real skill". But it's bizarre to assert it's the only place it's possible. Yes, most software development is boring business stuff built on unstable towers of boring frameworks and infrastructure.

But there's plenty of room for art in your code. Either straight out art like this; generative computer art is a very exciting aesthetic area. Or just building elegant systems. There's no reason a network caching layer or a machine learning library can't be beautiful and skillful the same way a demo is. (The one exception is terseness; the tricks necessary to shoehorn a beautiful demo into 4k often make code unmaintainable.)

Aesthetics matter.


jaquesm said it's where skills can be "displayed". I think the latest update I made to a CRUD app is pretty slick, but I can't really show it off.


IMO there are still a lot of interesting problems being solved in gamedev, particularly in 3d rendering but also in defining game logic (3d follow-camera systems are particularly complex).


Now imagine how the demo would look like if they were allowed to use Electron size for the executable/shader code.


That’s the simulation we’re living in!


There are actually unlimited size demo competitions as well where people can just go crazy and some of the results are really incredible.


I know, that was a tongue-in-cheek remark. :)


Anyone able to run it from wine?


No idea but here’s WebGL version: https://www.shadertoy.com/view/3sBBRK


What’s the system requirements?


At least you need a Windows OS I guess


Not true, also runs via shadertoy: https://www.shadertoy.com/view/3sBBRK

But it's missing the GPU Synthesizer


Ok thought it might need like a powerful nvidia GPU or something. Not the case.


In the "Buffer A" tab there is a SAMPLE_COUNT variable. Turning that to 1 will probably enable you to run it on your potato of choice, as long as it has a browser.


How do you apply the code change? Nothing I do seems to have any effect, including removing all the code.


On the bottom-left edge of the text area/editor, there is a tiny black play/triangle icon. Clicking that applies the changes.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: