Java-Gaming.org
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
Featured games (78)
games approved by the League of Dukes
Games in Showcase (404)
games submitted by our members
Games in WIP (289)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  z4rch 1st playable  (Read 8041 times)
0 Members and 1 Guest are viewing this topic.
Offline SimonH
« Posted 2007-12-13 03:12:34 »

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


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

Kinda addictive...

Heroes' Keep is in development.
Meanwhile try Bloodridge
Offline appel

JGO Ninja


Medals: 35
Projects: 5


I always win!


« Reply #1 - Posted 2007-12-13 04:51:57 »

Cool.

Very hard to control though, wasn't able to destroy one alien  Roll Eyes

Check out the 4K competition @ www.java4k.com
Check out GAMADU (my own site) @ http://gamadu.com/
Offline markush

Senior Newbie




Plöp!


« Reply #2 - Posted 2007-12-13 07:08:04 »

Very Fun!

I even managed to kill some aliens Smiley

On OS X 10.5, ctrl+<arrow> 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. Smiley

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


Games published by our own members! Check 'em out!
Try the Free Demo of Revenge of the Titans
Offline Markus_Persson

JGO Wizard


Medals: 8
Projects: 19


Mojang Specifications


« Reply #3 - Posted 2007-12-13 08:49:25 »

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

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.

Play Minecraft!
Offline Markus_Persson

JGO Wizard


Medals: 8
Projects: 19


Mojang Specifications


« Reply #4 - Posted 2007-12-13 10:04:40 »

Oh

Play Minecraft!
Offline jojoh

JGO Knight


Medals: 5
Projects: 7


games4j.com


« Reply #5 - Posted 2007-12-13 11:31:03 »

Nice, reminded me a bit of Virus, which is not a bad thing at all.
Yup, very Virus like, only this is slightly easier to ctrl than the original (especially since you can land on water)  Smiley. 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!

Offline DzzD
« Reply #6 - Posted 2007-12-13 13:56:35 »

very nice!

would be cool to have a smaller applet available as it is a bit slow on my computer  Sad, 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

Offline Hansdampf

Senior Member


Projects: 3


too offending?


« Reply #7 - Posted 2007-12-13 14:22:56 »

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+

lots of sillystupid games: http://www.emaggame.com
Offline SimonH
« Reply #8 - Posted 2007-12-13 18:02:49 »

So for OS X users with spaces enabled some other key kombination would be great.
Thanks for the tip - what would be good keys for OSX?

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
Yeah, no Z-ordering so bullets are always drawn last... Sad
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())

Heroes' Keep is in development.
Meanwhile try Bloodridge
Offline Abuse

JGO Coder


Medals: 2


falling into the abyss of reality


« Reply #9 - Posted 2007-12-13 20:12:21 »

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!  Grin

Make Elite IV:Dangerous happen! Pledge your backing at KICKSTARTER here!
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Abuse

JGO Coder


Medals: 2


falling into the abyss of reality


« Reply #10 - Posted 2007-12-13 20:34:15 »

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.

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

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

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

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

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

Make Elite IV:Dangerous happen! Pledge your backing at KICKSTARTER here!
Offline SimonH
« Reply #11 - Posted 2007-12-13 21:21:31 »

1) get rid of the Listener
2) get rid of getWidth/getHeight - as you are making an applet, the size is hardcoded anyhow.
3) stick with using just 1 Color constructor, and don't reference the static final instances.
4) 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.
5) If convenient - use drawChars instead of drawString, it has a smaller method signature resulting in a smaller constants pool entry.
6) Use the default Font!
7) 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  Undecided)

Thanks for the tips!

Click here to try the game


Heroes' Keep is in development.
Meanwhile try Bloodridge
Offline markush

Senior Newbie




Plöp!


« Reply #12 - Posted 2007-12-13 22:02:17 »

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

Its much smother now on OS X Smiley

And an alternative key for CTRL could be ALT I think.
Offline SimonH
« Reply #13 - Posted 2007-12-13 22:57:19 »

Its much smother now on OS X Smiley

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


Heroes' Keep is in development.
Meanwhile try Bloodridge
Offline Morre

JGO Knight


Medals: 1
Projects: 10


I'm Dragonene on IRC.


« Reply #14 - Posted 2007-12-13 23:28:06 »

Right. This game is awesomely cool Cheesy

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

Superb graphics :>

Offline SimonH
« Reply #15 - Posted 2007-12-15 18:32:13 »

A few little tweaks;

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

