Have You Scene My Demo?

I first started programming around 1978. Way back then, the machines were Commodore PET, RadioShack TRS-80, and later Apple I and the like. The literal birth of ‘personal’ computing. A spreadsheet (VisiCalc) was the talk of the town, transforming mainframe work, and thus ‘do at office’ into “do at home”, work. That was, I think, the original impetus for “work from home”. And here we are again…

Back then, on my Commodore PET, I programmed in ‘machine code’, and ‘assembly’, and later ‘BASIC’. Ahh, the good old days of an accumulator, stack, 8K of RAM, and a cassette tape drive. A lot of very clever programming was achieved in these very limited computers. With the rise of the Commodore 64, Apple II, and Amiga, we saw the birth of the “demo scene”. These were smallish programs that stretched the capabilities of the machine to its breaking point. Live synthetic music, three-D fly throughs, kaleidoscopic effects, color palette shifting waterfalls. It was truly amazing stuff.

Roll forward a few decades, and we now carry in our pockets machines that have the power of the ‘mainframes’ of those days, in the size of a cigarette case. It’s truly amazing. And what do we do with all that power? Mostly chit chat, email, web browsing, movie watching, and maybe some game playing. On some very rare occasions, we actually make phone calls.

Well, for one reason or another, I find myself wanting to go back to those roots, and really fiddle with the machine at a very low level. I might not get all the way down to machine code (very painful and tedious), but I can certainly come down out of the various frameworks, and create some interesting little apps.

And again, why?

Because, that’s what programmers do. If you ever ask yourself, ‘how can I program this effect, or just throw together this thing, but I want it to be really special’, then you’ve got the bug to tinker. Here I’m going to lay out how I tinker in code. What I play with, how I build up my tools, what design choices I make, and the like.

This post, in particular, serves as an intro to a series, “Have You Scene My Demo”. The image at the top of this article is showing off window, which is displaying 30 instances of live video being captured from a corner of my development machine. It’s specialness comes from thinking different about how to do capture, how to display, how to track time, and the like. The actual detailed walkthrough will be for another time.

What makes for a good playground?

Well, it kind of depends on what kinds of applications you want to develop, but roughly speaking, I want some tools so I can deal with:

UI – Mouse, Keyboard, joystick, touch, pen

Windowing

Sound

Networking

Those are the basic building blocks. In my particular case, I want the code to be portable ready, so I try to lift up from the Windows core as soon as possible, but I’m in no hurry to make it truly cross platform. For that, I would probably just do web development. No, these demos are to explore what’s possible with a particular class of machines, running a particular OS. I want to plumb the depths, and surface the deepest darkest secrets and amazements as are possible.

In brief, my environment is Windows. My programming language is C/C++. Beyond that, I use the graphics library ‘blend2d’, simply because it’s super fast, and does a lot of great modern stuff, and it’s really easy to use. I could in fact write my own 2D graphics library (and in a couple of demos I will), but for the most part, it’s best to rely on this little bit of code.

So, buckle up. What’s going to appear here, in short order, are some hints, tips, and code for how I create tinker tools for my software development.

Previous
Previous

Hello Scene — Win32 Wrangling

Next
Next

2+ Decades @ Microsoft: A Retrospective