A new set of logic gates

February 18, 2008

Logic gates are useful things. While I’m typing away at my PC writing this article, millions (if not billions) of gates are flipping ones and zeroes at my very whim (it almost makes you feel powerful, in a sad, nerdy kind of way).

Jobs involving logic gates are dwindling in number. The problem is, logic gates aren’t vogue any more, so nobody wants to learn how they work. Why’s that? Well, they haven’t changed much at all since they were invented many years ago, and the icons still leave much to the imagination. That’s why I’ve invented a host of brand new gates, in order to put them back in the limelight!

Read the rest of this entry »


Uni projects: School’s Out

February 4, 2008

In my first year of university, I made the mistake of taking Computer Games Technology as a result of my pipe dream to become a profesional games developer. I’ve had a little sense smacked into me since then, but in the time that I did spend on the course, I made three games which I’m releasing for all to play.

The first game is an interactive fiction (text adventure) game called School’s Out in which you play a school kid who manages to get himself locked in school at the beginning of the mid-term break. Using the objects lying around the school, and your own wits, you need to find your own way out before you die of boredom (or your own stupidity).

It was made using Inform 6, which is a functional but limited language (I’ve heard 7 is much better, but we couldn’t use that). To run the .z5 file you’ll need a z-machine interpreter; I recommend Frotz.

School’s Out was a collaborative effort by myself and two others in my group, Stuart Hayes and Ben Holland. We wrote out a walkthrough as part of the specification, but none of us seem to have it any more! I still remember how to complete it, though, so if you’re stuck, just post a comment or something and I can help.

Links:

Source code & .z5 file


Uni projects: 3D map

February 3, 2008

The the second assignment I had to undertake for my Programming (PR1201) module was to make an interactive map of an area (real or fictitious) using the Java applet API. The basic features it had to exhibit were:

  1. Interesting landmarks such as lakes, buildings, forests, etc. These were to be drawn with basic shapes – circles, rectangles, irregular polygons, etc.
  2. The ability to click on the map and be given info about the nearest landmark, as well as the distance from the cursor.
  3. Buttons corresponding to each landmark. Clicking on the should give information about that landmark.
  4. A bar representing the map’s scale (i.e. 100 pixels = 1 metre).
  5. A search box programmed with some basic search queries.

With a new-found penchant for making everything 3D, I started working on a new engine for rotating and tilting a world map and calculating the positions of sprites sitting on it. This was much easier to do than my previous project because the Java applet API can render filled polygons, but Java elements can’t.

I chose an imaginary nature park for my location, so there are plenty of trees and lots of water. If you look at allenk_groupG_Initialiser.java, you’ll see there are a hell of a lot of sprites dotted around. Luckily, I didn’t have to code them by hand – I modified my applet to output Java code to a file, and voila – a makeshift park editor.

I got a score of 90% for this applet, which is the highest score I’ve achieved for a piece of coursework so far.

Java map 1 Java map 2 Java map 3

Links:

Source code and class files
View the applet in your web browser


Uni projects: 3D spinning donut (torus) in Java

February 3, 2008

I’ve decided to release my university projects from last year onto the Internet for people to examine, scrutinise, use to help them with their own studies and hopefully enjoy.

The first project on display is my first Programming assignment, for which we were asked to create a short animation in Java using an educational package by Bailey & Bailey, Java Elements.
Skirting the assignment brief somewhat, I made a small 3D rendering engine which used Elements’ line drawing functionality to draw triangles, which in turn make up complex 3D shapes. I think I got away with this not strictly being ‘an animation’ because it spins about its axis.

I made this before I had any real concept of good OO practices such as encapsulation and decoupling, so there’s plenty of room for improvement. I’m still proud of it because this is the first time I’d tried making something of this nature and I have to say it went really well.

I scored around 85% for this, which I was happy with, but could have pushed towards 90% or possibly higher, had I followed the brief a bit more meticulously (one of the requirements was that I had to use all of the shapes provided by Elements, which I definitely didn’t do).

Java donut 1 Java donut 2

Links:

Source code and class files
Java Elements package (required to compile and run; include this in your Java classpath.)