z4rch 1st playable

Weighing in at just 4090 bytes, I give you… (ta-da!)… Z4RCH!

http://www.hayles.demon.co.uk/4K/z4rch.jpg

You can play (the slightly larger applet version) at http://www.hayles.demon.co.uk/4K/z4rch/z4rch.html

Kinda addictive…

Cool.

Very hard to control though, wasn’t able to destroy one alien ::slight_smile:

Very Fun!

I even managed to kill some aliens :slight_smile:

On OS X 10.5, ctrl+ is the combination to change the virtual desktop, so when i wanted to fire and steer at the same time my desktop would switch away, which made the game a bit more complicated.
So for OS X users with spaces enabled some other key kombination would be great. Since you have 6 spare bytes you could probably add an alternative key for fire and lift. :slight_smile:

(but not x and y keys, because than I have to complain about german keyboards where the x and z keys are swapped :slight_smile: )

Nice, reminded me a bit of Virus, which is not a bad thing at all.

The controls felt good enough, but I found it really hard to tell if I hit an enemy or not, and sometimes it felt like I was shooting straight at them for a very long time, but no bullets seemed to hit.
I like the trees. =) Polygonal cuteness.

Oh

Yup, very Virus like, only this is slightly easier to ctrl than the original (especially since you can land on water) :). Very good to squeeze all that into 4K. I found that the only way to kill the virus was to aim dead center on them and then let them hover up into my stream of bullets, since it is very difficult to see if the bullets are above or below the virus. You also seem to lose lift force when shooting and/or moving and/or turning. Guess it would have been nice with some badies moving around, but difficult enough to hit them as it is really.

Noticed that trees that are behind a hill are “lifted up” so that the root is always visible, and they seem to be drawn in front of trees that are closer. Guess you are aware of this and it is just a shortcut to cram it into 4K. Hardly noticeable when you play anyway.

Like the particle effect as well!

Very impressive!

very nice!

would be cool to have a smaller applet available as it is a bit slow on my computer :(, but that doesn’t matter it is an old one… anyways fit that in 4k is really good works.

EDIT:

yea an alien killed :wink:

cool!

I had no problems killing enemies, 2 were left when I lost my last life due to a crash.
It is slow here too on my 3500+

Thanks for the tip - what would be good keys for OSX?

Yeah, no Z-ordering so bullets are always drawn last… :frowning:
Lift is inverse square, so the nearer the ground you are, the greater the lift. Above a certain height all you’re doing is slowing your descent!

I’ve made it (much) easier to hit enemies and tried to sqeeze a tiny bit more speed out of it…

Click here to try the game

EDIT: Just found a way to increase speed by 5-10% & save 21 bytes! (…don’t use Math.round())

That is a game crying out for a 2nd input device, using the mouse for aiming!

Just squeeze it down another ~200bytes and you should be sorted! ;D

There’s still alot you can do on the optimisation front!

Just a few :-

  1. get rid of the Listener

Replace it with enableEvents(InputEvent.XXXX_MASK), and override processEvent(…) (or processXXXEvent if you are only interested in one type of event)
This will remove 2 methods, saving ~50 bytes each.

  1. get rid of getWidth/getHeight - as you are making an applet, the size is hardcoded anyhow.

  2. stick with using just 1 Color constructor, and don’t reference the static final instances.
    e.g. as you are already using the Color(int.int.int) constructor, you will reduce your constants pool size by replacing “Color.black” with “new Color(0,0,0)”. (store in a local if you are worried about extra garbage)

  3. Don’t use String concatenation - it pulls in loads of rather large constants pool entries, and the bytecode for performing the concatentation is rather large.

  4. If convenient - use drawChars instead of drawString, it has a smaller method signature resulting in a smaller constants pool entry.

  5. Use the default Font!

btw, as far as I am aware Component#createImage(width,height) does not create a VolatileImage back buffer, meaning all of your fillPolygon operations are not being hardware accelerated.
If you switched to using BufferStrategy (or a Volatile backbuffer) I’d expect an enormous fps boost. (probably a solid 60fps on most machines)

1,2) They’re just thrown in there to make an applet version - the submitted entry will be a JFrame.
3) Good call!
4,5) Hmmm… Will I save enough space to warrant it? If I was gonna get 200+ bytes I’d do it, but I don’t think I will!
6) No way! It could be anything!
7) I changed to VolatileImage and noticed only a small (but significant) speed increase, but that may just be my rubbish graphics card. I’ve updated the applet also - is it faster for you now? (even with the Color()s sorted using this has got me back up to 4087 bytes :slight_smile:

Thanks for the tips!

Click here to try the game

Its much smother now on OS X :slight_smile:

And an alternative key for CTRL could be ALT I think.

Nice one!

ALT key now added for fire…

Click here to try the game

Right. This game is awesomely cool :smiley:

Too tricky for me, though… I can barely kill more than 1 enemy.

Superb graphics :>

A few little tweaks;

  • More realistic explosions
  • Improved steering
  • Enemies more aggressive
  • Improved shadows for bullets

Also got it down to 4075 bytes ;D

Click here to play

still cool but please provide another link with a smaller applet… plz…

Here’s a half-size version - but it’s not much faster than the normal sized one…

thanks, this is not as faster as i was expected but it is a little more fast, was able to kill 6 aliens this times :slight_smile:

Given that your particles are so small, could you change them to fillRect rather than fillOval? it should give a performance boost (though maybe not measurable given the small number of particles)