Tech Demo/Test - "Scorched"


[url]http://cal007300.student.utwente.nl/vincent/scorched.jnlp[/url]

Hey, this is a small game I’m working on, and I wanted to show you at least ‘something’. In this demo you can fly around and shoot plasma and missiles at (nearly) indistructible enemies, but it’s fun. Let me know what you think.

Controls (all mouse):
Right Mouse Button: ship flies to destination
Left Mouse Button: ship fires plasma gun
Hold Middle Mouse Button: missile-system will arm at a poor monster. (select multiple targets and/or keep hovering over 1 target to lock more missiles at that target)
Release Middle Mouse Button: missile system will fire missiles at the targetted monsters.


http://cal007300.student.utwente.nl/vincent/screen3thumb.jpg

It looks fun!!! However, it doesn’t work:

Exception in thread “javawsApplicationMain” java.lang.NoClassDefFoundError: javax/media/NotConfiguredError
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
at java.lang.Class.getMethod0(Unknown Source)
at java.lang.Class.getMethod(Unknown Source)
at com.sun.javaws.Launcher.executeApplication(Unknown Source)
at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
at com.sun.javaws.Launcher.continueLaunch(Unknown Source)
at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source)
at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source)
at com.sun.javaws.Launcher.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

I get:

java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.javaws.Launcher.executeApplication(Launcher.java:1098)
at com.sun.javaws.Launcher.executeMainClass(Launcher.java:1045)
at com.sun.javaws.Launcher.continueLaunch(Launcher.java:896)
at com.sun.javaws.Launcher.handleApplicationDesc(Launcher.java:468)
at com.sun.javaws.Launcher.handleLaunchFile(Launcher.java:218)
at com.sun.javaws.Launcher.run(Launcher.java:165)
at java.lang.Thread.run(Thread.java:613)
Caused by: java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)
at java.lang.Runtime.loadLibrary0(Runtime.java:822)
at java.lang.System.loadLibrary(System.java:992)
at org.lwjgl.Sys.(Sys.java:61)
at org.lwjgl.opengl.Display.(Display.java:96)
at org.sparrow.scorched.Scorched.initDisplay(Scorched.java:218)
at org.sparrow.scorched.Scorched.run(Scorched.java:341)
at org.sparrow.scorched.Scorched.main(Scorched.java:579)
… 11 more

On OS X10.4.1 (w. Java 5)

Yes, at this point I only included jogl 's windows native drivers because I was in a hurry :\

and the first error javax.media is probably because my home-build game library has a “JMFAnimation” class… although I dont use it in this program (I dont know why it bails at that point then :slight_smile:

sunday-evening I will have time to include the drivers (i know its little work, but I’m late as it is… and I wont come home before sunday)

[quote]Yes, at this point I only included jogl 's windows native drivers because I was in a hurry :
[/quote]
You mean LWJGL :wink:

you should require 1.4+ instead of 1.5. It tried to install 1.5 on my setup.

  • Removed dependancy on the Java Media Framework
  • Lowered number of required sound channels
  • JNLP Dependancy is now JRE 1.4, not 1.5 (but that works fine too)
  • Added native libraries for Linux and Mac OS X to the JNLP

This should fix most problems… any comments are welcome :slight_smile:

any game that allows me to shoot THAT many missiles at a target, gets my vote ;D
2 issues:

  1. sound is off - lots of clicks and pops. Either you’re reusing a playing source, or the wavefil is b0rked?
  2. Though shooting lots of missiles is fun, the particles make it drop from ~ 1200+fps to ~70 :o

Yeah, I noticed that too… funny… it didn’t happen in earlier versions…

I admit i’m cheating a bit here, if no sources are available I just dont play the sample: -grin-

ublic static void playSample(float x, float y, int sample) {
	currentSource++;
	if (currentSource >= soundSources.capacity())
		currentSource = 0;

	int sNum = soundSources.get(currentSource);

	int state = AL10.alGetSourcei(sNum, AL10.AL_SOURCE_STATE);
	
	if(state != AL10.AL_PLAYING) {
	
		float xPos = -(float) (((sizeX / 2.0f) - x) / sizeX);
		float yPos = -(float) (((sizeY / 2.0f) - y) / sizeY);

		xPos *= 0.25;
		yPos *= 0.25;

		AL10.alSourcei(sNum, AL10.AL_BUFFER, buffer.get(sample));
		AL10.alSourcef(sNum, AL10.AL_PITCH, 1.0f);
		AL10.alSourcef(sNum, AL10.AL_GAIN, 1.0f);
		AL10.alSource3f(sNum, AL10.AL_POSITION, xPos, yPos, 0);
		AL10.alSource3f(sNum, AL10.AL_VELOCITY, 0, 0, 0);
		AL10.alSourcei(sNum, AL10.AL_LOOPING, AL10.AL_FALSE);

		AL10.alSourcePlay(sNum);
	}
}

ran beautifully…60 fps constant. oddly enough, very addictive…now can I blow things up?

Hi,

Also runs fine on my system: Athlon 1400 and Geforce 440 Mx with Java 5 (70 fps). And yes, when can we blow up things? :slight_smile:

OMG those missiles are awesome!

I also love how they push the enemy right off the side of the screen!