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

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 320×200 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.

Patreon: (alternatives at

I wrote a FAQ after this video was picked up on Reddit the first time in 2012. Here it is:

Source code and prebuilt lightmaps: (Compiles and runs on Linux):
(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:

#Bisqwit #3DProgramming #Dithering


Xem thêm bài viết khác:

3D Printed Marble Game | Amazing Board Game Labyrinth
FLIP THE TABLE! | Cho Chabudai Gaeshi | Super Table Flip | Awesome Odd Unique Japanese Arcade Game
Top Game Mobile Sinh Tồn “ Chế Đồ, Xây Dựng, Chiến Đấu” Offline/Online 2020 | TopGame
  • 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.

  • Hey this could be a good aesthetic for an indie game…

  • When Minecraft RTX released in 1990's

  • Old OpenGL is weird 🙂

  • Holy crap. This looks better than even Quake 2 in hardware acceleration mode. And this is all software?

  • good ol' memcopy . wrote a 3d engine in qbasic using it. but never imagined opengl

  • What is the GL library for DOS? Is it based on the Mesa software renderer?

  • Every time I look at C Coding videos I almost have a heart attack, but this one video makes me happy

  • I just found myself 2nd time watching this video and the aesthetics to this game are amazing!

  • I thought the video was fast forwarded looking at the typing speed but then i saw the timer and realized that this guy just types this fast, Mother of god…

  • Woah this is incredible!!!

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

  • Why don't you keep the source on GitHub?

  • ColdCold

    Author Reply

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

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

  • Old, but gold! I'm very fascinated by the lighting in the scene – is the code for baking the diffuse radiosity available?

  • Omg I can’t even do all of this!!!! 🙁 you’re one book of knowledge!!!

  • So noisy rendering

  • K G.K G.

    Author Reply

    Seeing this code almost a decade later, is there anything you would change about how you implemented it, knowing what you know now?

  • I like the music

  • Feeling quite depressed after watching this – suicidal even.

  • hyper Nerd !! made my evening

  • OwlOwl

    Author Reply

    suomi <3

  • the coding is okay but yikes what's up with the Arabic intro

  • What is the background music called? I searched whole Lufia 2, as it was said in comments, that this is where is from…

  • Which technique of rendering you used in this video (program) ? (i am new to 3d graphics)

  • think i already asked but do you have the dos binaries?

  • bonesbones

    Author Reply

    why is this video from 2011 in 4k

  • God isn't real

  • Think you could put up the song?

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

  • Incredibly enough, I went : “Did he just wish おやすみ ?? No, must have been some Finnish!” 🤣🤣🤣


  • Hi Mr. Bisqwit, What OS do you use?