Sparx WIP

Hey everyone,
Have been writing my first game in Java, its still WIP, but playable.
Its an arena shooter done in Java2d.

Take a look, and leave a comment.
http://www.sparx.dk

Need some tips on implementing a global hiscore table.

Check out my music --> http://www.myspace.com/hazerec

Looks great and plays great! :slight_smile:

I did a global high score table on my game by getting my applet to send the data to a servlet like this:


URL url = new URL(cHOST_NAME);
URLConnection urlConnection = url.openConnection();
if (urlConnection instanceof HttpURLConnection) {
    ((HttpURLConnection)urlConnection).setRequestMethod("POST");
}
else {
    throw new Exception("this connection is NOT an HttpUrlConnection connection");
}
urlConnection.setUseCaches(false);
urlConnection.setDefaultUseCaches(false);
urlConnection.setDoInput(true);
urlConnection.setDoOutput(true);
urlConnection.setRequestProperty("Content-Type", "application/octet-stream");
urlConnection.connect();

// send data to servlet
OutputStream os = urlConnection.getOutputStream();
os.write(bytes);
os.flush();
os.close();

You probably don’t need to make it an octet-stream if you’re just sending Strings.

nothing happens when i press S here ???

Thanks ;D
-Think im gonna make a quick filebased solution tonight, my server runs php so no servlets.

quote author=g666 link=topic=18091.msg142010#msg142010 date=1201297408]
nothing happens when i press S here ???
[/quote]
Make sure that the applet is in focus, by pressing the mouse button while the pointer is on the applet.

Did you click the applet to give it focus first?

It doesn’t have to be a servlet, you can just send a request to a web page to record the highscores.

game looks nice but runs way too slow here, probably due the size of the applet, would probably be equally as good at half that size.

Runs fine here, but the size is really too big for an applet. Keep in mind that the most common resolution still is 1024x768.

The steering behavior of some of the enemies was a bit weird and jittery in spots.

Found it odd that the bullets explode when leaving the screen.

Slow? Really? Personally, I prefer when it is big… I’m talking about the size of the applet of course ;D.

Way to fast here…a game lasts 1-2 seconds before i’m dead without the slightest chance to survive (Athlon X2 4200+, GF 7600gt, Java 6u10 (early access version with D3D pipeline)).

Think im going to test it with Java 6u10 with the D3D/Opengl pipeline today, and try to make some sort of speed test, so speed of game adapts to computer used… Do you know when Java 6u10 is officially released ??

No. And i hope it never will, because the D3D-pipeline absolutely kills BufferedImage-performance on some machines (http://forums.java.net/jive/thread.jspa?threadID=35484&tstart=0)

Same problem here: Pressing S doesn’t do anything. And yes, the applet has focus.

Ups my fault(put a faulty version up late last night), should be ok now.

Whats your machines specs?

AMD 3000+, 1GB RAM, NVIDIA 5900xt, Linux, Java 1.6

Wow, love the graphics!!! How did you do it, obviously using java2D? All of those little effects with the pixels flying about are great.

Runs sweet here, no problem. 3ghz win XP java 6 u10

Yeah, now it works. It is really fun to play (and the controls feel good especially with a touchpad).

Every 2 seconds or so the game will begin to hang and continue after a few hundred milliseconds. My JVM process uses 100% cpu all the time. Get’s my machine cooking ^^
2.0Ghz Dual Core, 1G RAM, ATI X1600, Ubuntu Linux 7.10

Its my own own little java2d engine, all graphics are done via java2d line/rect/oval drawing (no photoshop here), to keep the graphics simple, but stylish.
All animations are prerendered then cached.
The explosion are made with my own simple particle system(no physics, only velocity and speed), also prerendered and cached.

Glad you like it ;D

Nice fire work, running very smooth here.

Have you implemented the fifth type of enemy in your demo? I wonder what can it do .

Celeron M 1.5Ghz Java1.6