August 19th-22nd 2011 :: Theme: Escape
[ Summary | Compo Top 50 | Jam Top 50 | Top 25 Categories | View All (599) ]

Back to Browse Entries

Captain Starfire's Great Escape!

by jonnopon3000 - 48 Hour Competition Entry

This is my first ever Ludum Dare compo entry, and my first real game of its type using the Java language.
You'll need Java installed to run it.

It's a wave-based stationary survival game, with the goal to move through waves of enemies by shooting at them.
Note: The story (detailed in game intro screens + death screen + win screens) is the important part of the theme integration.

::-- You must survive 20 waves to escape the onslaught --::



I've seen the comments about the playability and bugs, so here's some warnings/tips before playing:

1. Due to the way it's coded, bullets are only destroyed when they exit the screen or hit an enemy. Firing loads of bullets can lag the game. Fire in single or double bursts for best gameplay - as few bullets as possible at a time.

2. Bullets have faster speeds when you fire with the cursor more towards the edge of the game field - to avoid the bullet clean-up problem mentioned in number (1), try to fire as far out as possible (again, in single or double bursts).

3. Also due to the coding, only the most recent bullet fired will have collision. This can cause problems in clean-up (for example creating a bullet shield at slow speed means those bullets will not be cleaned up as they will not get to the edge of the screen or hit an enemy) and may confuse gameplay. For the best advice, I'd say that sticking to single or double shots will help in all cases (again).


Fire as few bullets as possible, aiming as close to the edge of the screen (or the enemy you wish to kill) as possible, to get best performance and (hopefully) enjoyment.


Please do feed back. It's a .jar file so feel free to download whichever "platform" you like.

I hope you enjoy the game.

- Jonno

Downloads and Links




Aug 22, 2011 @ 3:42pm

Really liked this, could see it translating well to mobile touch device. Great first entry!

Zed says ...
Aug 22, 2011 @ 7:20pm

Definitely not bad for a first entry. Seems a bit buggy/laggy in places. Good start, though.

And I wish there was a 'Story' category, because your backstory was really well-written.

arkeus says ...
Aug 23, 2011 @ 6:56pm

Great first entry! I liked how much thought you put into the story and explaining the controls at the beginning. I definitely had some problems during actual gameplay (would randomly get choppy, bullets would go through enemies, bullets wouldn't go where I aim), but those are all things that could easily be worked out. :) Good job!

agersant says ...
Aug 23, 2011 @ 9:48pm

Gameplay was somewhat buggy and I think slowing ennemies down triggers the wrong feedback loop. Waves are dangerous only when they spawn and become trivial after a few ennemies are shot. It would be more challenging if killing ennemies made the other ones FASTER.

Apart from this, the story is very pleasant. I havent seen many games putting so much focus on it. Great job with it =)

jonnopon3000 says ...
Aug 23, 2011 @ 10:12pm

@agersant: I forgot everyone had access to the code, so I called the "enemies get slower when there are less of them" a feature hoping it'd go amiss. In truth it's a bug...I have no idea why it's happening, but it's been happening since the first time I ran a working wave of enemies. I haven't looked into it properly (taken a day or two's break from coding after the competition), but the brief time I gave to the problem in the competition yielded no results. I have no idea why the enemies slow down. It's probably something to do with the way the game updates entities, but I reconfigured that three times in total for certain other reasons and the slowing down still exists.

Either way, thanks all for the comments on the story; it was actually the first thing I wrote to get a feel for the game before writing the mechanics, and I changed it a few times to suit the theme. Writing is a strong point of mine and I like to put work into giving context to anything I do.

Andrew says ...
Aug 24, 2011 @ 1:13pm

There are some issues, but I've covered them in irc, other improvements could me types of different enemies, homing/dodging algorithms, different weapons and so on. Definitely not bad for a first.

Lattyware says ...
Aug 24, 2011 @ 1:44pm

Not a bad game, but the bugs do make it hard to play, I had a few crashes and the gameplay mechanics are not too clear. But apart from that seems to play well enough. Fun, if not too groundbreaking.

Mjiig says ...
Aug 24, 2011 @ 3:07pm

Pretty fun game, but the bugs make it irritating. Would be really enjoyable if not for the lag, and if every bullet actually went to the point it was meant to!

Surrealix says ...
Aug 24, 2011 @ 3:52pm

The backstory had me expecting an epic game! Unfortunately there were a few technical issues that meant I never got past wave 4 - my bullets stopped colliding with enemies (and the enemies lagged very badly), so I could sit shooting for minutes on end and never hit the last few.

Although basic, it's a good first entry that has everything needed - graphics, sound, gameplay, (community participation) and a story. So well done!

siebharinn says ...
Aug 24, 2011 @ 6:18pm

Great entry! I agree that with some polish, it would make a good touch game.

Aiming seemed to be off, by as much as ten degrees at times.

I noticed that if I put the targeting pip on myself and fired, that bullets would start piling up around me.

Lag was ok for the first few levels, then got to unplayable. Probably because of my stationary bullet shield. :)

Kvisle says ...
Aug 24, 2011 @ 6:48pm

A good first entry - it has some bugs, though.

jonnopon3000 says ...
Aug 24, 2011 @ 7:01pm

I'm finding the comments saying that past a certain round is unplayably laggy; on my machine here (and several of my friends') it runs fine all the way through the game, besides some lag issues for lots of bullets having been fired (and not destroyed) and the little mechanical issues.

