Kaboom4K

Here’s an early version of Kaboom4K, vaguely inspired by the old Activision “Kaboom!” game. This will be my first ever entry into this contest.

The game includes a psuedo-3D starfield background, procedural sound, a particle system, and a terrain generator.

The game is controlled with the mouse.

There is only one level, which simply gets progressively harder. Like the original “Kaboom!”, there is no way to really beat the game - it’s just a question of how high a score you can get before the end.

Each replay generates a new terrain.

SCREENSHOT:

http://www.curiouskangaroo.com/4k/kaboom4k/k4k.gif

NOTES:

  1. I’ve only tested this with Java 1.4, not 1.5.
  2. I have not tested this on Mac or Linux, only on Windows so far.
  3. The machine being used for testing is a 2GHz P4 running Windows XP, with 512MB of RAM.
  4. Sound works if you run the JAR file directly, but does not work under WebStart. Is it possible this is because my JAR is unsigned and I’m accessing the sun.audio.AudioPlayer class?
  5. The frame is currently resizable, which is wrong - it won’t be in the final version.

JAR File (4092 bytes): http://www.curiouskangaroo.com/4k/kaboom4k/k.jar
JNLP File (873 bytes plus 5433 bytes for signed jar): http://www.curiouskangaroo.com/4k/kaboom4k/Kaboom4K.jnlp

I still have some work to do, but I welcome any comments. I suspect there will be performance problems on some machines.

That’s not Kaboom, that’s a variant of Star Castle! :o

Kaboom has a guy in stripes. Who drops bombs. From the roof. Fast. ;D

Nice job, BTW. It’s a very interesting entry.

Am I just crap, is that insanely difficult??

I don’t last more than 15 seconds!
A higher birth rate, and lower asteroid rate is needed!

btw, sound doesn’t work.

I think it’d be cool if you could see the population centres on the planet, and the asteroids hit the planet in different places, depending on their approach angle.

You could then atleast concentrate on stopping the ones that threaten the greatest population centres. (or the UK, depending on where your priorities lay ;D)

works nice on Linux, but I didn’t here any sound, too - but I was also playing the webstart.

I got a bit above 10000 points

Hi, Anon666. I wonder - what’s your CPU? I’m not using time-based animation, so if your system is more powerful than mine, perhaps it’s going too fast on your machine. I can generally last a few minutes, but I really need to concentrate on the screen. Also, keep your mouse close to the center of the screen so that you need to move it as little as possible. If it seems like a lot of people are having issues with the speed, I may need to rewrite to be time-based.

About the sound - like I said in my original post, not working under webstart, but it works (for me, at least) when played directly from the JAR. If you’re not using webstart, but still aren’t getting sound, let me know - that will be something I’ll have to look into. I’m hoping to get the webstart sound working in my next update.

I do like your idea about seeing cities on the planet, but I’m not sure if I can squeeze it in. I’ll see what I can do. The asteroids do hit different places on the planet, but a majority of them go for the exact center - this is a bug I need to fix so that it’s equally likely for them to hit any visible part of the planet.

In my original versions of the game, each planet had a random population between 2 billion and 15 billion, and each hit had a different effect on the population (anywhere from 0 to 1 billion). This was a cheap way of simulating the fact that a planet’s surface isn’t homogenously populated. The only problem was that such randomness isn’t really fair in a game when you want people to be able to compare high scores, so I changed it to every planet starting with 10 billion, and every hit killing 2 billion. Generally, due to the slight population growth, you should be able to sustain 6 hits before the game ends (the 5th hit will leave you with just a handful of people).

Hi, jbanes. Thanks for the compliment!

Yep, I remember Kaboom well, one of my favorites. I’ll grant you that this game is circular, like Star Castle… but the basic gameplay is still Kaboom. Asteroids are being dropped instead of bombs. The playfield is wrapped into a circle, instead of horizontal. Instead of getting three or four lives (the buckets), you get six hits on the planet. And the guy in stripes is just a blue circle. If this game were “unwrapped” so that the planet’s surface was a horizontal line at the bottom of the screen, and the asteroid-dropping alien moved back and forth along the top of the screen, with your blue “paddle” in the middle, it would essentially be Kaboom. One major difference is that in Kaboom, as you loose buckets, the game gets harder. In my game, as asteroids hit the planet, the gameplay is unaffected (the game just gets faster over time whether or not you sustain any hits).

