256 colors is enough for everyone
Sign in to YouTube
Sign in to YouTube
Sign in to YouTube
Uploaded on Feb 24, 2011
In this video I use source code as means to illustrate how stunning RGB graphics can be achieved on a 256-color screen, so much that you actually may doubt whether it is really only 256 colors.
Note: The animation does not look blurry because of dithering. Dithering does increase blurriness a little, but in a different way and most certainly not this much. The reason to blurriness is that the actual video is all about orbs that do not have a defined edge (they're just clouds of pure light). And then there's motion blur that is added to it. In other words, the _original_ video material is blurry. I created it this way to maximize the number of color mixtures shown.
[SPOILERS BELOW]
Disclaimer: The story behind this video is a fabrication to justify the fact that the code is too complex for QuickBASIC to run, and too heavy for today's computers even if translated to C, unless run on a multicore CPU. All the technical details are absolutely correct. I did indeed write the first revisions of this program in QB, but I then translated it to C++, with which I created the actual animations after refining the code a bit, and I backported the changes to QB to show how it _would_ be done, did QB not have those limits. The reason why it is slow is not because of dithering, but because of the really ineffective algorithm for rendering stars, dithering or not; what with doing some 25000 distance calculations tests _per pixel_.
[END SPOILERS]
Also, I am not advocating anyone to replace 24bpp with 8bpp. Rather, I am trying to educate programmers to utilize paletted resources better, and I illustrate some exact algorithms with which to achieve that. Stop using floyd-steinberg for GIF animations!
If you cannot get the program working, you are not yet part of the target audience.
Note: In this video, I used a copy of actual QuickBASIC 4.5 by Microsoft... well, Megasoft Corp. However, after creating and publishing this video, I discovered QB64, a modern free port of QB. I ported this program to QB64! It works, though minor changes. Here is a link to the QB64 version's source code: http://bisqwit.iki.fi/jutut/kuvat/pro...
Note that it still requires computers from a parallel universe to run smoothly...
-
Category
-
License
Creative Commons Attribution license (reuse allowed)
- Source videos Loading... View attributions
Loading...
Loading...
Loading...
Loading...
-
1:33
12 year-old Computer Genius from 1984by marctasmanFeatured
967,814
-
15:00
Creating a raytracer for DOS, in 16 VGA colorsby Bisqwit
7,592 views
-
4:09
Windows 3.1 on 1gb ram!by dquad
60,327 views
-
3:13
Kitas kampas normaluby sh1ftas969
26,962 views
-
18:21
Creating a MIDI player in MS-DOS / BASICby Bisqwit
6,211 views
-
14:56
OpenGL programming, simple FPS style walking scene (DOS)by Bisqwit
51,012 views
-
4:16
internet in DOSby Oles Mg
92,011 views
-
10:20
Batch: How to use multiple colors at the same timeby GrellesLicht28
9,288 views
-
9:21
Nintendo Censorship in the 8 and 16 Bit Eras!by rinrygamegame
214,867 views
-
12:06
VoodooPad Tutorial Basicsby Roodycar
2,417 views
-
8:15
Creating a YouTube video in QBasicby Bisqwit
5,047 views
-
14:58
Creating a MicroBlaze emulator in C++11 (runs Linux!)by Bisqwit
5,790 views
-
10:58
Writing a QBasic game from scratch -- Snake game exampleby Bisqwit
22,138 views
-
6:06
Digital Audio 102 - PCM, Bit-Rate, Quantisation, Dithering, Nyquists Sampling Theorum - PB15by ProductionBytes
4,576 views
-
4:47
QuickBASIC Mario 1 clone i did 4 years ago, never finished. it sucks.by kingcrimson234
5,187 views
-
9:45
Doom on CGA (4-color and composite/colorburst mode) and EGAby Bisqwit
5,919 views
-
2:33
Black Moth Super Rainbow - I think it is beautiful that you are 256 colors too - Music Videoby Chancellor Leopard
173,833 views
-
15:04
Creating a NES emulator in C++11 (PART 1/2)by Bisqwit
59,318 views
-
4:57
Introduction To Dither | iZotope Insider Tipsby izotopeinc
8,361 views
-
22:24
Programming Arduino in C++11 -- ROM dumpingby Bisqwit
5,780 views
- Loading more suggestions...
Uploader Comments (Bisqwit)
matsv201 4 months ago
Well 25 000 calculations strings per pixel. Thats about 2 biljon loops per frame and probably 50 biljon per second, probobly neading about 4 cores of around 3Ghz (128bit simd) fully optmized code to make it run. Its probobly not that hard to make it optimized the pallet for every frame, then it probobly look as god as a 12 or 16 bit grapichs.
Sign in to YouTube
Sign in to YouTube
Bisqwit 4 months ago
Thanks for the analysis! :-) I double checked it and your math seems to match. But of course, it would be much smarter to optimize the actual algorithm, so that there won't be 25000 calculations per pixel, rather than to micro-optimize using SIMD and multithreading.
Sign in to YouTube
Sign in to YouTube
Video Responses
All Comments (109)
zungaloca 4 months ago
subs are really fast
Sign in to YouTube
Sign in to YouTube
Rogue Packets 4 months ago
If you wanted to, you could *give* the orbs defined boundaries by using Atkinson dithering.
Sign in to YouTube
Sign in to YouTube
Bisqwit 5 months ago
At least if you use BASIC. That's why I recommended the approach of porting it to the fastest compiler & language available to you. :-)
Sign in to YouTube
Sign in to YouTube
intel386DX 5 months ago
on I see now I run your source code with this windows version of QB an realized that I need probably an a super computer to run it properly like in your video :D
Sign in to YouTube
Sign in to YouTube
Bisqwit 5 months ago
The video also shows a QuickBASIC version 4.5 made by Megasoft Corp, not by Microsoft. Yours is no doubt made by Microsoft. Please read the subtitles! (Also, reading the video description may be wise.)
Sign in to YouTube
Sign in to YouTube
intel386DX 5 months ago
I see your link of source code is for QB64, but the video shows version QuickBASIC 4.5 can you post this source code , so I can try to run it ? :)
Sign in to YouTube
Sign in to YouTube
Bisqwit 5 months ago
To run it, you should port the program to the fastest language and compiler at your disposal.
Sign in to YouTube
Sign in to YouTube
intel386DX 5 months ago
ok then which version should I us to run the program?
Sign in to YouTube
Sign in to YouTube