I wrote an OpenGL first-person demo for DOS (256 colors, dithering, OSMesa)

แชร์
ฝัง
  • เผยแพร่เมื่อ 3 มิ.ย. 2011
  • In this tool-assisted education video I create a simple FPS style walking and jumping scene for OpenGL, with DJGPP, in DOS. In a 256 colors 320x200 VGA mode. This is my first OpenGL exercise.
    Apologies about some little mistakes in the program (such as reloading the textures on every frame). I noticed them when this video was already late in production, and it would take several days before the new version would be available if I were to fix them, and I'm itching to get this video out and into making the next video already, and none of the mistakes actually prevent the content being understood, so I'll leave them be. Most people don't even notice.
    Twitter: / realbisqwit
    Patreon: / bisqwit (alternatives at iki.fi/bisqwit/donate.html)
    Twitch: / realbisqwit
    Homepage: iki.fi/bisqwit/
    I wrote a FAQ after this video was picked up on Reddit the first time in 2012. Here it is: bisqwit.iki.fi/jutut/kuvat/pr...
    Source code and prebuilt lightmaps: (Compiles and runs on Linux):
    bisqwit.iki.fi/jutut/kuvat/pr... (includes also a superior ellipsoid-based collision testing, and a buggy WIP for portal rendering: I'm not good with the math.)
    The background music is The Last Duel/The Final Decisive Battle from Lufia I/II (SNES). However, it is not played through the SPC700 (SNES audio chip), but through OPL3, the FM synthesizer in PCs. You can see my process of converting a SNES song into an FM song in this video: • SNES music through OPL...
    #Bisqwit #3DProgramming #Dithering

ความคิดเห็น • 2K

  • @Bisqwit
    @Bisqwit  10 ปีที่แล้ว +813

    Note that I designed the program before the video. This video simply showcases the source code and the order in which it was designed, in order to allow the reader to follow the thinking process behind the code's design, even though it was designed carefully in the passage of weeks.

    • @Flopsgamer
      @Flopsgamer 5 ปีที่แล้ว +63

      Excuse meeeee but... Why is this recommended 8 years after?

    • @Flopsgamer
      @Flopsgamer 5 ปีที่แล้ว +19

      By the way it's cool

    • @henriqueguedes325
      @henriqueguedes325 5 ปีที่แล้ว +8

      @@Flopsgamer same here lol. still amazing

    • @MN-dh8vy
      @MN-dh8vy 5 ปีที่แล้ว +4

      I know this is 5 years old and maybe you don't even exist anymore, but how exactly did you do the video editing? Did you rewrite all of the code manually and videocapped it?
      Also, how is your opengl nowadays? You must be an expert. I'm just learning opengl and did my first camerastuff and other things. Love to see how far other people went. :)

    • @Zooiest
      @Zooiest 5 ปีที่แล้ว +4

      Bisqwit suomi perkele

  • @adamsfusion
    @adamsfusion 5 ปีที่แล้ว +1746

    "Forgive me, this is my first OpenGL program"
    I forgive you. I've been programming for a decade at this point and you've got me beat with an introductory OpenGL program. This was a blast to watch.

    • @jkf16m96
      @jkf16m96 5 ปีที่แล้ว +97

      That's how experts works. I want to program as much like him, he knows how to read documentation a lot:0

    • @XChristmasManX
      @XChristmasManX 5 ปีที่แล้ว +22

      @ch282 i existed since 1990s and i cant do simple algebra iwas described once as unintellectual concscious seizure from how retarded i was but this...to you guys im inanimate piece of shitstain

    • @feritsu
      @feritsu 5 ปีที่แล้ว +1

      Wholesome.

    • @sirgrem2988
      @sirgrem2988 4 ปีที่แล้ว

      @@XChristmasManX Looks like we are the same, man. I keep forgetting the high-level maths even how MOTIVATED I WAS TO LEARN IT!

    • @emmettdja
      @emmettdja 3 ปีที่แล้ว +2

      @G E T R E K T 905 programming isnt just about putting things on a screen

  • @sovietelectioncollidingtro6231
    @sovietelectioncollidingtro6231 5 ปีที่แล้ว +2479

    Should we recommend this video after release?
    TH-cam: _naaah dawg, lets wait 8 years._

    • @sbonel3224
      @sbonel3224 5 ปีที่แล้ว +16

      There wasn't an algorithm in 2011, you stupid clown.

    • @thenasiudk1337
      @thenasiudk1337 5 ปีที่แล้ว +37

      @@sbonel3224 r/whooosh

    • @nicka.7910
      @nicka.7910 5 ปีที่แล้ว +14

      bobagopaaa they’ve always been unoriginal

    • @CantSettleOnAName
      @CantSettleOnAName 5 ปีที่แล้ว +21

      @@nicka.7910... except maybe the original one.

    • @pacmasterawn192
      @pacmasterawn192 5 ปีที่แล้ว

      Bruh moment :v

  • @ASFilmStudios
    @ASFilmStudios 5 ปีที่แล้ว +3830

    This guy did minecraft with ray tracing before it was cool

    • @JamilKhan-hk1wl
      @JamilKhan-hk1wl 5 ปีที่แล้ว +152

      On 256 color vga!!!!

    • @unicornpoo7441
      @unicornpoo7441 5 ปีที่แล้ว +11

      what the fuck is ray tracing and why cant dorks shut up about it

    • @duckmaneuvers
      @duckmaneuvers 5 ปีที่แล้ว +156

      Unicorn Poo
      Ray tracing is like some sort of an algorithm that mimics realistic light effects.
      It's amazing how this guy manage to program such realistic ray-tracing on DOS and it's as good as ray-tracing in Minecraft.
      No point in calling them dorks if they're smarter than you.

    • @ASFilmStudios
      @ASFilmStudios 5 ปีที่แล้ว +33

      @@unicornpoo7441 it's obvious I meant the result looks so similar to the 4k Minecraft with raytracing and realistic textures videos, this was made in Dos amazing work really

    • @atomicspacewizard
      @atomicspacewizard 5 ปีที่แล้ว +16

      in a cave! With scraps!

  • @Bisqwit
    @Bisqwit  11 ปีที่แล้ว +98

    Writing an OS (operating system) becomes incredibly easy, once you realize that you can define yourself what an OS is and what it does.

  • @xenotiic8356
    @xenotiic8356 5 ปีที่แล้ว +499

    WHY AM I ONLY DISCOVERING THIS TODAY IN 2019, THIS IS ACTUALLY UN-BELIEVABLE!!!!

    • @doomi_nukem
      @doomi_nukem 5 ปีที่แล้ว +1

      *Bruh*

    • @LochyP
      @LochyP 5 ปีที่แล้ว +8

      Unbelievable is all one word

    • @AhnafAbdullah
      @AhnafAbdullah 5 ปีที่แล้ว +6

      This is some legendary tier programming, too bad most people don't know how amazing(ly hard) this is

    • @mathze
      @mathze 4 ปีที่แล้ว +3

      I see you have written "unbelievable" with a dash. I've reserved a special place in hell for you.

    • @mpg.2
      @mpg.2 4 ปีที่แล้ว

      @@mathze im pretty sure it was just youtube splitting the word to the next line. Save it for someone else!

  • @harleyspeedthrust4013
    @harleyspeedthrust4013 2 ปีที่แล้ว +8

    Bisqwit, 3 and a half years ago I clicked on this video to try to understand 3D graphics, and something clicked in my mind - something which I thought at the time was just an understanding of basic 3D graphics. I was wrong: this video unlocked some kind of mathematical ability that I didn't know about or have access to before. Since that moment, math in general has been much easier for me. Subjects like linear algebra, multivariable calculus, and even undergraduate level physics have come naturally to me when previously they did not. You may never read this, but I would like to thank you from the bottom of my heart for these amazing videos, especially this one.

    • @Bisqwit
      @Bisqwit  2 ปีที่แล้ว +4

      Thank you for your message! I read all comments (and most replies) that are posted on my videos.

  • @Slferon
    @Slferon 5 ปีที่แล้ว +350

    this guy will program a software to litearlly save humanity one day

    • @ct275
      @ct275 5 ปีที่แล้ว +7

      Either that or he will program the first sentient AI that will exterminate the human race

    • @spacemoose4671
      @spacemoose4671 5 ปีที่แล้ว +36

      And it will run on DOS

    • @beesmongeese2978
      @beesmongeese2978 5 ปีที่แล้ว +4

      You mean he will create Skynet

    • @1owk3y
      @1owk3y 5 ปีที่แล้ว +4

      Except it'll be like 8 years too late to be discovered by anyone

    • @danilo2735
      @danilo2735 4 ปีที่แล้ว +2

      @@ct275 now would be a great moment

  • @Bisqwit
    @Bisqwit  11 ปีที่แล้ว +57

    Please do not be discouraged. Though this program was my first OpenGL exercise, this video is a rehearsed production. And I also highly suggest you to read source code. It is more vital for a programmer to be able to read source code than to write it. Go to Freecode website, and scan for anything that interests you -- whether it be for multimedia, games, compilers, scientific, budgeting, database,or anything else -- download the source code and study it. It is a fascinating and beneficial hobby.

  • @ryonagana
    @ryonagana 8 ปีที่แล้ว +469

    for long 4 or 5 years i keep watcing this video and inspires me to programming and someday achieve your skills
    you're a great programmer mr. Joel. inspires me to improve

    • @Dataacid
      @Dataacid 8 ปีที่แล้ว +4

      You had to start a long time ago if you ever wanted to become remotely close to what he is.

    • @Bisqwit
      @Bisqwit  8 ปีที่แล้ว +66

      +Dataacid I disagree. It all depends on what you focus. By the way, please check your privacy settings. You commented in one of my other videos, and I tried to reply, but I only get the "comment failed to post" error.

    • @Dataacid
      @Dataacid 8 ปีที่แล้ว +4

      Yeah these fuckers changed something in the last month, my privacy settings have been the same for over 2 years now and only lately people can't reply to my posts =(
      Going back on topic before I have to fiddle with google+ once again.
      There is a limit on how good you can become depending on when you start in your life.
      I am sure that you started to play with computers and programming when you were a kid, and the younger you are the more flexible your mind is.
      I am not saying you can't become good if you put enough effort into it, but you will never be able to achieve the same results of someone that is doing this since their childhood.
      BTW what was the other comment you couldn't reply on? I have bad short memory :p

    • @Dataacid
      @Dataacid 8 ปีที่แล้ว +6

      yeah I don't know what they did, the option "Who can reply to your public posts" is already set to Anyone.
      . . .

    • @Bisqwit
      @Bisqwit  8 ปีที่แล้ว +15

      +Dataacid Well, in any case, my reply was (to you getting depressed over how you perceived my NES emulator video and my typing speed and such.): Don't be. Be sure to watch also these two videos. One explains how I make videos and the second shows how fast/slow I type. th-cam.com/video/5Da6ZyQJjE0/w-d-xo.html th-cam.com/video/jnkOcAkLkBU/w-d-xo.html

  • @Bisqwit
    @Bisqwit  10 ปีที่แล้ว +210

    Dear Julian Kirsch, the TH-cam-Google+ abomination that is does not give me the option to reply directly to your comment for some reason, so I hope you see my reply here. You kindly asked: "why the f*ck did you hardcode the map? Wouldn't have it been easier to parse the coordinates at runtime from a file?"
    The answer: In terms of video production, it was much, much easier to do it this way. Yes, parsing the coordinates runtime from a file would have removed the list of numbers from my program, but it would have required me to create a function to parse a file. I would have also had to decide upon a data format, and possibly to show the viewer the contents of the file. The way I did, however, everything that is required (except the lightmaps, alas) could be stored in a single file. In terms of video production, I could speed up the numbers entry that I could not have done with the data parser. As you realize, I am often making compromises in design for these videos in order to keep the video length down. When I published this video, my account was still capped at 15 minutes, so it was a real concern.
    For a practical 3D program it would have been clearly a better idea to put the map data in a separate file though, along with the lightmaps. But then you are going for a real 3D engine, which this is really not.

    • @darkdevil905
      @darkdevil905 10 ปีที่แล้ว +31

      Bisqwit how did you become such a good programmer, you're such a pro, i wish one day i'll become 1/5th as good as you're !

    • @Bisqwit
      @Bisqwit  10 ปีที่แล้ว +41

      darkdevil905 Lots of practice, in both reading and writing code. Mind you, I am only good at some select areas. In terms of programming, my focus tends to be rather narrow, though I do know things from a wide area. You have good chances at surpassing me early, if you are passionate about programming.

    • @motamendez
      @motamendez 9 ปีที่แล้ว +3

      Bisqwit are there any book that you can recommend for c and c++ ?

    • @hi_im_julian_kirsch
      @hi_im_julian_kirsch 8 ปีที่แล้ว +15

      +Bisqwit Wow "TH-cam-Google+ abomination", quite precise. It took me about 1 year to get notified that you have replied. It is indeed an interesting compromises and simple as well. Thanks for the reply.
      Just by the way, I am searching for GL Devs for a project. Perhaps you want to join?

    • @flyer95311
      @flyer95311 8 ปีที่แล้ว +11

      +Emilio Mota you need practise, not books.

  • @mihkelv6487
    @mihkelv6487 8 ปีที่แล้ว +1128

    if(filter == GL_LINEAR && filter == GL_NEAREST)
    u wot

    • @Bisqwit
      @Bisqwit  8 ปีที่แล้ว +461

      Typo. Should be != there in both cases.

    • @Piotrek7654321
      @Piotrek7654321 6 ปีที่แล้ว +386

      That's how bugs are born.

    • @HarhaMedia
      @HarhaMedia 5 ปีที่แล้ว +273

      It's not a bug, it's a feature!

    • @petar932
      @petar932 5 ปีที่แล้ว +59

      @@HarhaMedia lol, may i just add: it just works..

    • @Bisqwit
      @Bisqwit  5 ปีที่แล้ว +108

      There is no reason for a compiler to reject that syntax. If the variable was "volatile", such a test could very well pop up in embedded programming (with differently named symbols). It could warn about it though, and I believe at least PVS-Studio can and will do that.

  • @teeblackgold97
    @teeblackgold97 5 ปีที่แล้ว +70

    No typo error, can run the program on first compile. This man is a goddamm programming legend.

    • @philiprehker
      @philiprehker 5 ปีที่แล้ว +15

      Tee Khing Hua he was working on the program for two weeks ->see the pinned comment

    • @snbeast9545
      @snbeast9545 4 ปีที่แล้ว +6

      There is a typo, "if(filter == GL_LINEAR && filter == GL_NEAREST)", as addressed in another comment. He said it was a typo and that both of the "=="s should have been "!="s.

    • @unforgettable31
      @unforgettable31 2 ปีที่แล้ว

      Patient programmers usually don't get many errors, regardless this video is a TAS one.

    • @lordoftrident
      @lordoftrident 2 ปีที่แล้ว

      He uses a typing assistant when recording for the video

  • @343turtle
    @343turtle 10 ปีที่แล้ว +422

    I feel like a piece of crap after watching this video.... I am still learning about pointers. Good work!!!

    • @flyer95311
      @flyer95311 8 ปีที่แล้ว +29

      +David Last pointers themselves are pretty simple, this is true. But as the project grows, they become natural hell. Something like passing a pointer of the function that recieves a reference of the pointer to another function [...] that *finally* recieves a number is pretty common.
      It's good for perfomance, but makes it really hard to maintain the source code.

    • @CykPykMyk
      @CykPykMyk 7 ปีที่แล้ว +2

      You need to make a project with binary files, especially the bigger ones, and some insertion/extraction operations. You should understand that then. :) At least worked in my case.

    • @AlyphRat
      @AlyphRat 7 ปีที่แล้ว

      I still can't believe that all of this is running under DOS!

    • @ohmnitrix4209
      @ohmnitrix4209 6 ปีที่แล้ว +7

      once pointers are understood a whole new realm is unleashed!

    • @dariusduesentrieb
      @dariusduesentrieb 6 ปีที่แล้ว +4

      I am sure you can handle them now ;)

  • @essillius
    @essillius 9 ปีที่แล้ว +330

    this music is epic...

    • @surferriness
      @surferriness 5 ปีที่แล้ว +17

      but still unbelievably relaxing

    • @jpaulobiem
      @jpaulobiem 5 ปีที่แล้ว +10

      This is from Lufia Fortress of Doom. The first dungeon of the game, if my mind does not fail me.

    • @SuperSpeed52
      @SuperSpeed52 5 ปีที่แล้ว +4

      Friends, those were games...

    • @biddyfox
      @biddyfox 5 ปีที่แล้ว +1

      entirely fitting in that regard

    • @NiamorH
      @NiamorH 5 ปีที่แล้ว

      @@jpaulobiem search for the RemixSample Mother32 version, it is awsome

  • @OfficialAz3
    @OfficialAz3 4 ปีที่แล้ว +15

    The thing I only undesrtand:
    -The letters
    -The words
    -The song
    -The name of the programming language
    -Comments in C++
    -int main(){return 0;}
    This deserves an A++, rather than C++.

  • @Bisqwit
    @Bisqwit  11 ปีที่แล้ว +6

    I don't remember how long it took for me to write this program (it was almost 2 years ago after all), but rest assured what you see in this video is not the initial design process. I designed it off-screen. The video only shows the recreation of the finished result in a natural and meaningful order.

  • @ZeroTheorie
    @ZeroTheorie 5 ปีที่แล้ว +23

    Goddamn, I'm only on the first few steps of becoming a programmer and this video is quite the inspiration to put 100% into learning all I can about it. Can't imagine how long it took to learn this stuff, but I'm sure that with dedication, time won't be a problem. Keep up the amazing work, Joel!

  • @Bisqwit
    @Bisqwit  11 ปีที่แล้ว +14

    Thanks. It's a bit rushed for production reasons (15 minutes to fit all code & demonstration, it was TH-cam's video length limit when I uploaded this), which contributes to some difficulty in understanding it. But overall it is quite simple. The hardest part is the 3D math. By lines, the rotation matrix and stuff, and by complexity, the quad-ray collision. I'm planning on making a separate video of the lightmap calculations though.

  • @jsd64
    @jsd64 7 ปีที่แล้ว +300

    Absolutely incredible, this should have millions of views. This guy truly has mastery in this field, how one can program this entire application in just one attempt is astonishing and incredibly impressive.

    • @dashl5069
      @dashl5069 5 ปีที่แล้ว +63

      I agree, except for this is probably not in one attempt

    • @oresthopiak8609
      @oresthopiak8609 5 ปีที่แล้ว +7

      @@dashl5069 I think that this was re-recorded after many attemts, or this is somehow cut and joined, idk

    • @tiberionjraxiosn9493
      @tiberionjraxiosn9493 5 ปีที่แล้ว +22

      @@oresthopiak8609 tool-assisted programming

    • @clodgozon3968
      @clodgozon3968 5 ปีที่แล้ว +1

      I assume that he could do it in just one attempt, not on the camera though.

    • @williampan29
      @williampan29 5 ปีที่แล้ว +7

      "this should have millions of views."
      it wouldn't because most people don't understand what the coding part is about

  • @victornaut
    @victornaut 9 ปีที่แล้ว +129

    This is my favorite programming video ever.

    • @darmoed_phantorm
      @darmoed_phantorm 5 ปีที่แล้ว

      i love you very much

    • @darmoed_phantorm
      @darmoed_phantorm 5 ปีที่แล้ว

      @KAS не знаю мне на него насрать

  • @nshusa99
    @nshusa99 7 ปีที่แล้ว +2085

    jesus christ, your knowledge of programming is insane.

    • @0xhhhhff
      @0xhhhhff 5 ปีที่แล้ว +96

      He is like the Gangsta of the Gangsta cuz he's more than godlike at c++ and c which are ganstas of the programming world.

    • @minsin56
      @minsin56 5 ปีที่แล้ว +35

      @Martin Teoharov console.writeline("c# is much easier to learn than c++");

    • @MKVideoful
      @MKVideoful 5 ปีที่แล้ว +50

      @@minsin56 fprintf(stdout, "But C/C++ is much more powerful, for me it is number %i
      ", 1);

    • @minsin56
      @minsin56 5 ปีที่แล้ว +12

      @@MKVideoful console.writeline("i use c++ for opengl and i use c# for everything else")

    • @celsonbernardo5307
      @celsonbernardo5307 5 ปีที่แล้ว +29

      @@minsin56 Console.WriteLine("Stfu");
      Console.ReadLine();

  • @ben-mulchi
    @ben-mulchi 5 ปีที่แล้ว +452

    Do you realize you coded a whole 3D Engine by yourself on DOS, on C++, in 2 hours, and you apologize for it being your first OpenGL Exercise?!
    BRO IVE STRUGGLED TO MAKE A 2D ENGINE ON JAVA FOR A MONTH

    • @wmonk5642
      @wmonk5642 5 ปีที่แล้ว +55

      Not actually.. He used osmesa.h
      Anyway, its a great work for sure

    • @prototyp60
      @prototyp60 5 ปีที่แล้ว +66

      Also check description, this video is just a source code showcase, it took him a week or so to actually program this whole thing

    • @prototyp60
      @prototyp60 5 ปีที่แล้ว +32

      Still very impressive tho

    • @rossdouglas7115
      @rossdouglas7115 4 ปีที่แล้ว +6

      cool to find out theres a community out here that codes for fun... im not alone

    • @KishoreG2396
      @KishoreG2396 4 ปีที่แล้ว +10

      @@wmonk5642 osmesa IS OpenGL...

  • @NotNameHYWT
    @NotNameHYWT 5 ปีที่แล้ว +209

    Well, TH-cam recommendation algorithm is really weird.

    • @RoyRope
      @RoyRope 5 ปีที่แล้ว

      Kinda

    • @OktayYeniTR
      @OktayYeniTR 4 ปีที่แล้ว

      ya

    • @VestinVestin
      @VestinVestin 4 ปีที่แล้ว +2

      No, it's really not. Initially it did exactly what you'd expect - "this is a video you haven't watched that was watched by many people who watched many videos you did watch". Then they realized what many snarky comments pointed out: this leads to bubbles / echo chambers. The only way to break out is to recommend people something new and different. Something unlike they and people like them watch and have watched... but how in the blazes do you do THAT? Do you just throw darts at the board and literally recommend things completely at random? Hell no - you're Google. You have an abundance of data. Once a video has been watched enough times and TH-cam can vouch for its quality in general, it can then recommend it to people outside the relevant interest group as a "broaden horizons" one. This leads to a deluge of comments sarcastically asking "Why wasn't this recommended years ago but gets recommended now all of a sudden?".
      The simple answer is, of course, "Because the algorithms driving these decisions can't watch and understand videos, you retards. They only get a rough estimate of what people think, and for that stabilize requires time".
      I hope you found this explanation helpful. Admittedly, I have zero insight into how this ACTUALLY works under the hood; I'm just making an educated guess based on what I've seen and what I know.

    • @oshkiv4684
      @oshkiv4684 4 ปีที่แล้ว

      At least it's working

  • @Kitulous
    @Kitulous 5 ปีที่แล้ว +41

    Bisqwit: This is my first OpenGL program. Honestly.
    Also Bisqwit: Writes beautiful code with no typos like a god

    • @CodingAP
      @CodingAP 5 ปีที่แล้ว +12

      Kitulous sorry to say this, but it was tool assisted, meaning he wrote the code, and then told a bot to write it first try

  • @Bisqwit
    @Bisqwit  11 ปีที่แล้ว +11

    Thanks. I do know a lot about the background from raytracing and stuff. While this was indeed my first (and so far only) OpenGL program, the writing in the video was thoroughly rehearsed and tested beforehand.

  • @SyedSalahuddin
    @SyedSalahuddin 9 ปีที่แล้ว +46

    love the dithering on the 256 color palette

  • @piotrszulc9053
    @piotrszulc9053 ปีที่แล้ว +5

    It’s actually nice for me to see progress I made after finishing my masters in cs. I remeber looking at this long time ago, knowing basics of programming and c++ and not knowing what any of that meant. And now I revisit this video and everything is like: yeah, makes sense

  • @PearangeProductions
    @PearangeProductions 4 ปีที่แล้ว +26

    Dude.
    I know this is 8 years old.
    But it looks like it was made RECENTLY.
    Holy smokes.

    • @kenan2386
      @kenan2386 3 ปีที่แล้ว +2

      And he still looks at the comments to this day

  • @Bisqwit
    @Bisqwit  10 ปีที่แล้ว +5

    The background music is The Last Duel/The Final Decisive Battle from Lufia II: Rise of the Sinistrals (SNES). However, it is not played through the SPC700 (SNES audio chip), but through OPL3, the FM synthesizer in PCs, using ADLMIDI. You can find more information in: bisqwit.iki.fi/jutut/kuvat/programming_examples/opengl-example-FAQ.txt

  • @mdellertson
    @mdellertson 5 ปีที่แล้ว +2

    Like many others, I'm truly blown away. Your knowledge of programming and math is outstanding. Definitely going to support you via Patreon. Thanks so much for sharing this!!! P.S. loved learning what dithering is and also gamma correction.

  • @OskarP2601
    @OskarP2601 2 ปีที่แล้ว +1

    dude this is amazing. rewatching this after a year and i’m still really impressed. really inspiring

  • @NoscoperSans
    @NoscoperSans 5 ปีที่แล้ว +153

    Ray-Tracing minecraft in 2011
    Wow

    • @felixtheRHYTHMCHEF
      @felixtheRHYTHMCHEF 4 ปีที่แล้ว +3

      This guy is really talented, but this is not real time ray tracing

    • @tootaashraf1
      @tootaashraf1 3 ปีที่แล้ว

      Yeah, this isn't raytracing..

    • @ramennnoodle
      @ramennnoodle 3 ปีที่แล้ว +1

      It's still raytracing but it's not realtime

    • @tootaashraf1
      @tootaashraf1 3 ปีที่แล้ว +1

      @@ramennnoodle Global Illumination not Raytracing...

    • @JustJory
      @JustJory 3 ปีที่แล้ว

      @@tootaashraf1 it is though. good looking graphics doesn't mean raytracing take a look at toy story one it looks like it can be ran at over 500 fps real time on an average pc today.

  • @benjaminpapp512
    @benjaminpapp512 10 ปีที่แล้ว +25

    this is crazy. you are a wizard. never tripped on code this much,

  • @-Burb
    @-Burb 5 ปีที่แล้ว +2

    I was originally just gonna skip to the end to see the final product, and then the music kicked in and I realized how insane this code was and I just had to watch the entire video. Amazing!

  • @QwertyCharlieFourate
    @QwertyCharlieFourate 8 ปีที่แล้ว +1

    I am really enjoying watching your content while completing UNI work. the music lets me concentrate but whenever i look across, i see a beautiful console based text editor or some insanely cool program running (far more advanced than what i could design with my current knowledge/experience with programming).
    i'll have to save some videos for when i get round to my next programming assignment!

  • @FeelingShred
    @FeelingShred 5 ปีที่แล้ว +12

    This has that Quake1 kind of immersion to it, really cool! For me we would never get higher than 640x480, love letting my imagination fill in the blanks. Imagine random generated levels with this, mind-blowing.

    • @CYON4D
      @CYON4D ปีที่แล้ว +1

      I totally agree with you.

  • @threebucks
    @threebucks 5 ปีที่แล้ว +6

    Brilliant. Also the Lufia sound-track is fantastic background for this.

  • @hdmiokplays3496
    @hdmiokplays3496 3 ปีที่แล้ว

    I honestly sometimes come back to this video, and watch it from start to finish. Worth it every time

  • @felipe18383
    @felipe18383 8 ปีที่แล้ว

    The final result looks awesome! I really like the style using 256 colors and dither, it reminds me all the old games i used to play.

  • @crazyqbee
    @crazyqbee 8 ปีที่แล้ว +4

    Wow that's amazing! I'm in the process of creating a Qbasic raycaster so I know how difficult this can be! Well done!

  • @2KPROD
    @2KPROD 9 ปีที่แล้ว +117

    Awesome graphics for DOS :)

    • @Dxceor2486
      @Dxceor2486 8 ปีที่แล้ว

      The next challenge would be to make this run on an old 486DX or maybe a pentium with dos 6.22 !

    • @Bisqwit
      @Bisqwit  8 ปีที่แล้ว +21

      +Deksor Not impossible at all. Considering how Descent ran very well on such platforms, and all. But you'd need something a bit more clever than just rendering all polygons on every frame.

    • @oguz8295
      @oguz8295 5 ปีที่แล้ว

      Physics too

  • @Algird75
    @Algird75 8 ปีที่แล้ว +1

    Awesome work! Keep making awesome programs/games like this!

  • @rafaelgpontes
    @rafaelgpontes 5 ปีที่แล้ว

    What kind of magical sorcery is that? I'm marveled! Hypnotized! Bravo!

  • @TheCorporatePlayers
    @TheCorporatePlayers 5 ปีที่แล้ว +24

    A haven't understood a single line, but the song was awesome.

  • @JensVanHerck
    @JensVanHerck 9 ปีที่แล้ว +23

    I really like the dither effect

    • @Bisqwit
      @Bisqwit  9 ปีที่แล้ว +3

      Jens Van Herck Thanks! Nice to know I'm not the only one.

    • @kris_0520
      @kris_0520 4 ปีที่แล้ว

      Bisqwit Dithering is beautiful to me.

  • @tomascanevaro4292
    @tomascanevaro4292 6 ปีที่แล้ว

    I copied your code from the links you provided onto Notepad++, and i gotta say, it is one of the most well structured and documented pieces of code i've seen in my life. Cheers! keep up the great work!

    • @Bisqwit
      @Bisqwit  6 ปีที่แล้ว

      Wow. Thanks! Not a lot of people recognize the structure, only focusing on the unorthodox style of putting everything in one file and not using a whole lot of classes.

  • @Scrofrogoly
    @Scrofrogoly 4 ปีที่แล้ว

    I like to come back to this video every once in a while. Very awesome work.

  • @begoody
    @begoody 5 ปีที่แล้ว +7

    Wow, it's DOS ENGINE! Great work

  • @pathbanken1800
    @pathbanken1800 4 ปีที่แล้ว +7

    In fact, the youtube algorithm is very strange. Why everyone is finding this video so many years away from the release?
    Also, it's a beautiful gem of coding art

    • @Nitro2030ce
      @Nitro2030ce 3 ปีที่แล้ว +1

      TH-cam's version of a rerun?

    • @pathbanken1800
      @pathbanken1800 3 ปีที่แล้ว +1

      @@Nitro2030ce XD yeh, sounds logic to me. 😅

  • @minsukim7693
    @minsukim7693 6 ปีที่แล้ว

    Wow ! You are a rock star of retro programming. This is the most amazing programming I've seen in the last 10 years.

  • @scalethemachine
    @scalethemachine 3 ปีที่แล้ว +1

    Very cool. I have watched it 3 times! This inspires me to work more c++ code into my projects. Thanks.

  • @mouse7327
    @mouse7327 8 ปีที่แล้ว +9

    Props to you for writing adlmidi. Thank you.

  • @TheWholeShabang101
    @TheWholeShabang101 10 ปีที่แล้ว +29

    Wow, wish there were more videos like this on TH-cam!

  • @cold_ultra
    @cold_ultra 4 ปีที่แล้ว

    I really like the way your code editor works, looks like watching a VIM from an alternate universe

  • @trulyinfamous
    @trulyinfamous 6 ปีที่แล้ว +1

    I love those graphics so much. Something about them invokes in me a sense of nostalgia.

  • @iwikal
    @iwikal 6 ปีที่แล้ว +6

    There's just something special about that colour dithering look.

    • @someoneelse4811
      @someoneelse4811 5 ปีที่แล้ว

      It has a weirdly nostalgic look to it.

  •  10 ปีที่แล้ว +6

    pretty beautiful! looks like the portal game Scenarios!

    • @Bisqwit
      @Bisqwit  10 ปีที่แล้ว +3

      Thank you! The similarity is not entirely unintentional.

  • @consolords
    @consolords 5 ปีที่แล้ว

    This is really impressive! Well done.

  • @Aviv_S
    @Aviv_S 4 ปีที่แล้ว

    Looks absolutely brilliant.

  • @omegasynth2775
    @omegasynth2775 5 ปีที่แล้ว +7

    Do you have any idea of how talented you are? You made a fully playable first person demo with AMAZING lighting on DOS. THIS right here is impressive.

  • @JulioNIB
    @JulioNIB 5 ปีที่แล้ว +4

    very impressive

  • @guts2048
    @guts2048 11 หลายเดือนก่อน +2

    This is how all programmers should be programming, doesn't matter how hard it is, or how powerful the hardware is, optimize it as much as possible

  • @jocojuri
    @jocojuri 2 ปีที่แล้ว

    Oh.. I got so worried just now that I wasn't going to be able to find this video again! I'll favorite and bookmark it so that it doesn't happen again. Thank you for the music and the awesome coding. Hope you are doing well all these years later!

  • @MrDavibu
    @MrDavibu 6 ปีที่แล้ว +4

    Best Part! 9:10
    "This is actually my first OpenGL program, ever. Honestly. So bear with me. I'm not used to doing vector mathematics"
    LOL

  • @kikasuru3826
    @kikasuru3826 5 ปีที่แล้ว +7

    Holy crap! If this was made back in the day, it would've been crazy! ..and it'd run way slower.

    • @Guztav1337
      @Guztav1337 5 ปีที่แล้ว +1

      Bisqwit: Considering how Descent ran very well on such platforms, and all. But you'd need something a bit more clever than just rendering all polygons on every frame.

  • @CorvusNumber6
    @CorvusNumber6 4 ปีที่แล้ว

    That's pretty damn amazing. Well done to the coder!

  • @cookiechi2555
    @cookiechi2555 ปีที่แล้ว

    the realism on this is so Uncanny'ly cool i LOVE IT.

  • @OpenSurprise
    @OpenSurprise 4 ปีที่แล้ว +5

    *TH-cam Algorithm* has brought us together and its 2AM

  • @theblackhole05
    @theblackhole05 8 ปีที่แล้ว +113

    i wish i knew what was going on, i sort of just stumbled along here. and i'm so confused, but apparently this guy did something great and id like to understand what that was, so if someone could explain that be great!

    • @chris_burrows
      @chris_burrows 8 ปีที่แล้ว +125

      +Michelet Dickenson He wrote the backbone for a solid fucking 3d engine from scratch start to finish in 13 minutes real time. Obviously this is not off the top of his head, it's a retyping of a project that probably took some time, and in an informative and logical order. He is coding in a plane text editor, as opposed to some fancy developer tool, and, is typing faster than you've ever seen before. Not only that, but this practically next gen engine runs within the overwhelming limitations of DOS, a very shitty and basic operating system from the 80s. I doubt many people on the planet could replicate this.

    • @Dude7469
      @Dude7469 8 ปีที่แล้ว +43

      +Chris Burrows didn't know plane text editors have syntax highlighter

    • @theblackhole05
      @theblackhole05 8 ปีที่แล้ว +1

      +Chris Burrows ohhhhhhhhhhh

    • @patakk8145
      @patakk8145 8 ปีที่แล้ว +18

      +Chris Burrows wait, what!? this is real time typing?? i've just noticed that the time in the upper right corner really does suggest this was done in real time, I just don't understand how..

    • @Tudorgeable
      @Tudorgeable 8 ปีที่แล้ว +20

      +Paolo Čerić No it's not real time, it's a recording program he wrote himself to record a DOSBox emulator.
      It is possible to type that fast (I type at 120wpm average) but I doubt any programmer does so, off the top of their heads.
      There's a video on bisqwit's channel explaining how he recorded these videos.

  • @click64
    @click64 4 ปีที่แล้ว

    returning here again and again just to hear this beautiful OPL3 music conversion. Thanks!

  • @HonsHon
    @HonsHon 6 ปีที่แล้ว

    You're one of the most helpful people on TH-cam for programming. Thank you so much for all these videos.

  • @fermiLiquidDrinker
    @fermiLiquidDrinker 5 ปีที่แล้ว +54

    I have to be honest, I usually hate C++. But somehow, you make it look good. Shit, I wonder what kind of stuff you could do in Haskell.

    • @TIMLPDE
      @TIMLPDE 4 ปีที่แล้ว +1

      Imagine brainfuck

  • @wasiimo
    @wasiimo 9 ปีที่แล้ว +36

    Code is the ultimate puzzle which you cannot seize to get bored of there is always room for improvement not just in 1 language but multiple languages. When you code it is a feeling which you cannot simply express through words but through code itself is where the answers lie.

    • @wickedfilms1000
      @wickedfilms1000 9 ปีที่แล้ว +1

      fun Tertain That was really deep. But somehow, I still understood every word of it.

    • @wasiimo
      @wasiimo 9 ปีที่แล้ว +8

      Basile Stathopulos
      to be honest with you i have no idea what i typed and it was just a thirsty attempt to be a wise old man. -_- but it won't hurt if you explained my own words to me.

    • @chris_burrows
      @chris_burrows 8 ปีที่แล้ว +8

      +fun Tertain I think what you were trying to romanticise programming by making vague poetic points about its scope and complexity.

    • @Tudorgeable
      @Tudorgeable 8 ปีที่แล้ว +2

      +fun Tertain "It is better to say nothing and be thought a fool than to open your mouth and remove all doubt."
      Don't ruin the poetic vibe /w explanations, man

    • @chris_burrows
      @chris_burrows 8 ปีที่แล้ว +2

      And don't ruin the explanations with wishy washy poetic vibe. In any case, writing is writing bro, it's all meaningless art and killing time.

  • @chiciechocolate2949
    @chiciechocolate2949 3 ปีที่แล้ว

    pc.h: no such file or directory
    where can i get the pc.h file?
    Note: i am running on a linux platfom now.

    • @Bisqwit
      @Bisqwit  3 ปีที่แล้ว

      It is a header file specific to the DOS platform and the particular compiler I used (DJGPP). Graphics is not covered in C++ standard, so you always have to use platform-specific or vendor-specific solutions to do that. Or depend on some cross-platform third-party library.

  • @philfrisbie4170
    @philfrisbie4170 6 ปีที่แล้ว

    I am glad to see people are still using the DJGPP port of MESA. I originally ported MESA 2.6 to DJGPP using Allegro, but there was a later port by someone else using another library.

    • @Bisqwit
      @Bisqwit  6 ปีที่แล้ว

      Actually I am not using your port. I am using OSMesa, which has no rendering back-end such as Allegro, because it renders to a buffer. I supplied my own in this video.

  • @Rauli788
    @Rauli788 6 ปีที่แล้ว +4

    Amazing. What is that DOS-based text editor you are using?

    • @Bisqwit
      @Bisqwit  6 ปีที่แล้ว +8

      I made it myself just for these videos.

    • @Rauli788
      @Rauli788 6 ปีที่แล้ว +3

      Damn. I was actually hoping there exists text editor for DOS which looks as good as that.

    • @NinjaRunningWild
      @NinjaRunningWild 4 ปีที่แล้ว

      Bisqwit is there a download link for it?

  • @bruh-gn5kc
    @bruh-gn5kc 4 ปีที่แล้ว +3

    TH-cam 2011: Wait for it...
    TH-cam 2019: Recommend it now!

    • @bruh-gn5kc
      @bruh-gn5kc 4 ปีที่แล้ว

      Definetely original you have never seen this before please each like stops 1 criminal in Brazil

  • @peloncio6779
    @peloncio6779 6 ปีที่แล้ว

    Its so beautiful to create ur world and get to experience it.

  • @SebastianScholle
    @SebastianScholle 7 ปีที่แล้ว

    Your code comments are very good. keep up the good work!

    • @Bisqwit
      @Bisqwit  7 ปีที่แล้ว

      Thanks!

  • @Retron_yea
    @Retron_yea 5 ปีที่แล้ว +3

    In 240p it locks really great.

    • @nerdoxgaming2632
      @nerdoxgaming2632 5 ปีที่แล้ว

      144p is actually better, less of the lines show up

  • @Krokussify
    @Krokussify 9 ปีที่แล้ว +22

    fucking genius

  • @HyperionStudios
    @HyperionStudios 5 ปีที่แล้ว

    I’ve been to university with some gifted programmers but uhm....wow this would make anyone both envious and giddy with excitement. Good work!

  • @HoodyhooGames
    @HoodyhooGames 10 ปีที่แล้ว +1

    Simply amazing! Man that brought me back to my QBASIC 3D engine programming days. Of course, your C++ OpenGL 15 minute engine made my stuff look completely childish. Hope to see more! :)

  • @bluedragon9925
    @bluedragon9925 5 ปีที่แล้ว +14

    You made *this* in only *2 HOURS!?!?!?!?* Yeah... I think I can safely call you the next Satoru Iwata...

    • @NN-sp9tu
      @NN-sp9tu 4 ปีที่แล้ว

      It took him a week

    • @bluedragon9925
      @bluedragon9925 4 ปีที่แล้ว

      @@NN-sp9tu That's still insanely fast for a project this ambitious!

    • @NN-sp9tu
      @NN-sp9tu 4 ปีที่แล้ว

      @@bluedragon9925 big agree

  • @mal0gen
    @mal0gen 5 ปีที่แล้ว +5

    Man, the skills implemented here. I just love it.
    EDIT: It reminds me of Minecraft!

  • @chaleeman
    @chaleeman 8 ปีที่แล้ว

    I like the flickering effect, it makes the illumination more authentic

  • @therobin9810
    @therobin9810 6 ปีที่แล้ว

    Love it man, such an inspiration!

  • @user-yg1kj8dl6k
    @user-yg1kj8dl6k 5 ปีที่แล้ว +43

    It looks like Minecraft with RTX

  • @AdriansNetlis
    @AdriansNetlis 8 ปีที่แล้ว +5

    Does DOS not work with 8*8*8*8-bit color depth(4294967296 colors)?
    Nice shadows, BTW!:) Raytraced?

    • @Bisqwit
      @Bisqwit  8 ปีที่แล้ว +11

      16-bit color and 24-bit color support came later in SVGA cards. Because 4 bytes per pixel per 320x200 resolution (or higher) requires significantly more memory than 64 kilobytes, utilizing these SVGA display modes is not easy in 16-bit DOS with a single 64-kilobyte video memory segment. It is possible, but omitted in this video for sake of brevity (and to get another excuse to implement dithering).
      Yes, the shadows are raytraced into static lightmaps, that once calculated, can be used in real time.

  • @Cup_70
    @Cup_70 7 ปีที่แล้ว

    Wow. that's unbelievably well done.

    • @Bisqwit
      @Bisqwit  7 ปีที่แล้ว

      Thanks!

  • @abramthiessen8749
    @abramthiessen8749 5 ปีที่แล้ว

    Oh man, I have so much that I can learn from this.

  • @cubefish2320
    @cubefish2320 5 ปีที่แล้ว +5

    June 4 2011, TH-cam? And you want THIS LONG, TH-cam???

    • @space9824
      @space9824 5 ปีที่แล้ว

      Same experience XD

    • @__-wc5zn
      @__-wc5zn 5 ปีที่แล้ว

      *wait

  • @KennethIsrael_aiikendoit
    @KennethIsrael_aiikendoit 5 ปีที่แล้ว +7

    10:37 thank me later, i feel liked playing doom in DOS games

  • @poetranoegraha6641
    @poetranoegraha6641 4 ปีที่แล้ว

    insert mode and "del" are kinda satisfying to watch.

  • @PeterLakeTV
    @PeterLakeTV 11 ปีที่แล้ว

    This is just awesome! :D Absolutely amazing :)

  • @Z4ki12
    @Z4ki12 5 ปีที่แล้ว +3

    This really gives me a strong 80's feel.

  • @CreeperGabe
    @CreeperGabe 10 ปีที่แล้ว +9

    Do you have a binary I can download for this?

    • @Bisqwit
      @Bisqwit  10 ปีที่แล้ว +31

      No

  • @redchards
    @redchards 10 ปีที่แล้ว

    You're a great inspiration for me, thanks for your videos man ;)

  • @nicholasoliveira6363
    @nicholasoliveira6363 6 ปีที่แล้ว +1

    i dont get tired to watch this movie
    its an inspiration for me, i dont have that skills but inspires me to evolve