Defender

Hi All,

Excuse me for writing without introducing myself, but I’ve finally finished my remake of the original 1980 arcade game Defender - one of my favourite games, even though I was never any good at it at the time.

http://www.stupey.com/Defender

I’ve tried to make this as faithful to the original as possible, so all the graphics are the same, sounds are the same, and I’ve scoured the internet looking for gameplay details to make sure the alien behaviours, awards, level difficulties etc are as close as I can get them. This game is HARD… but then so was the original !

A few things to look for:

  • crank the sound up LOUD !!! it’s like being in a real arcade !

  • global highscore tables - one is an all-time hiscore table, but there’s also a daily best table, so everyone gets a chance to get their name up there, even when the all-time table has been spanked out of sight

  • I’m particularly proud of the swarmers - different swarms actually fly together controlled by an invisible HiveMind sprite to give them nice complex behaviour - it’s actually possible (but inadvisable) to fly in the middle of the swarm and pick them off one by one

  • I also like the way the baiters behave - now they are nasty…

  • watch how the mountains slide past the stars in the background with proper parallax, and the stars rise and set behind the mountains as you fly past

  • there’s quite a powerful self-built sprite engine behind this - there are upwards of 200-300 sprites active, including the ship, stars, landscape, aliens, bullets, explosion fragments etc etc - each has its own routine to show itself on the main screen, on the scanner, and to move itself

  • extra life and smartbomb after 10,000, 20,000 and every 30,000 points after

  • use the hyperspace with caution - it can cause explosion on re-entry

  • written in Java, running on an applet in a webpage, hiscores maintained by server-side code (in Perl)

Anyway, enough - go on and play it:

http://www.stupey.com/Defender/

Let me know what you think, all comments, criticisms, suggestions etc welcome.

Cheers,

Stu

Brilliant implementation, very nicely done. Probably my favourite game of all time too. Strangely I was never any good at it at the time either.

Cas :slight_smile:

aw shucks, thanks very much !

Sure has that old feel to it hehe.
Very nice indeed.

Awesome, one of the first games I’ve ever played.

I remember that as a kid I had no idea what to do in the game except shoot stuff. I suppose now I should not shoot the people on the ground.

go on - shoot them anyway, just to see what happens when there are none left…

wow, very very nice old style graphics, I love it

Cool remake, but the controls feel a bit stuttery here, can’t seem to get a smooth run.

Kev

PS. Load time was pretty bad but my connection is kinda crap so that could be explained :slight_smile:

Ah! Heady days… nostalgic sigh

I seem to remember the ship having a bit more momentum though…? Seems to slow down a bit too rapidly…

very impressive! ;D

Kev - stuttery controls may be due to your connection speed

When you first launch the applet, there’s a separate thread which loads all the sounds in the background (although a sound will be loaded on demand if it’s not there yet when needed).

If that background thread is taking a long time, it may be taking a few cpu cycles away from the game itself.

Solution - load the game and give it a few minutes to load all its sounds, then it should play smoothly.

Cheers

Ha that is a lot of fun.

Awesome retro effects.

This is a great remake. Congratulations. When I get back home I’ll give it a more thorough try.

I’ve started but never finished making a defender remake myself at least 4 times in my programming life. Well done for making such a polished complete version.

A quick wish: I’m afraid I’m one of the people who prefers to move the ship with my left hand, and fire shots with my right. Perhaps the only way to accommodate people as fussy as me is to have programmable buttons. :slight_smile:

A few minor points about trying to copy the real defender as much as possible (these are from my memory though… I’d have to run up the real thing to make sure… so please take them with a pinch of salt)…

(1) I agree with SimonH, the real defender didn’t slow down as quickly.

(2) When you change direction, the old momentum still applied. I.e. the ship would continue going in the direction it was before you change direction (now going backwards of course). In your game it looses all it’s speed in one go.

(3) In your game the shots the baddies fire appear to be aimed at the ship. In the real thing, it took your ships speed into account, and aimed where it had to to hit a moving ship.

(4) In your game even the trail of the shot hits aliens. I believe in the real game only the leading edge hit the aliens. In fact (and this is really shakey…) I think the leading edge was a white bullet.

BTW, your Asteroids looks good too. I did succeed in making an asteroids clone, but it’s not as nice as yours (see Ast).

Cheers, Tim.

That is awesome, full of retro-goodness! It brought me straight back to childhood, such was the authenticity of your applet’s look, sound and feel. I had forgotten how addicted to this game I used to be, thanks for bringing back those fond memories.

Just out of curiosity, what version of Java does it require, and how long did you spend writing it?

Nice work!

Ben.

Thanks guys.

Didn’t actually take me that long, but then I have been obsessing about it a bit, maybe 2-3 months in total ?

It needs Java 1.5 or higher, but only because it uses ArrayList objects.

Ben - I wish I’d had your comments before I released the game to the general public, but I think in fairness to the guys who’ve already lit up the highscores, I won’t do anything which changes the gameplay now - all would have been easy enough to implement (apart from the baddies aiming ahead of the ship - would have to do a bit of algebra there - :-\ ) I’ll bear them in mind though, in case I do a revamp at some point, so thanks for them.

Couple of other departures from the original btw, this has bonuses after 10,000, 30,000 and every 30,000 points - with the original after every 10,000 points it was proving a little too easy to keep playing for ages. Also there’s no international dateline, the swarmers, mutants and baiters will take the shortest route to you from wherever, and also none of the well documented scoring bugs from the original are in.

Of course there’s also the dual key layout, which would be abhorent to the purists (me), but is there by popular request (retroremakes.com).

Regarding the programmable keys - I did want to do that, but I’ve noticed a problem with Java KeyListeners which I’ve not been able to get round - if you hold down certain combinations of keys (eg the space bar plus a couple of arrow keys), then the events don’t fire for all the keys - you can actually see this in my Asteroids - try thrusting, turning left or right and firing at the same time, it can only intermitently do all three.

For this game, I didn’t allow the user to reprogram the keys since they may choose a non-working configuration.

Anyone else had this problem ?

Cheers

Interesting game, when it first loaded, it went white, although I still heard the sounds, I waited a bit but nothing else happened. I refreshed and it was fine and I haven’t had the problem since, so I don’t know what that was. Very fun game although the ships momentum seems to be off, it slows down kind of quick. Otherwise the controls work perfectly and I really like the retro sound and graphics.

love it ;D

actually, you’re all correct- when I put in the code for the dual controls, I doubled up the deceleration code by mistake, so it was slowing down twice as fast as it was during testing, now fixed.

Also I’ve now put in code to preserve momentum when you hit reverse, so the ship flies backwards for a short time. Check it out.

Will have a look at the little white bullet and leading edge thing tomorrow.

Cheers

It’s a pretty common problem, but it’s the keyboard itself, not Java, that causes it. (It’s been discussed on these forums before a few times, if you search hard enough.) Some keyboards have limitations on multiple keys being pressed at once, and there’s no way around it. My experience is that using the cursor keys plus the control key to fire is a fairly reliable combination.

Good game, by the way. I just wish that one day someone would make a version of Defender that I’m actually good at! ;D

Simon

Keyboards are evil.

[quote=“dishmoth,post:18,topic:32116”]
Try Alien Flux (if you can find it ;))

Cas :slight_smile: