All 10 entries tagged Programming

View all 110 entries tagged Programming on Warwick Blogs | View entries tagged Programming at Technorati | There are no images tagged Programming on this blog

November 23, 2006


Follow-up to My impressive game that's no fun to play from Draknek's Deprecated Devlog

New version.

Bullets no longer fire straight ahead; they have a small amount of randomness in the starting direction (required rewriting lots of code).

Your current health is now displayed onscreen. It’s not always easy to read, but it’s better than printing to the command line.

Guards no longer magically know where you are and what you’re doing – they now only attack you if they can see you and you’re holding a weapon.

I introduced several bugs and fixed them (including one where all doors were at right angles to the gaps they should have been filling).

I got rid of the 15 second opening screen until such a time as I can make it work in a non-hacky way.

Stairs no longer crash the game. The bug was a stupid typo – if I’d seen it, this could have been working in the submitted version. It did take me about an hour to find said stupid typo, though.

I rewrote the code so that it finds the size of an image automatically, instead of having to store it in an annoying variable.

I gave it a working title.

Unfixed bugs:

If you shoot a person or a wall at point blank range, you take damage.

There’s no way to win.

November 21, 2006

My impressive game that's no fun to play

Follow-up to 48 hour game making competition from Draknek's Deprecated Devlog

Summary: I made this game.

So I teamed up with Sam, who does Computer Science and knows lots about making games. Expecially compared to me – I have made one game of extremely low complexity, and I can’t even get it to play properly from a webpage.

You can find a large number of games made by him on his website, but some may not work without installing VB libraries. The Tank Attack one should work, though, and is impressive.

The theme of the competition was chosen to be “nuclear”. We decided to make a 2D shooter where you control a terrorist trying to blow up a power station with a variety of exciting weaponry. The aim of the game would be to blow up all the cooling tanks, and then get out of there before the whole building exploded. After a certain point, large amounts of police would turn up, and they’d be better armed than regular guards, making your job much more difficult if you spent too long.

We had decided to work in Java because I run Linux and anything else would be difficult for me. Sam has never done any graphical stuff with Java at all, so I started with the programming while he made images. The LotH game, while graphically unimpressive, provided a good starting point, and it didn’t take long to start drawing images to the screen.

The game required that the images be able to rotate, however, which was substantially more work. It took large amounts of experimentation with the rotate() method before I worked out that this is what you want to do:

1) Get the canvas image you’ll be drawing onto
2) Find the position you want to draw the image at.
3) Rotate the whole canvas around that point.
4) Draw image.
5) Rotate canvas back.

After that, things got simpler again. I basically spent all my time coding, and Sam spent all his time doing pixel art and working on level design.

There was a power cut during Saturday evening which sent the entire room into complete darkness except for the light generated by laptop screens. I should really have gone home and gotten a few hours sleep, but instead I slowly built up a headache from laptop screen glare and generally wasn’t able to do anything for an hour (when the power was restored). A couple of hours later, the headache got to the point where I wasn’t capable of doing anything anyway, so I went home and slept for about 6 hours.

Then there was nothing but the last 12 hours of frantic coding. I desperately tried to add all the features necessary to make it vaguely game-like, most of which took longer than they should have. In the last hour, I tried to support multiple levels, but when we got to the 15 minute mark and it was still giving weird errors, Sam suggested I give up and add a start screen and some kind of death code instead. It was a massively ugly hack, but I got it working.

I spent some of today working out why applets don’t like me when I put them on the web, and found a couple of reasons. I resisted the urge to rewrite the code to make it work there, and instead found workarounds so that the code could be the actual 48 hour version.

I have lots of ideas of improvements I can make, so it will be updated. Probably at the expense of the two courseworks I have due in not long from now.

I also made the LotH game work, but it’s very flickery, so I need to make at least a small change to that.

Summary: I made this game.

Please tell me if it doesn’t work.

November 17, 2006

48 hour game making competition

I’m going to seriously regret this come Monday morning…

September 27, 2006

Filler entry

I have done exactly two (2) things of interest in the past week.

1) I went with my family to my grandparent’s 50th wedding celebration via my parents’ friends’ house.

2) I’ve been working on the Lord of the Hoops game. It’s been rewritten and is close to a beta release.

Hopefully, I can do that before leaving for Warwick on Friday. Of course, I need to pack at some point as well, but that can’t take too long.

September 19, 2006

Talk Like a Pirate Day 2006