In retrospect, maybe the bullets should have a constant speed and should disappear and be cleaned up after a certain amount of time.

I am quite disheartened that some people seem to be experiencing un-playability, though; that's one thing I have definitely not experienced.

jonnopon3000 says ...
Aug 24, 2011 @ 7:03pm

I'm going to change the description to include some warnings about playing; little gameplay tips I know of to reduce lag. This might help some people play the game for longer and with more enjoyability.

siebharinn says ...
Aug 24, 2011 @ 7:29pm

First rule of programming - It always runs fine on *your* machine. :)

siebharinn says ...
Aug 24, 2011 @ 7:38pm

It's been a long time since I messed with Java, but is this line from Entity.draw loading the image from disk every time, or does it get cached by the runtime?

URL imageFind = this.getClass().getClassLoader().getResource(imref);

If you're loading it from disk every frame, that would be a massive speedkill right there. Just something I noticed, as I said, my java-fu is weak.

Sos says ...
Aug 24, 2011 @ 7:44pm

It felt like fighting mosquitoes!

jonnopon3000 says ...
Aug 24, 2011 @ 7:47pm

Seibharinn: Hmm...I'm fairly new to loading and displaying images, so I never thought of it. Do you think that saving the image for each entity type to a global static Image type variable in the main class and passing that image as a parameter somehow to each new entity (rather than having the entities create their own variable)would solve the problem? That way, it'd only ever read the images once.

siebharinn says ...
Aug 24, 2011 @ 8:10pm

No need for a global variable unless you have multiple classes using the image (and even then, there are better ways). Make the image a static variable of the entity class. Each subclass can set their own, and the image only gets loaded once per class. Every instance would use the class variable.

jonnopon3000 says ...
Aug 24, 2011 @ 8:44pm

Siebharinn: If the image variable is static then all extended image variables point to the same piece of data. However, with it not being static the entities are drawn correctly :D
Performance hit the roof, no matter how many bullets I fire :D

Problem is, now enemies' and bullets' movements are not updating properly :(

jonnopon3000 says ...
Aug 24, 2011 @ 8:58pm

I worked out why they weren't moving properly - the game loop was now so much faster without loading the images from disk that the value of delta was a fraction of what it was. Changed a couple of numbers in the move() method in and everything's working again at a ridiculous fps :D

Now onto the bullet placement and collision code and this game will be pretty much fixed.

Thanks everyone!

tnelsond says ...
Aug 25, 2011 @ 3:08am

Nice game. I liked how you wrote the message in text and even managed to make it look like there was intereference. :D

Yeah, I looked at your code. The problem you're having with the bullets is the thing about the trig with the atan2 and the sin and cos, but also that the last two parameters of constructing an entity is an int which isn't as accurate for this sort of thing as a double would be. Here's my attempt to implement using sin and cos so that you get a constant speed despite the mouse's location:

double t_angle = -Math.atan2(destX-startX, destY-startY) + Math.PI / 2;
entities.add(new EntityBullet(startX + 20, startY + 20, (int) (600 * Math.cos(t_angle)), (int) (600 * Math.sin(t_angle))));

d_m says ...
Aug 25, 2011 @ 4:37am

I agree with most of the comments here. The story and concept were really good... I had a lot of trouble playing it and kept running into bugs, but I think with a little bit of work you could translate this idea into something pretty good. I also like interpreting the "escape" concept as "there may be no escape". Good job, and stick with it!

jonnopon3000 says ...
Aug 25, 2011 @ 11:01am

tnelsond: I appreciate the effort and concern, but after an hour of playing with those calculations I have some interestingly varied results. Right now, it will fire a bullet (mostly) directly at the centre of the cursor on a diagonal, as long as it's in the top half of the game, but breaks down for much else.
I've got a couple of ideas to make it work a little better (for example make the playing board a square), but right now I'm still very stuck on this one (which is worrying, since I'm supposed to be an achieving student of mechanical mathematics).

jonnopon3000 says ...
Aug 25, 2011 @ 2:16pm

Short update, the bullets are now fine! Basically, I was using tnelsond's formula but then I was adding a multiplication in the actual movement code that broke the formula. I shifted stuff around a little and voila! Bullets are 99% accurate and move at a constant speed no matter where you fire from.

Rudy says ...
Aug 25, 2011 @ 5:20pm

It's very buggy and laggy though, like a bullet spazzing out in place or not colliding with the ship. Gameplay- and theme-wise, there is not much innovation. But, hey, at least you submitted yours! The background is too empty, some stars or such could have helped. Afraid, I did not see the end of 20 waves, so tell me if I missed a boss or something :P

tcstyle says ...
Aug 25, 2011 @ 9:34pm

Quite buggy, especially the hit collision is really unforgiving.
Funny fact: I made a very similar game for two players in QuickBasic about 15 years ago ;).

dogbomb says ...
Aug 28, 2011 @ 3:01pm

Great for a first entry, though I did find it quite frustrating due to the bugs and it's not being quite "interactive" enough for me. I'd either like to move around... or have a visual moving turret on the stationary character.

The theme was pretty shoehorned in here too. I hope to see more entries in future :D

PaulSB says ...
Sep 1, 2011 @ 10:33pm

Quite rough and buggy, but there's the core of a fun game in there. Theme is a bit of an afterthought but I very much liked the chat log/instruction screen!

You must sign in to comment.

[cache: storing page]