Christopher
Stoll

HTML5 Space Invaders Clone: iPhone Edition

As a programing experiment I decided to see if I could modify my HTML5 Space Invaders Clone in order to make it work on an iPhone. I was primarily interested in taking advantage of the tilt sensor using JavaScript. It was not too difficult, and the defender in the game moves from side to side based upon the phone's rotation. Below is a link to play the game, and after that is the relevant code (after the jump). It has been optimized for the iPhone and thus does not work as well on a PC.



Space Invaders Clone for iPhone


continue reading


HTML5 Space Invaders Clone V1

I wanted to learn more about HTML5, especially the new canvas tag, so I came up with a little project. I decided to develop a completely web-based version of the classic Space Invaders game. It turned out well enough that I thought I would share it.

You can click the link below and the game will launch right on this page, or you can drag the link to your bookmarks bar (if you have one) and launch it from there.

continue reading


Old-Schcool UNIX Script: Clean House

The hard drives on the Silicone Graphics IRIX systems that I used to administer were always filling up. We had plenty of hard disk space, for the time, but the systems were used in ways that quickly ate up any available space. Some of the workstations were used for running engineering analyses that could generate humongous result files, while others ran CAD applications which left behind many medium-sized temporary files. To keep the systems running it was necessary frequently clean up the drives, and since manually cleaning up disks can be error prone I wrote a script to do the work for me. Since I wrote the script to do some of my work for I had a little free time to add a nifty progress display, which makes the program slightly more complex.

continue reading


Old-School UNIX Script: Cluster Command

As a UNIX systems administrator I had to maintain many individual workstations located throughout our facility, and I frequently had to either perform updates on all of the machines or some some subset of them. Logging in to each machine was tedious, even if I was just running a batch script, so I created a script that could send my commands out to all the computers that I listed in a configuration file. The configuration file was a simple text file with a workstation name on each line.

Each of the workstations mounted a common user home directory, so I create a shared home directory for root where all of the administration programs would be located (note that this was not root's actual home directory as that would be problematic if a workstation ever experienced problems accessing the NSF share). With the administrative batch files accessible to all the workstations I could use the script below to initiate the command on the cluster.

continue reading


Simple Game Theory Algorithm 1 in JavaScript

I have been working on a very simple artificial intelligence algorithm based upon my limited knowledge of game theory. The purpose of the algorithm is to keep track of other actors' karma so that we know how to treat them. The algorithm is a modified tit-for-tat (as demonstrated in Thinking Strategically).

Assume that we are creating a virtual world which contains a main character who interacts with other actors. The main character would instantiate a karma object (var actor_karma = new karma();) for each of the other actors he encounters. For each interaction with the other actors the main character records whether that actor's actions were good (actor_karma.addDeed(true);) or bad (actor_karma.addDeed(false);). Based upon this information the main character would know whether he should treat the actor favorably (true is returned) or not (false is returned).

Below is the JavaScript code (continued after the jump).

continue reading


Old-School UNIX Script: .profile

Many years ago I managed numerous SGI UNIX workstations of various vintages (Indigo, O2, Octane, Origin, etc.). I wanted to be at home when I logged into any of the machines, and the user home directory was on an NFS share my .profile was always available, but I had to deal with the various capabilities of each particular computer and the different ways in which I would log in. So, I created a .profile script that would add features as they were available. Below is that old login script.

continue reading


From the Office of the Ex-Vice President

This is the text of a letter sent to my grandfather in October of 1973. The envelope had a return address of "The Office of the Ex-Vice President, Mr. Spiro T. Agnew, Washington, D.C.," but the letter was signed by Bob Haldeman of The New Republican Society. My grandfather, a Republican, has been dead for many years, and no one else had any further insight into the letter. Here it is exactly reproduced:

continue reading


The Holocaust

The holocaust is largely remembered simply as Germany’s attempt to systemically eliminate the Jews, but this summary view does great injustice to the truly awful situation. The convenient, abbreviated version of history pits the malevolent Germans against the helpless Jews while casting everyone else in the European theatre as saviors. Thought the Germans were indeed the main antagonists, they were certainly not alone; even the allied powers were in some regards accessories to the crimes against humanity. Though these crimes targeted primarily Jews, they only accounted for approximately half of the over 11 million people systematically murdered by the Nazis and their supporters. Of the Second World War’s 30 to 50 million civilian casualties, the Jews represented 10 to 20 percent. This is not an attempt to marginalize the plight of the Jews, rather it is an attempt to show that narrow views of World War II history marginalize the deaths of over 25 million civilians and insulate the victors from responsibility. The holocaust should more accurately be summarized as the period when the world allowed fanatics to systematically eliminate tens of millions of defenseless people.

continue reading