Ancient programming projects, part 1

Once in a while, I think most people develop a certain amount of nostalgia for their childhoods. This past week, I’ve somewhat started a trip down memory lane, and have resurrected some of my earliest projects, which brings me plenty of good memories. I will maybe share more of these projects in some of the future posts.

First, a bit of background: When I was young, my parents would never allow me to have a video gaming console, even though I wanted one badly and all my friends were immersed in the technology glut of always wanting to upgrade to fastest and computationally powerful gaming consoles. While I was living in Chicago, I briefly owned a Sega Genesis console, which my dad had bought for me along with a few games to play. I am not sure what happened to the console eventually, but it seemed to just disappear from my life; perhaps my dad saw I was spending a large amount of time with it and eventually gave it away without me knowing? Eventually, I was given a Nintendo Game boy, and after a rather uncomfortable episode of my dad discovering I had stolen batteries from him to power it on, he essentially destroyed the Game Boy. This was around 1995.

Sometime around then, my dad bought me a copy of Microsoft Visual Basic 4.0 (computer application), and told me if I wanted to make games, I would have to create them myself. Around that time, he imposed stricter controls on how I could to spend my time around the computer, which could easily lead to all forms of addictive behaviors. The goal was that if I were to play games, I would have to first create them myself. I was up for the challenge. I immediately immersed myself in self-learning, and began to teach myself how to program in Visual Basic. I remember beginning small, creating small forms which displayed simple messages, then over time, the quantity and quality of my projects gradually increased over time. I discovered a web site called www.planet-source-code.com  (now www.planetsourcecode.com), which is a forum in which you could submit code projects for several different languages, and compete against other submissions for the honorary title of “Coder of the Month”. When I began using this site, I did not think I could ever compete against some of the contest winners, however within a couple of years, I won coder of the month for a Scorched Earth-style ballista game which I had created. From 1997-2000, I had developed an increasingly expansive and diverse code portfolio. The majority of this code library was lost over time due to inadequate file management. The only evidence of my work during these years are the thirteen code projects which I can still download from planet source code (link) even though the site went through a major data loss in 2015. To get these projects working, I set up a 32-bit Windows XP virtual machine, since I doubt Visual Basic will work on 64-bit Windows 10. Most of the projects I was able to get to run, however the graphical interfaces all seem like they had shrunk in size, and much of the animations which had relied on a slow computer speed seem to have sped up due to the improved processing power of my current computer. I tried compiling some of these projects for Windows 10, and surprisingly, I was able to get some projects to work. I ended up converting all the projects to Visual Basic 6.0, which is the version which I have kept in my software collection.

Random Shape Generator

One of the projects that turned out surprisingly well was a screen saver I had created which generated random shapes. I cannot get this screen saver to work in Windows 10, but it works fine in Windows XP. In this project, it started by me experimenting with a series of vectors with varying length and diverging at random angles, and I wondered what it might look like if you take this series of vectors and then keep repeating it several times. For instance, your typical square consists of a single vector with an angle of 90° repeated end-to-end four times; and most common geometric shapes could be reconstructed using this same process. What I was surprised to learn is that as long as the series of vectors doesn’t have a tendency to shoot off in 180° will eventually end up exactly where they started. In the process, the repetition of groups of vectors would create a shape which has interesting features. Some how out of your chaotic array of random vectors, there tended to appear order, and that to me was beautiful. I took this concept, and figured out how to turn it into a screensaver. I added some variability into color gradients used to draw the shapes which added an extra dimension to the graphics. These color gradients also behaved in a random way.

In the above video (best viewed in high-resolution full-screen), I took around 10 minutes of screen video of the screen saver running on the Windows XP virtual machine I set up, and overlaid it with some Bach. The screen saver appears to run faster now than I remember it running almost 20 years ago, and at some point the animations appear jumpy. However, it’s a relic of the past which has a certain amount of meaning for me, and I think most people can appreciate.

In Windows XP, the screen saver installs and has various customization features. On the Screen Saver setup screen, the screen saver resizes to display in a miniature preview screen image. When you click on the settings button, you can adjust the number of shapes which show up on the screen at once, the time between screens and shapes, and line thickness. An “about” button shows a dialog which gives credit to another Planet Source Code contributor who had provided much of the code I used to develop the screen saver.

Display Properties -> Screen Saver window
Screensaver setup screen, showing customizable fields

Another piece of software included with the screen saver submission allowed for designing various shapes. The interface provided a way of defining the number of vectors in a segment, the length and angle of those vectors, the gradient colors, and display settings such as grid and axis display.

Shape creation software

The Visual Basic source code and installer packages can be downloaded using the following links. Keep in mind, it probably won’t work on Windows 10 — and need I even mention, DAD, it won’t work on Macintosh (unless you start a Windows XP virtual machine, which you can do using Parallels). The recommended operating system is Windows XP (which very few people even use anymore). Also, note that the software also has quirks. I think this should be understandable, because it was developed by a 16-year-old.

Source Code:

Installers:

Leave a Reply

Your email address will not be published. Required fields are marked *