Hi, Arne. Thanks - it’s good to know it works on Linux. I promise to try getting sound running under webstart soon.

hmm, I got to a score of 10090 in about 20 seconds of play :o

I think you might be right Sandor - I’d say its about 50% faster than is intended?

I’m playing on a Athlon64 3000, with a GF6800GT.

btw, I like the terrain generation - its a shame such a cool feature serves such a minor (eye candy) role in the game.

Perhaps you could come up with a new game oriented around the terrain generator alone :slight_smile:

Ok, I just tested on another machine - an Athlon64 2800 with 1 gig RAM running Win2K. On this machine it is DEFINITELY too fast - - seems like twice as fast as the 2GHz P4 I developed it on. So I will need to change the code to use time-based animation. I hope I can keep the size under limit!

Since you’ve already played this version, you’ll probably now think that it’s a piece of cake when you play it at the speed I intended!

And thanks for the compliment about the terrain generator. Yeah, it was actually the first thing I coded up before I knew what kind of game I wanted to do. Originally I was thinking about a really tiny exploration game, but I’m not convinced I can do something good enough to really enjoy in only 4k. The funny thing is that it takes a pretty hefty amount of the 4k in this game (maybe 25-30%) for (as you say) a pretty minor role. If I have time before the deadline, maybe I’ll play around with the exploration game concept… but I also have at least one other game idea I want to do first (after fixing the sound and framerate issues here).

Yeah some of the asteroids are literally impossible to catch because of the timing when some astroids start at almost the same time but in different places. Maybe you can work to tweak it so more skill can keep you alive longer.

He he! Wow! To fast on my machine; AMD Athlon 3700+, 1GB 400Mhz Dual Channel RAM, GeForce 7800GT. I’ll try it again later on when you have implemented something time based, it looks very nice though! :slight_smile:

Ok, so I’m working on two updates:

  1. Making sure the game runs the same speed on all machines.
  2. Making sound work in WebStart.

I’m using sun.audio.AudioPlayer, which doesn’t work in an unsigned JAR in WebStart. I’ve tried changing the JNLP to ask for all permissions, and signing the JAR with a self-signed cert. It works - WebStart will play my audio. However, the signed JAR is WAY over the 4k limit (my unsigned JAR is just 5 bytes under). Since the plain executable JAR is under 4k, would that be acceptable in the contest?

I also think I’ve got the speed problem fixed. However, don’t go trying it yet since I haven’t actually updated the files on my server. Before doing that, I want to hear opinions on whether or not my signing size problem is really an issue or not.

Thanks!

[quote=“Sandor,post:12,topic:26050”]
According to the rules, a webstart file over 4K is acceptable as long as there’s a self-executable JAR files with the same code that’s below 4K.

I’ve used this rule with my entry since I need full screen mode.

As long as you provide both the unsigned JAR (not as webstartable but as downloadable game with manifest) and the signed one, it will measure the unsigned one for size limitations. Or, so I think :slight_smile:

Thanks for the info, jbanes and Morre.

My jar and webstart files are updated. The jar file size increased by 1 byte from 4091 to 4092. The signed jar is, of course, way over.

Sound should work in webstart now.

The game speed should be slower now, more in line with what I see on my development machine. I can’t test this myself until later today, though.

yeah - it’s easier - I got 22900 points now

  • sound works now also :slight_smile:

the number of the people increases, but does it increase enough to have any effect at all? I don’t know, because you can’t look at the stats, while you’re concentrating on game.

No, actually, it’s more of a joke. When I first created the game, the population was steady except for when your planet was hit by one of the meteors. As I played, I realized this wasn’t realistic, so I made sure to have the population increase over time. It has no real effect on gameplay, except that your planet can sustain 6 hits instead of 5 (which would be the case if the population started at 10 billion and only went down, not up).

Ok, I got to test it on my better machine, and frankly, it’s still too fast - but it’s better. I’ll do a little more tweaking. When I play it at the “proper” speed, it’s quite possible to last a few minutes if you keep your concentration. At the current speed, though, I can’t do much better than 30 seconds!

I’m also noticing tiny pauses I think must be garbage collection - which I don’t notice with a slower framerate. We’ll see what I can do.