That Hennell be a more untrustworthy swine than a thievin’ monkey covered in ale an’ set on fire! When I said ter him that me cracker be gone, he acted all helpful like, even makin’ me this here image fer me ter use. Course, I went and forgot it when I were writin’ me report, but I don’t be the slimey privateer o’ a weasel we be talkin’ about here. Tha’ lowdown dirty deceiver knew where me cracker was all along!

Serves ‘im right that he missed out on all the fun on the Monday, when a couple o’ mates o’ mine came round ter me cabin. He were off somewhere jumpin’ into water an’ stoppin’ people from drownin’, as if that be a useful skill fer a pirate! I be thinkin’ tha’ since his captain has only got the one eye, he be makin’ all the wrong people walk the plank. An’ then he be needin’ them ter be saved so he pushes Hennell in ter do tha’ fer him.

The rest o’ us, we spent our night takin’ over the world on a map. What were more suprisin’ than screamin’ crabs fallin’ from the sky was when Cabin Boy Pete won twice over (with the help o’ Stupid Fool o’ a Deckhand Chris). Then we played some kind o’ game runnin’ around London with paper dubloons, an’ I won it nicely. By this point it were gettin’ early, so we decided ter go visit the hummock fer dawn in Stupid Fool o’ a Deckhand Chris’s dinghy o’ the roads.

A hummock is sommat like a sand dune on an island yer might get marooned on, ‘cepting that it be bigger, and it ain’t made o’ sand, and it ain’t on an island. Alas, this particular hummock be badly placed ter see the dawn, so it weren’t so grand a sight as I were expectin’. We played a couple o’ games o’ Cheat while we were there, which Storesmaster Mairead the Bloody were mighty confused by. I took some photos, but most weren’t good enough ter show even ter the rat-infested corpse o’ a person.

When I got back ter me cabin, I slept fer a couple o’ hours an’ later went ter work me final shift at the Orpheus. Some say the place be haunted, but that be more ridiculous than a five-legged goat dressed up as a man an’ made ter dance. The ghosts people sometimes think they see, they be nothin’ more than customers! An’ customers be a lot better than ghosts, ‘cause if ye can persuade them ter see one o’ our god-awful films, then they pay yer fer it too!

On the Thursday, we met up fer various reasons, many of which were scuppered by Cabin Boy Pete not comin’ along. Stupid Fool o’ a Deckhand Chris scarpered later, wi’out even a goodbye. This left meself, Storesmaster Mairead the Bloody an’ Cracker Thievin’ Mutineer Hennell ter entertain ourselves by hopin’ fer a goat. When no goats appeared, we decided the next best thing would be ter see a film, but we disagreed about how god-awful it should be.

After much debate and no agreement, we went ter see Right at Yer Door rather than Little Man. Storesmaster Mairead the Bloody disliked it, but what do she know? I still be deciding whether I liked the endin’ or not, but it were mainly good.

More recently, I been workin’ on the Lord o’ the Hoops game. It be shapin’ up ter be an ARRR-some game, despite the lack o’ any pirates in it at all.


This be a fine entry, ter be sure, but I can’t be helpin’ the feelin’ that no matter the number o’ pirate entries I write, they’ll forever be in the shadow o’ sommat better. ‘Tis a sad thing, usin’ up all yer genius too soon. There be nowhere ter go but down, an’ down is where the water be.

June 27, 2006

Has it been a week already?

To go into slightly more detail, the bungee jump was awesome.

I've tried to install Gallery to show more pictures from the event, but that's refusing to cooperate.

Got my results, and did well in all my modules except Introduction to Quantitative Economics and Professional Skills. Overall I got 83.4%.

Packed and moved back to Bristol. Have yet to unpack a lot of it.

Did some Perl programming, with the inevitable result that I remembered how totally weird Perl is.

April 09, 2006

Term 2 recap – what I learnt

Design of Information Structures

The lectures varied from useful to uninteresting to ancient Babylonian, but mostly uninteresting. I think I understand the concepts well enough, but they went over a large number of abstract data types that I'm not sure how we'll be tested on.

The coursework was easy enough. It was less interesting than the Programming for Computer Scientists coursework, but it made up for that a bit by not walking us through every step.

Mathematics for Computer Scientists II

I cannot remember what we covered in this module. A bad sign, I suspect. But at the time, it made sense, so I'm sure it's just buried at the back of my head.

Professional Skills

Why should computer scientists have to write essays? It's silly and ridiculous. Almost as silly and ridiculous as teaching essay skills in the same module as Unix. I've so far handed in a suprisingly good factsheet, an absolutely appalling article critique, and a persuasive essay of unknown goodness (probably not much).

