Let's Code MS DOS 0x22: 2nd Reality Tunnel Effect

Ғылым және технология

In 1993 the Future Crew released the seminal demo “Second Reality”. One of the more simple effects they showed in this demo was the “Dot Tunnel”. It is a simple, yet mesmerizing oldskool demo effect. We can build on our knowledge of fixed point maths to implement this effect and maybe even improve on the original!
Support me on Patreon: / root42
Support me on Ko-Fi: ko-fi.com/root42
Support me on PayPal: paypal.me/ArneSchmitz
Support me on KZread: / @root42
Music: A Little Wonder by Spino2006
Source code: github.com/root42/dostunnl
0:00 Introduction
1:20 The Code Stub
3:15 Lissajous
8:40 Precomputed Tunnel
16:20 Drawing The Tunnel
24:12 THE DEMO
26:00 Closing words
#demoscene #letscode #msdos #retrocomputing #programming

Пікірлер: 24

  • @NoiseCommander3DS
    @NoiseCommander3DS3 күн бұрын

    Just found your channel, will watch this video after work. Very cool channel! I am looking into old-school demo effects as I want to make a demo / music disk for the Nintendo 3DS homebrew.

  • @root42

    @root42

    2 күн бұрын

    Great idea! Will you submit it to some party? Hope to see it at some point!

  • @NoiseCommander3DS

    @NoiseCommander3DS

    2 күн бұрын

    @@root42 No, I plan to make it available via the universal updater app, it's sort of the go to app "store" (has only free apps) for 3ds homebrew. Attending a real demo party would be nice too though, my last was in 1999 me thinks. Mekka/Symposium was the name.

  • @NoiseCommander3DS

    @NoiseCommander3DS

    Күн бұрын

    @@root42 I uploaded a video on my channel showing what I have so far if you're interested

  • @wintersgrass
    @wintersgrass9 ай бұрын

    Amazing. Could you do some videos showing these demo scene tricks in Assembly language?

  • @root42

    @root42

    9 ай бұрын

    Maybe, I do have the Let’s Code Assembly series. If I find the time I might do it.

  • @wintersgrass

    @wintersgrass

    9 ай бұрын

    Would be amazing :) Keep the videos coming 👏🏻@@root42

  • @sevendump
    @sevendump9 ай бұрын

    in fact, in “Second Reality”, in addition to bending the tunnel, they also simulate camera movement (the overall center of the rendering shifts during the movement in the opposite direction from the bend of the trajectory), which creates a more mesmerizing effect. Many who try to copy this scene miss this point.

  • @EdgarsLS
    @EdgarsLS9 ай бұрын

    looks like youtube really wants to promote that recent bigclive video

  • @root42

    @root42

    9 ай бұрын

    To be fair he does make good videos…

  • @Redwisp27
    @Redwisp279 ай бұрын

    sweet

  • @sevendump
    @sevendump9 ай бұрын

    regarding optimization. Well, on 386-SX PC with ISA you couldn’t afford to use a video buffer in the system memory. In the Second Reality, everything is drawn immediately into video memory, the old pixels are painted over with black pixels with coordinates from the previous frame. But MODE-X can also be used. There is no need to switch the plane for each pixel; You can do this: - first we write the coordinates (and color) of all calculated points of the current frame into a linear array. - turn on write for plane 0x0 - we run through the array and draw into video memory only those points where: X & 3 = 0 - turn on write for plane 0x1 - we run through the array and draw into video memory only those points where (X+3) & 3 = 0. Etc. Or in advance, after calculating the coordinates of the point, we define it in one of four arrays in order to create a convenient structure for transfer in the plane. This is even better, since we can copy 4 points at a time to video memory. In total, we will switch the plane only 4 times per frame, this will not affect the speed.

  • @Mark-px3rq

    @Mark-px3rq

    9 ай бұрын

    Painting over with black pixels is hard because you don’t want to wipe out newer pixels from this frame, but there is no draw order that would avoid this. Unless you have enough time to do it all in the v-blank, and can wipe out everything before drawing the new points. Or you can remember which points you didn’t draw over black

  • @sevendump

    @sevendump

    9 ай бұрын

    @@Mark-px3rq I described without going into details. Yes, we will need to prevent drawing black dots where we will draw a new white dot. This is all solvable. But I personally like the option using Mode-x, it gives more features.

  • @BellaLugoshi
    @BellaLugoshi9 ай бұрын

    Thanx, 320/200=1.6, 200/320=0.625

  • @root42

    @root42

    9 ай бұрын

    Yeah true. I swapped the numbers in the comment.

  • @BellaLugoshi

    @BellaLugoshi

    9 ай бұрын

    @@root42 Es sind Kleinigkeiten, du bist immer noch der Beste, es ist immer schön, dir zuzuhören. (Ich hoffe, der elektronische Übersetzer hat ihn nicht so schlecht übersetzt)

Келесі