Retro Arcade Shooter: Moon Base Alpha

I build arcade machines for a hobby and figured it would be neat to write an arcade program of my own to go inside. Moon Base Alpha is a java applet so you can just click this link and start shooting :slight_smile: It currently keeps a global list of high scores so you can see how good you are. Mother ships provide the power ups while the aliens get more devious as you climb the levels.

if anyone has time then I’d like to hear some constructive criticism or ideas on how to improve it. I’d also like to know if you get any stuttering during play and, if so, what type of hardware you’re using. It’s about 200k so you might need to wait 5 seconds for it to load. Hope you enjoy playing!

Mike

http://www.checkmypages.com/swarm/splash.jpg

It ran fine for me, only problem I noticed was my bullets would pass through the power-up type ships.

The normal bullets should stop on hitting an alien however the green torpedos will spear everything in their path until they go off the screen. I’ll double check the code though just to make sure the normal bullets are behaving themselves. Thanks for the feedback. Did you find the game too easy or too hard (what score did you get)? I wasn’t sure whether to add more types of “creatures” but figured the game would just become too complicated for too little benefit.

What it needs is a bit of modernisation: I think it should run at a rock steady 60fps, have about 100x more particles, and for pity’s sake don’t use space bar to shoot!!!

Cas :slight_smile:

Modernisation - you mean gaming changed after the 1980’s? :o what sort of features are you thinking of? remember it’s supposed to be a “retro arcade shooter” and not GTA5 - the game is going to live in an arcade machine after all. By 100x particles do you mean the background stars - it would be easy to change but wouldn’t it look distracting? What else would you shoot with other than the space bar?

If you want it to feel like it’s from the 80s then it’s got to run at screen refresh rate.

Anything but space bar and enter is good for shoot. Shift and Ctrl were popular for a while but it should be noted that tapping them repeatedly usually brings up an irritating accessibility dialog on Windows.

And as for particles - knock yourself out :slight_smile: Make those explosions count!

Cas :slight_smile:

hmm, great game :slight_smile:

I noticed that whenever you die though, you got ot he next elevel.

I really like this kind of game :slight_smile:
Maybe you could include a third graphic mode, using something like this:

I could send you all objects in png32 format, if you’re interested.

It should just restart the current level. I did redo the code though just to ensure that this can’t happen (fingers crossed). I’m not sure what would happen if you got shot at the same time as killing the last alien on a screen though.

[quote=""]
To give 60 fps I’d need to generate a screen every 1000ms/60=16ms. At the moment on my, very moderate, hardware it can nearly run this fast however on older machines (my arcade machine for instance) it will run slower. You can see how long it takes to draw a screen on your hardware by pressing “t”. This is just a test mode that also shows the level.

[quote=""]
At the moment if you get into trouble while playing you can press any key to bring up the shields - usually when you need the shields you don’t have time to look for a particular key on the keyboard. I looked into using the shift and ctrl keys but it appears you need to use a different set of java methods to do this. Perhaps I should have a screen allowing the user to customise the keys.

[quote=""]
I tried upping the number stars but it affected the redraw time (is there a drawPoint method as I’m currently using drawRect(x,y,1,1)?). It also looked a little odd with so many stars - not bad as such but just a little distracting. I’ll look into adding more bits into the explosion.

[quote=""]
Must admit I think your images are very good and I’d love to put them in. Problem is I draw the aliens etc using java draw commands (fillOval, fillRect etc) and I can’t see how I could generate those images from that. I’m not sure how fast the game would be if I tried drawing images for aliens or what might happen when they overlap. I’m very impressed by your picture though - you obviously have a better imagination than me.

Do people find the game too easy - I wanted to allow kids to play but wanted to provide a bit of a challenge on the higher levels (red aliens etc). Anyone get a decent score (>50k)? Did anyone get any stuttering during play or is it just me because I run a couple of database servers etc all on the same old box.

Sounds like you’re listening for keyTyped events for your keys? If so then you probably need to use the keyPressed method to pick up on keys like ctrl and shift.

I got 56k when I played, and never saw any stuttering on my rather modest machine. The biggest problem to me was that it was a little slow, maybe speed it up a little? Also, getting the green bullets makes the game much easier - stay towards the middle of the screen when starting a new wave of enemies and you can often kill off most of them pretty quickly, since the bullets shot through baddies. I guess I’d also suggest maybe a different power-up or two, to vary the action a little more.

Congrats - you’ve done a great job making it seem like an 80’s-style arcade game.

[quote=""]
I’ve now improved the explosions so there’s more bits flying about plus every explosion is now different. I did try adding a bit of gravity to make it look more realistic but oddly it looked more realistic without.

[quote=""]
You’re quite right - I should be using these routines & I’ll look into this shortly.

[quote=""]
I accept what you’re saying but it’s not really a game of super fast reactions - you actually need to think and shoot at the same time. I tried a faster version but the game quickly became impossible when the aliens turned red (let alone the later levels). At the moment a kid can wipe out a few levels and feel good with themselves while good players can get quite challenged on the levels after the red aliens. Each new type of alien and, to a lesser degree, each new level introduce different firing patterns and different alien behaviours which can make the game quite tricky. Getting a decent balance here is actually quite tricky in any game. Congrats on the 50k by the way.

