Uni projects: Brainvaders

March 20, 2008

This project was, by far, the most enjoyable one I’ve ever undertaken at university. The assignment was simple, as they often were – we had to remake Space Invaders using Blitz Basic. As it was the third and final assignment on my Computer Games Development module, I decided to pull out all of the stops and spend a solid month or so (I’m sad like that) creating what you see here.

Brainvaders juggles the Space Invaders formula around a bit. Instead of being stuck with the same old boring ‘pchoo rifle‘, you’re given the ability to upgrade your alien-blaster to a choice of four other weapons (rapid fire, double shot, triple shot and homing). You can also upgrade your shields to withstand more damage, and buy a few nifty extras like a tractor beam and ‘orbiters’, which help with the alien blasting. Upgrades can be purchased in exchange for alien brains (which are favoured for their mild creamy taste. Great on toast!), which must first be seperated from their original owners.

Brainvaders follow the typical Invaderesque style of movement (Drop down! Increase speed! Reverse direction!) with the added freedom of being able to swoop down to get a bit close and personal whenever they feel like it. This will happen more often as you kill more of them, so don’t stay still for too long…

As you dispose of waves of enemies, new ones will arrive that are slightly stronger and more aggressive. If you die, the game won’t actually end, you’ll just lose around half of your points. Thus, you’ll be able to keep playing until you get bored.

All of the content was made by me except the sound effects which were all made by my good friend, Matt Griffith, whose voice acting abilities are almost godlike.

Brainvaders Brainvaders
Brainvaders Brainvaders

Links:


Uni projects: Stick Tennis

March 19, 2008

Recently, I’ve been busier than ever. I’ve had no less than four projects to juggle, two of which are now – thankfully – complete. I’ve been working on the other two almost incessantly, but during my brief breaks I’ve been writing a computing article that should hopefully interest. For now, I’m just going to post the remainder of my university projects from last year. These ones are a bit more exciting!

The first is Stick Tennis. This is the first graphical game I got to make in university, and made a nice change from Interactive Fiction!. The assignment specification was incredibly simple: make a Pong game. Beyond that we had free rein, as long as it didn’t stray too far from the original concept.

The rules of Stick Tennis differ slightly to those of the original Pong. The scoring system is a dumbed-down version of tennis (each successive point is worth 15, 30, 40, etc) and the playing field is a lot longer than it is wide. I was actually quite lucky to pass this assignment with the score that I got (85%+) because I neglected one of the fundamental rules of Pong – that the ball should be able to bounce off the top and bottom of the field. Luckily, my lecturer overlooked this.

If you find it difficult to hit the ball, don’t worry – for a pong game it’s insanely difficult to control! You’ll probably get bored and stop playing before winning against the computer anyway. It’s not the exactly the most exciting game in the world, but it might keep you entertained for a few minutes while you watch the ridiculous budget stickman animations in action (which I’m actually really proud of).

I’ve included the source code for anyone interested in taking a peek. It’s in Blitz Basic format (.bb)

Stick Tennis Stick Tennis Stick Tennis

Links:

Source code & exe


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.)