News for hackers. Stuff that matters.
Re:How to Write a Video Player in Less Than 1000 Lines by ekianjo on Monday March 07, 2016 @01:28AM (#11237444)
The problem is not limited to this article. For example in the Windows demo-scene world, it's trivial to do 4k/64k demos by using all the DirectX libraries available in the OS. So that the size of the actual demo is completely relevant since you benefit from massive system libraries.
Re:How to Write a Video Player in Less Than 1000 Lines by tbirdz on Monday March 07, 2016 @01:41AM (#11237477)
To be fair, many old school demos are calling out to specialized hardware in their demos, for example the C64 SID chip, or Amiga graphics chipset. The API for accessing this hardware is not as high-level as DirectX, but it still serves as an external library of sorts for performing graphics/audio operations. All the software-based graphics routines these demo coders created are very impressive, don't get me wrong, but in the end there's still a large part of the pipeline that the coder relies on that they did not create themselves, and isn't factored into the overall code size.

Additionally, current OSes make it really hard, if not impossible, to get down to this level of bare hardware. There's many layers on top that you're forced to go through, closed graphics command stream, closed graphics driver, closed kernel, closed userspace libraries, and the hardware is much more complex. Really DirectX does serve as the lowest level standard way on Windows to access graphics card hardware.

Re:How to Write a Video Player in Less Than 1000 Lines by gcb0 on Monday March 07, 2016 @02:24AM (#11237586)
calling out hardware != using software libraries
Re:How to Write a Video Player in Less Than 1000 Lines by vog on Monday March 07, 2016 @02:39AM (#11237619)
It is the same issue, just moved around to a different component. In today's world, most of the time "calling out hardware" means just triggering some piece of software on a separate chip.

Nevertheless, I do think that the demo scene is impressive - for a different reason.

I believe this is not about the absolute code size, but the relative code size: Within each demo category, all demos run on almost the same hardware architecture and same software platform. Yet, some of them manage to create effects in 4k which most other programmers wouldn't manage to create in 64k.

It is not about where the limits are (4k, 64k, 32 bytes, ...), but that there are limits at all. This inspires creativity, pushing the border of what people believe is doable within these limits.

Re:How to Write a Video Player in Less Than 1000 Lines by vardump on Monday March 07, 2016 @02:54AM (#11237657)
> For example in the Windows demo-scene world, it's trivial to do 4k/64k demos by using all the DirectX libraries available in the OS

Do you really think those DirectX libraries have music players, graphics assets (so that you don't need to procedurally generate all) and other components that intros/demos need?

Writing 4k demos is anything but trivial. It's in no way comparable to video player situation.

Re:How to Write a Video Player in Less Than 1000 Lines by mateuszf on Monday March 07, 2016 @06:06AM (#11238231)
> The problem is not limited to this article. For example in the Windows demo-scene world, it's trivial to do 4k/64k demos by using all the DirectX libraries available in the OS. So that the size of the actual demo is completely relevant since you benefit from massive system libraries.

But all developers still have the same size limit and access to the same apis. Which means that creative competition is totally possible.

Re:How to Write a Video Player in Less Than 1000 Lines by ekianjo on Monday March 07, 2016 @09:57AM (#11239205)
Yes. But what I mean is, people look at some demos and say "wow this only fits into 4k", and they completely forget that these demos rely on hundred of Mbs of system libraries in the first place.

But sure, comparing between 4k demos is possible, but as DirectX evolves the comparison becomes unfair, since the system libraries add more functionalities over time.

Re:How to Write a Video Player in Less Than 1000 Lines by mateuszf on Tuesday March 08, 2016 @03:54AM (#11244180)
That's true. I still remember the times where all you had was api to set individual pixels in 64Kb memory area. Yet people were able to make nice effects even using 256 bytes of assembly code.