Oh and thanks for the kind words folks ;D

Mike

The player explosion looks a lot better now but takes a little too long. Adding explosions on enemy death would look a lot better than just vanishing.

I noticed the star field doesn’t stop animating when the game is paused.

I still have a problems with hits not registering on power-ups.

http://wayne.wonderhost.com/junk/collision_bug.png

I’ll look into that - I was a little worried about generating too many graphic items at the same time. I’ll try it out though.

[quote=“zoto,post:12,topic:34899”]
I just thought it looked better but perhaps you’re right - I’ll freeze everything on pause.

[quote=“zoto,post:12,topic:34899”]
I’m afraid those things are just a part of the background image - I thought the game looked a bit more interesting when it had satellites flying overhead, rocket ships and comets etc. You can actually only kill the aliens and the motherships at the top of the screen - what you can shoot is all shown on the splash screen along with the points you earn. Obviously you can’t shoot the planets and stars as they drift past either. I guess I could make the satellites break up on impact but they not a part of the invading force instead they are part of the civilisation you’re defending - perhaps shooting them should count against your score?

I’ll make these changes latter today.

OK, I think the other thing I couldn’t shoot was a rocket.

Your game really shouldn’t stress J2D much, have you tried profiling it? I saw you say you draw the alien ships using severalGraphics2D.fill(Shape) commands. Do you do this for each ship every time you draw? If so, I think drawing each enemy type to a BufferedImage on init and reusing the images should speed up rendering.

The rockets (satellites, comets, planets, stars etc) are just a part of the background - believe it or not I tried quite hard to give the scenery a cartoony realism - there’s even the Belt of Orion in the star field! You can’t shoot any of this stuff though. I mentioned above somewhere that maybe I should allow the user to hit these things (well the satellites and rockets) but then penalise them for doing so as they’re on the human side.

I do actually draw all the shapes individually - I wasn’t sure what method you guys use but I’ll look up the BufferedImage class. It’s my first real time game. This might even allow me to use the aliens that derhannes produced - my son was very impressed by his artwork.

I must admit I’ve got some very constructive feedback from this forum - it’s appreciated.

Mike

PS I recently added a cheat to jump to the higher levels immediately when starting a game (1=normal start, 2 bit harder, 3 harder, 4 very very tough).

Well I’ve done a lot to the game :

  • boss mother ships on the transition between levels (ie blue to green aliens). I might of made these too difficult to kill though.
  • The progress of the game from easy to very hard is quicker now so you quickly find “your” level. Those less patient can start the game at the harder levels by pressing 1, 2 or 3 (medium to very difficult).
  • Fixed the bug when it occasionally went up a level when you got shot.
  • The aliens now explode but I tried to keep it subtle else it got distracting.

It still looks like an old fashioned arcade game (I suppose Galaxians is sort of similar) but that’s because that’s what I wanted to create. I haven’t done the BufferedImage stuff yet as it requires a bit of a rewrite.

If there aren’t any major bugs thrown up in the new version then perhaps it might be nice to get a score from the mods :slight_smile:

Mike

Well The game looks very different now. You might notice a “small similarity” to an image above but the previous image was a mockup and this ones a screen shot from the game. I’d like to give a public thanks to dehannes for helping me with the images :slight_smile: The game still has a few improvements to be made but I think I’m getting close now. If you give the game a shot then why not put your name/alias alongside any scores.

Good luck.
Mike

Getting better. Sound effects are good. Still running at 30fps and barely taxing my utterly rubbish laptop at all - gowaaaan, let’s see 60fps. And more particles! Loads more particles!

Cas :slight_smile:

Still wondering if my game could get scored by you guys :slight_smile:

I’ve taken on-board a lot of the suggestions made and I think the games improved dramatically because of this. If your suggestion wasn’t implemented then it was just because I didn’t like the end effect when I tried it out. Cas, adding more particles just made the game look weird and I’m afraid I wasn’t keen on the end effect and I also couldn’t achieve 60fps on any of the PC’s in my house so your “utterly rubbish laptop” ain’t too bad!

The game does try to match itself against the users ability so if you’re slow shooting the aliens down then it progresses more slowly and you’ll miss out on bonuses. Shoot the aliens down quickly and you’ll get higher scores, a more difficult game and a faster heart rate. It’s done this way to allow my kids (and their mates) to play while also giving more seasoned gamers an interesting game. I added a hints page to give other hints.

Play lasts between 2 and 10 minutes depending on how good you are. Reasonable scores (>50k) take somewhere in between. I’m now planning to build an old fashioned arcade machine around the game but I expect that to take some time.

Mike

I’ve spent a lot of time on the game this past week :

  • Improved graphics
  • Game more aggressive at the start
  • Bigger explosions with more particles
  • Can now shoot satellites and space stations (but this is bad)
  • Scores over 20k go on high score board
  • Loads of other small improvements
  • Hints page

If you get a chance then give it a try.