Hi! I'm Nathan Hoad


Intro to scripting

Chess

Before entering my final year at uni I consulted an academic advisor to see if I would graduate when I was expecting to. Both degrees that I was studying (IT with an Interaction Design major, and Multimedia) had been restructured and some subjects that used to be core were now electives and vice versa. As it turned out, some of the subjects that I had already finished thinking they were core were now considered electives so now I had to use up the electives that I had been saving on core subjects. One such subject, MMDS1400 (Intro to Scripting) didn't even exist when I started uni but since it was now a core subject I had to take it.

MMDS1400 is a first year scripting course that introduces students to the basics of html and javascript. The major project for Intro to Scripting was to create a game using javasript (and no AJAX as well ). A friend of mine and fellow forth year at the time, Dan Wall was also taking the subject and shared my general sense of ridiculousness that two final year students had a first year subject suddenly becoming mandatory. Because the coursework was so simple we decided to push our major project a bit further than what was required to pass. For our javascript game, we chose to implement Chess.

We set about drawing the pieces (in Inkscape, of course) and writing a quick script to free-form move the pieces around the board. Pretty soon we had a very basic chessboard. Our next move (chess pun? no, just a coincidental choice of words) was to restrict the movement of the pieces to within the rules of the game. We started by writing down all of the moves that each type of piece could make and found any patterns that we could exploit in our code; the moves of the Queen, for example, can be found by combining the moves of a Bishop and a Rook. We wrote in the moves available to each piece, added a move timer and our game was done. We had several known limitations (such as moves wrapping around the board, and no Castling or Pawn promotion) but we felt that we had more than satisfied the requirements of the assessment.

A final part of the assessment was to bundle our game in a website explaining the process of constructing our game. You can view our chess site here.

If I just made your day a little better then thank me with a coffee or maybe a a pizza