My 4K entry (Updated Dec 18)

My entry this year is a tower defense game called Crack Tower Defense. It currently sits at 3343 bytes, so there is a lot of space. If you have any suggestions please feel free to comment or suggest features.

Play it at:

http://www.java4k.com/index.php?action=games&method=play&gid=204
http://marber8.freehostia.com/tower.jnlp

http://www.freeimagehosting.net/uploads/7651789c6e.png

Here are the instructions:

You have three types of towers: light, medium and heavy(green, yellow, red). There are also 3 types of bad guys with the same sizes and colours. Stop the bad guys from getting to the end.

[EDIT Dec 18] Added a splash damage tower that is orange and a slow down tower that is blue.

When you click to start the game you will have 10 seconds to set up your first towers. Each level after that is 30 seconds. Each level contains 20 bad guys. If 20 bad guys get through the game is over. See how long you can last.

Click on a tower on the right side to select it for construction. The stats and price for the tower will be shown. You can place a tower anywhere that is not part of the bad guys path. You can click on the timer line to start the next wave. You can only do this when the current wave is fully on the screen. You will get bonus points each time you advance early. The towers will automatically upgrade themselves with experience at the start of each level. Green is every 200 shots, yellow is every 250 and red is every 300. They will max out at level 6. Both range and shot power will increase with each level. You can click on any tower to check its current level and to sell it.

[quote]java.lang.IllegalStateException: Buffers have not been created
at sun.awt.windows.WComponentPeer.getBackBuffer(Unknown Source)
at java.awt.Component$FlipBufferStrategy.getBackBuffer(Unknown Source)
at java.awt.Component$FlipBufferStrategy.updateInternalBuffers(Unknown Source)
at java.awt.Component$FlipBufferStrategy.createBuffers(Unknown Source)
at java.awt.Component$FlipBufferStrategy.(Unknown Source)
at java.awt.Component$FlipSubRegionBufferStrategy.(Unknown Source)
at java.awt.Component.createBufferStrategy(Unknown Source)
at java.awt.Window.createBufferStrategy(Unknown Source)
at java.awt.Component.createBufferStrategy(Unknown Source)
at java.awt.Window.createBufferStrategy(Unknown Source)
at T.main(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.javaws.Launcher.executeApplication(Unknown Source)
at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
at com.sun.javaws.Launcher.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
[/quote]
Got this while starting.
Latest Java update.
Windows Vista.
Chrome.

Not sure why that would happen. I do call createBufferStrategy before getBufferStrategy. I moved the call to get further away from create and uploaded a debug version to get line numbers. Can you please try again?

Thanks.

I think you need a bit of an exponential difficulty curve. After getting a foothold on the first few levels I left it running and it’s currently at level 155 and going strong. A boss level might be cool.

Works fine now.
Found it a little hard to start, but its cool :slight_smile:

Ok thanks. I will increase the curve a bit. I should be able to add a boss. Thanks for the idea.

It’s very nice. Although I think the colors could be slightly better :persecutioncomplex: it looks like a programmer designed it ;D

Do you use any pathfinding?

Heh, it looks like this will be the year the TD’s finally find their way into the 4k (I’ve seen a sneak peak of another one).

This one plays pretty good! I found the start to be very (too) hard, but it’s way too easy later on. I do have a few suggestions, and some other thoughts:

  • Graphics! With this much room to spare, surely you can add some nice procedural graphics. First, I suggest you enable antialiasing (everybody like antialiasing). For the tower range indicator, you might add another, filled oval with a transparent color. Transparency is always nice. For the towers, you might do fillRoundRect instead of fillRect… and so on.
  • Right click to deselect current tower would be nice.
  • More distinct towers. Perhaps different attack speeds? Also, bullets should be marked depending on tower type (different geometrical shapes, size, colors (darker version of the tower’s color?) - something like that).
  • I couldn’t really tell whether green towers were stronger against green enemies? A more clear relation between enemy colors and tower colors might help. As an alternative, add another tower that’s pretty much the only thing that can damage a certain type of enemy… so you’ll have to get a few of those towers.
  • Slow towers or splash towers are pretty much standard in TDs. Consider adding one (or both) of those.
  • It seems to me that the only viable tactics is getting a lot of green towers. And then perhaps getting the expensive ones later on (levels 50+ or so). Some rebalancing is needed.
  • Clicking the timer to advance to the next level is not at all intuitive to me. Perhaps a button that says “Spawn”, “Next wave”, or something such?
  • A “restart” button (or key) would be nice, for when you know you’re doomed. Perhaps restart by pressing R or something.
  • With this much room to spare, there’s no need to skip the window title. Add a title and it’ll get easier to find in the task bar :slight_smile:
  • Each time I click the mouse to place a tower (whether I actually can afford it or not), the game freezes for a few frames. This causes the game to sometimes place the tower in the wrong place (if you move the mouse while it’s frozen). If I click a lot, using a tower I can’t afford, I can effectively “pause” the game (but not the timer, since it’s clock based). I’m not sure whether there’s any actual value in doing this, but if you added, say, a “splash attack” tower, it would be abusable (as you can make enemies spawn on top of each other).

Oops… that post got pretty long. Much like sws26 said, it’s too easy later on. I lost 17 lives early, and then not a single one until level 180… and I didn’t build anything after level 30 or so. I had 3074 gold and 3639 points when I died at level 186. And since I wasn’t really using my money, I know you can get way beyond the level I got to. :slight_smile:

EDIT: One of the reasons the post got so ridiculously long was because JGO went down as I was writing it… so I had a lot of time to add to it while it was open in notepad :wink:

LOL, yeah one did :wink: I always try to keep things minimalist until I see how much room I have. So now I can try to improve the look and play.

No. I wanted to do a freeform one with pathfinding, but I have never done it before and just don’t have the time to research and try out different things. I just do a fixed path that all the bad guys follow.

Thanks for all the great suggestions. I’ll have to see what I can put in.

I did try transparency, but the frame rate went way down to unbearable.

Procedural graphics: I just don’t know how people put so many good graphics in their games. That’s why I mainly stick to vector graphics games or simple shapes.

Oh, I forgot to put in the instructions. If you click anywhere in the score area, that does not already have a function, the tower will be deselected.

I’ll see what I can do about changing the graphics. Right now the only difference for bad guys is the amount of hit points. Green has the least, then yello then red has the most. Same with the towers. Green does the least damage and has the longest range, then yellow does more with less range and then red.

You guys have given me a lot of things to look at putting in.

Thanks a lot.

Still working on tweaking the new towers, but I added a tower that does splash damage(the orange one) and a tower that slows down the bad guys (the blue one).

I have about 200 bytes left. I’ll see if I can improve the graphics with that space.

Very addictive game! I am now on lvl 66 and I noticed that the red creep got stucked once hit by the slow tower.

Some suggestions:

  1. the splash tower is a bit too weak, increase its damage or damage radius will make people like it more
  2. I feel that the yellow tower is really unnecessary.
  3. Perhaps you should increase the money gained after defeating a Boss.
  1. Damage should increase with levels. It might not be leveling up fast enough.
  2. Yes, I will probably drop the yellow tower.
  3. Thanks, I forgot about giving more money on the boss.

I noticed the red guys stopping too, but didn’t have time to look at it yet.