Also got it down to 4075 bytes  Grin

Click here to play


Heroes' Keep is in development.
Meanwhile try Bloodridge
Offline DzzD
« Reply #16 - Posted 2007-12-15 18:37:52 »

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

Offline SimonH
« Reply #17 - Posted 2007-12-15 18:50:16 »

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


Heroes' Keep is in development.
Meanwhile try Bloodridge
Offline DzzD
« Reply #18 - Posted 2007-12-15 19:05:44 »

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  Smiley

Offline Abuse

JGO Coder


Medals: 2


falling into the abyss of reality


« Reply #19 - Posted 2007-12-15 21:49:35 »

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)

Make Elite IV:Dangerous happen! Pledge your backing at KICKSTARTER here!
Offline nva225

Junior Member





« Reply #20 - Posted 2007-12-18 18:55:37 »

A very technologically impressive entry, as I'm sure most people would agree. First time I played the game I got a little confused with the controls (sometimes spacebar wouldn't register for vertical thrust if I was hitting too many other keys I think?) and had issues shooting some of the aliens down, but pretty soon I managed to figure it out. It's actually pretty fun once you know how to kill things, since usually the enemy ends up hitting you once or twice, esp if you're attacking 2 enemies, and there's a real sense of "oh crap I might die", which is important to have.

But I eventually got it down so I could reliably destroy the guys, and actually got through the first wave, only to my disappointment to find there was no second wave! I went back to the main base and healed my ship, but "Wave 1" just sat there... taunting me. And yes it said 0 enemies left.

Perhaps would be more fun if the engine was more efficient/rendered faster, but a very excellent entry overall.
Offline SimonH
« Reply #21 - Posted 2007-12-18 19:06:16 »

there was no second wave! I went back to the main base and healed my ship, but "Wave 1" just sat there... taunting me. And yes it said 0 enemies left.

There's 10 different waves in all (hit 'Enter' to continue to the next wave - I should make that clearer...) I can't get past wave 3; 60 enemies!

Edit - 'Tis done - it now says 'Press ENTER to continue' under 'Wave Complete'. NB I've also added a cheat (applet only!): Press 'A' to kill all the enemies and finish the wave.
One other thing - your score now goes down the more the land is polluted - so there's an incentive to clear the ground as fast as possible!


Heroes' Keep is in development.
Meanwhile try Bloodridge
Offline nva225

Junior Member





« Reply #22 - Posted 2007-12-18 21:25:47 »

Ahh ok, I should've random key spam'ed and found that. Thanks.
Offline SimonH
« Reply #23 - Posted 2007-12-20 01:57:06 »

One last little tweak: as the waves increase the enemies notice you from further away, so the hover-and-shoot strategy becomes a bit trickier...

Click here to play z4rch


Heroes' Keep is in development.
Meanwhile try Bloodridge
Offline erikd

JGO Knight


Medals: 3
Projects: 3


Maximumisness


« Reply #24 - Posted 2007-12-29 00:55:40 »

Very impressive, but very slow on my machine. I'm sure a 2GHz machine should be able to outperform virus on an Atari ST? Smiley
Impressive nonetheless for just 4k!

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
 
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars and Titan!

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

The invasion has landed! On Mars! And you're there to beat 'em!
cubemaster21 (42 views)
2013-05-17 21:29:12

alaslipknot (51 views)
2013-05-16 21:24:48

gouessej (79 views)
2013-05-16 00:53:38

gouessej (79 views)
2013-05-16 00:17:58

theagentd (88 views)
2013-05-15 15:01:13

theagentd (81 views)
2013-05-15 15:00:54

StreetDoggy (123 views)
2013-05-14 15:56:26

kutucuk (147 views)
2013-05-12 17:10:36

kutucuk (147 views)
2013-05-12 15:36:09

UnluckyDevil (157 views)
2013-05-12 05:09:57
Complex number cookbook
by Roquen
2013-04-24 12:47:31

2D Dynamic Lighting
by Oskuro
2013-04-17 16:46:12

2D Dynamic Lighting
by Oskuro
2013-04-17 16:45:57

2D Dynamic Lighting
by Oskuro
2013-04-17 16:23:20

Noise (bandpassed white)
by Roquen
2013-04-05 17:36:01

Noise (bandpassed white)
by Roquen
2013-04-03 16:17:38

Java Data structures
by Roquen
2013-03-29 13:21:12

Topic Request
by kutucuk
2013-03-22 21:42:01
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!
Page created in 0.155 seconds with 23 queries.