The lectures were dull, but I went to them all, so that means that all the knowledge is hiding away in my brain, ready to be accessed at a moment's notice.

Introduction to Quantitive Economics

Macroeconomics is like Microeconomics, only with a different lecturer. And less maths. There were lots of weird graphs.

Computer Organisation and Architecture

The lectures remained mysteriously sleep-inducing, but we had practical labs this term. They were more interesting, especially when sleep-deprived. The last three weeks of labs required me and James to work together to make a game of Pong, using an oscilloscope as an output device. The first two weeks involved a lot of blunders, a lot of confusion, and a lot of doubt as to our ability to finish. The final week involved a miraculous last minute victory over the hardware by me, and an excellent game of Pong created by James (all in one night, without any way of testing it).

There was also some coursework due on the last day of term, but that was easy.

February 02, 2006

My day

Today has been productive.

I have:

Got my coursework, which became more interesting when it was explained that we aren't allowed to use any of the Java built-in list classes.

Started my coursework.

Signed for a house that's within 15 minutes of campus (ha at you, Leamington Spa), with Louise and two people I've met twice.

Discovered that the A* search algorithm is basically Dijkstra's algorithm, only the "value" of a node is equal to the cost of getting there plus the estimated cost of getting to the target, instead of just the cost of getting there.

Counting all times past midnight as part of today, I had an excellent discussion with Hennell.

And perhaps most importantly, I demonstrated to someone that their tin opener will actually work, so long as you use it the right way.

January 10, 2006

Sleep would be a good idea.

Ah, there's nothing quite like programming until 2:30, on a project you know you'll never get round to finishing completely.

December 21, 2005

Term 1 recap – what I learnt

I had five modules last term.

Programming for Computer Scientists

Taught by the great Stephen Jarvis. This was basically an introduction to Java programming.

I picked Java up quickly, and knew all the stuff to do with Objects/Classes from A-level Computing. There was some new stuff towards the end, but none of it was difficult.

I made several robot controllers, including a final one which I was very pleased with. They got me 100% on both of the courseworks. There was also a test in the middle of term that I scored highly on. The courseworks and the test together are worth 40% of the overall mark.

Mathematics for Computer Scientists I

Lots of maths, all based on boolean logic and set theory. Relations, functions, graphs and probability, with some induction and some infinite sets.

We did four problem sheets, each worth 2% (just for handing in). Problem sheet 1 was randomly chosen to be marked, and will be worth 12%. I guess we get our mark for that when we go back.

Professional Skills

This module covers three areas, and we cover one area each term. This term was supposedly an introduction to Unix, but was generally laughable.

In one lecture, we were told about the ECDL. In another, we were told that exists. There were also some lectures attempting to teach Bash, but nobody who didn't already know the material picked anything up from them.

There was a badly defined assignment, for which the automatic tests given online were wrong and unreliable. Despite this, I got 100% on it, which gets me 30% of the overall module mark.

Introduction to Quantitive Economics

This term covered microeconomics, and next term we'll cover macroeconomics. Or the other way round. Not much of the material really sunk in. It probably didn't help that I missed a couple of the lectures, either.

Despite that, I got 70% on the first class test and 80% on the second. I still don't think I understand the material, but I'm unlikely to put too much effort into changing that situation.

Computer Organisation and Architecture

This started halfway through the term, and continues through term 2. So far we've covered binary stuff and logic stuff, some of which is new, and some of which is stuff I know backwards. We just started assembly language.

We haven't done any tests or anything, but next term we have lab sessions. I'm not entirely sure what they involve.

New blog location

After a hiatus of several years, I’ve started blogging again at

My website

Looking for more information about Alan Hazelden? Follow me on Twitter or go to my website.

July 2019

Mo Tu We Th Fr Sa Su
Jun |  Today  |
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31            

Search this blog

Blog archive


Most recent comments

  • Knife game: No actual cutlery involved. A single player starts with the "knife" by clasping his or h… by Noyb on this entry
  • My friends and I have taken to this one very silly game lately that's probably altogether too insula… by Ian S. on this entry
  • Great, thanks for those! That first one I would know by the name of Wink Murder, usually with a sing… by on this entry
  • I don't know the names for these games, so I'll make them up: Sniper. Randomly choose who is the sin… by zep on this entry
  • I recommend checking out Project Sprouts from Luke Bayes. It makes obtaining and configuring the fla… by Duncan Beevers on this entry


RSS2.0 Atom
Not signed in
Sign in

Powered by BlogBuilder