Starship Invaders

Finished a game that I’m going to try and squeeze into 4KB for the 4K competition, it’s currently 5,72KB.

First, few things:

  • This game is inspired by Star Trek
  • All graphics are done procedureally (except the Starships)
  • Starship pixel art created by me, although clearly starships from Star Trek universe :slight_smile:

And now, introducing…

http://www.stratzone.net/4k/starship_splash.jpg

Keys:
W = FORWARD
S = REVERSE
A = STRAFE LEFT
D = STRAFE RIGHT
(Note, all movement is relative to the rotation of the starship!)

Mouse:
Left-Click = Phasers
Right-Click = Photon torpedo

Special functions:
E = By pressing ‘E’ you travel at warp-speed (you need to press E in combination with W)

Other notes:
Closely monitor the minimap, as you can see where enemies are
Phaser banks recharge with time
Photon torpedos recharge with time
Shields recharge with time
HULL DOES NOT RECHARGE WITH TIME

Score count:
Phaser hit = 1 point
Destroying a enemy with phasers = 30 (or total 70)
Destroying a enemy with photon = 100

Description:
After years of war with the Dominion, Starfleet has run out of starships to defend against any invasion. You are the sole starship located near the Neutral Zone, and have detected a huge invasion fleet of Romulan Warbirds making their way to Federation Space. The future of the Federation rests in your hands, defend against the invaders.
Make sure no enemy ships make their way to Federation space, or else all is lost.

PLAY HERE: http://www.stratzone.net/4k/starship.jar
(is not a webstart because of problems with sun.java2d.opengl=true)

Good luck :slight_smile: remember to post your score.

Nice graphics, but the movement feels arkward.

My score was 751. I only played it twice tho.

I got 2269. I like it. A bit on the difficult side. And yes the controls are still akward.

Fun game. Scored 11313.

I found the controls awkward at first, but once I got used to them they were fine.

Good job.

One suggestion. Since photon torpedos are limited, they should be more powerful. Either make them target and track a ship or explode when they hit a ship or the point that you were aiming at and do damage in a larger radius.

Well, I admit that the controls are awkward for those not used to them. But I’ve been playing the game for a while now and they seem natural to me, I can’t imagine using absolute movement for this game as some have suggested.
At least I’m happy with it :slight_smile:

I might add some type of asteroids-movement, so that you keep moving in the direction you were moving after releasing the keys. But I will probably just make it slow down smoothly to a stop, not keep going like in asteroids.

Jester, 11313 :slight_smile: nice…

Is it just me or do the controls lock up after about a minute or two, only to let you give input every 5-10 seconds?

I’m going to update my Java to the release version, maybe there’s a bug in the current beta I have…

Edit: Game does seem pretty cool though, hopefully you can get it squeezed into the 4k. Maybe you’ll have to procedurally draw the ships? (would that help?)

Only problem is this game is inaccurate, photon torpedoes never destroy anything :stuck_out_tongue:

I’ve played it countless of times, and others too, I’ve never seen or heard that the control lock up. :-\

The photon torpedos go into a straight line, and seek into any nearby enemy ships. Don’t know what’s causing the game to run so bad for you. Tell me about your system setup (java version, os, etc.)

Nono, I probably confused you. The torpedoes definitely work. They just never almost never destroy anything in the actual show. :slight_smile:

The controls are still messed up though. But I had the same problem with TankZone4k also, so it might be my system somehow.

I just tried updating to latest Java but it does not seem to fix anything. I might try uninstalling and reinstalling completely though, it seemed like it didn’t recognize it as a new installation maybe?

Windows XP Pro
Latest Java 6 maybe?
2.0 ghz P4

It runs fine on 1.5.0_09-b03.

I have not have any problems with the controls. Also every torpedo i have shot hits.

Hehe :slight_smile:

Yes, in the “real tv show” the photon torpedos dont destroy ships :slight_smile: (unles the shields are down!)

I’ve tested it with java 1.6.0-b105 and I experienced what you’re talking about, the controls seemed to get frozen, stuck, and unstuck etc.

I think this has something to do with the high framerate, in java 1.5 I get around 80fps, but in java 1.6 I get about 300fps. Clearly this is affecting the game somewhat.

It’s like all the power is thrown into the main game loop, while the input listener doesn’t seem to get any cpu time.

I ran it with -verbose:gc and there is some constant gc activity, although, the same happens with java 1.5.
I don’t know what it is, there is nothing in my code that should produce this sort of gc activity, I believe.

edit: ^ ignore that, I don’t think it’s the gc activity. Might be because I’m using a “unusual” input-event-handling system, instead of using boolen flags for forward, reverse, shoot etc., I’m using a integer to store the action state. e.g.

Haha, that’s kinda funny. Nice jump in performance at least, and I’m glad you’re getting the same error I am (sorta). Any way you could just throw in a +1 ms to sleep time for each display loop? Might let it diverge some time to input?