|
|
princec
|
 |
«
Reply #1 - Posted
2011-05-30 17:01:08 » |
|
Vista64, JDK7 32bit: java.lang.NoSuchMethodError: checkAndLoadMain Error: A JNI error has occurred, please check your installation and try again Exception in thread "main" (Didn't run) Cas 
|
|
|
|
m_waddams
|
 |
«
Reply #2 - Posted
2011-05-30 17:10:07 » |
|
Vista64, JDK7 32bit:
java.lang.NoSuchMethodError: checkAndLoadMain Error: A JNI error has occurred, please check your installation and try again Exception in thread "main"
Thanks for testing! You probably need the 64 bits native lwjgl libraries. Download the latest lwjgl (lwjgl.org) and copy the native/windows/*64.dll to LodeRunner/native/ I'll put the native libs on my website too, hopefully lwjgl releases for Android and iOS too, that would be cool.
|
|
|
|
|
Games published by our own members! Check 'em out!
|
|
teletubo
|
 |
«
Reply #3 - Posted
2011-05-30 18:14:50 » |
|
Vista64, JDK7 32bit:
java.lang.NoSuchMethodError: checkAndLoadMain Error: A JNI error has occurred, please check your installation and try again Exception in thread "main"
Thanks for testing! You probably need the 64 bits native lwjgl libraries. Download the latest lwjgl (lwjgl.org) and copy the native/windows/*64.dll to LodeRunner/native/ I'll put the native libs on my website too, hopefully lwjgl releases for Android and iOS too, that would be cool. why not using the fantasitc AppletLoader ? it works really well .
|
|
|
|
ra4king
|
 |
«
Reply #4 - Posted
2011-05-30 19:20:40 » |
|
Vista64, JDK7 32bit:
java.lang.NoSuchMethodError: checkAndLoadMain Error: A JNI error has occurred, please check your installation and try again Exception in thread "main"
Thanks for testing! You probably need the 64 bits native lwjgl libraries. Download the latest lwjgl (lwjgl.org) and copy the native/windows/*64.dll to LodeRunner/native/ I'll put the native libs on my website too, hopefully lwjgl releases for Android and iOS too, that would be cool. Why don't you just include the 64 bit natives? Also, princec is the one who started LWJGL  And for Android and iOS, there's libGDX 
|
|
|
|
Mads
|
 |
«
Reply #5 - Posted
2011-05-30 22:42:29 » |
|
Win7 64-bit. java.lang.UnsatisfiedLinkError: C:\Users\Mads Horndrup\Downloads\loderunner\LodeRunner\native\lwjgl.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(Unknown Source) at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at org.lwjgl.Sys$1.run(Sys.java:73) at java.security.AccessController.doPrivileged(Native Method) at org.lwjgl.Sys.doLoadLibrary(Sys.java:66) at org.lwjgl.Sys.loadLibrary(Sys.java:82) at org.lwjgl.Sys.<clinit>(Sys.java:99) at Game.<clinit>(Game.java:70) Could not find the main class: Game. Program will exit. Exception in thread "main"
Did not run.
|
|
|
|
m_waddams
|
 |
«
Reply #6 - Posted
2011-05-31 13:12:45 » |
|
Why don't you just include the 64 bit natives?
Filesize  Would be around 6 MB. The actual java classes are only 92 KB, feels wrong to have such a large file for such a small game. I'll create downloads for all different platforms, like puppy does.
|
|
|
|
|
m_waddams
|
 |
«
Reply #7 - Posted
2011-05-31 13:29:50 » |
|
why not using the fantasitc AppletLoader ? it works really well .
Does it then only run in a browser? Does it reload the natives each time? What about sound? Does that play in a browser?
|
|
|
|
|
ra4king
|
 |
«
Reply #8 - Posted
2011-05-31 22:14:41 » |
|
why not using the fantasitc AppletLoader ? it works really well .
Does it then only run in a browser? Does it reload the natives each time? What about sound? Does that play in a browser? It's called an Applet for a reason. And of course sound is played 
|
|
|
|
|
|
Games published by our own members! Check 'em out!
|
|
princec
|
 |
«
Reply #10 - Posted
2011-06-01 12:25:17 » |
|
Hm get the same problem with both 32/64 bit zips. My machine may not be as sane as it should be though. Cas 
|
|
|
|
m_waddams
|
 |
«
Reply #11 - Posted
2011-06-01 13:17:50 » |
|
Hm get the same problem with both 32/64 bit zips. My machine may not be as sane as it should be though.
Hmm, something can't find the LodeRunner 'main' maybe? I used a copy of the spaceinvaders tutorial by Kevin Glass ( public static void main(String argv[]) ). I've now changed it to 'public static void main(String[] args)'. Could you try it again?
|
|
|
|
|
kappa
|
 |
«
Reply #12 - Posted
2011-06-01 13:31:06 » |
|
the reason why it fails for princec above is because you've split the 32bit and 64bit natives, LWJGL tries to load the 32bit natives first, if that fails, it then loads the 64bit natives. Since it doesn't find the 32bit natives at all on windows64 it assumes that all natives are missing and fails.
What would be a better idea is to bundle 32 and 64 bit natives together and just have a bundle for each platform (windows, linux, mac and solaris). Its such a small overhead that it hardly matters on today's computers and internet speeds.
|
|
|
|
|
m_waddams
|
 |
«
Reply #13 - Posted
2011-06-01 13:41:08 » |
|
the reason why it fails for princec above is because you've split the 32bit and 64bit natives, LWJGL tries to load the 32bit natives first, if that fails it then loads the 64bit natives. Since it doesn't find the 32bit natives at all on windows64 it assumes they are missing and fails.
Ah, that makes sense  I'll fix my downloads. Maybe LWJGL should try for the 64bit natives at least 
|
|
|
|
|
kappa
|
 |
«
Reply #14 - Posted
2011-06-01 13:45:31 » |
|
Ah, that makes sense  I'll fix my downloads. Maybe LWJGL should try for the 64bit natives at least  Yeh, LWJGL shouldn't really require the 64bit natives and 32bit natives to function on 64bit systems. However there is a patch on the LWJGL forums that could potentially change this in future releases.
|
|
|
|
|
m_waddams
|
 |
«
Reply #15 - Posted
2011-06-01 15:49:25 » |
|
why not using the fantasitc AppletLoader ? it works really well .
Does it then only run in a browser? Does it reload the natives each time? What about sound? Does that play in a browser? It's called an Applet for a reason. And of course sound is played  I'm trying to make it work, but all I end up with is a blank screen. Lode Runner Retro appletIs there any way to debug what is happening?
|
|
|
|
|
kappa
|
 |
«
Reply #16 - Posted
2011-06-01 16:04:02 » |
|
I'm trying to make it work, but all I end up with is a blank screen. Lode Runner Retro appletIs there any way to debug what is happening? Yes, enable the Java Console from the Java Control Panel (this will then show while the applet runs in the browser). The problem however seems to be with your main Game class's initialising method, just make sure its in the form 1 2 3
| public Game() { .... } |
and not something like public Game(String blah, int blah) {} this is because a newInstance() of your main class is needed.
|
|
|
|
|
m_waddams
|
 |
«
Reply #17 - Posted
2011-06-01 17:36:50 » |
|
The problem however seems to be with your main Game class's initialising method, just make sure its in the form 1 2 3
| public Game() { .... } |
Well that helped a bit  Now I get a whole lot of stacktrace, the only thing I can make out is: at Game.<clinit>(Game.java:70) which is private static long timerTicksPerSecond = Sys.getTimerResolution();
|
|
|
|
|
kappa
|
 |
«
Reply #18 - Posted
2011-06-01 17:44:42 » |
|
Now I get a whole lot of stacktrace, the only thing I can make out is:
at Game.<clinit>(Game.java:70)
which is private static long timerTicksPerSecond = Sys.getTimerResolution();
The above uploaded applet still shows the old error, so I guess its not updated yet, can you please paste more of the java console output of the error or update the above uploaded applet. thx
|
|
|
|
|
m_waddams
|
 |
«
Reply #19 - Posted
2011-06-01 17:55:25 » |
|
Now I get a whole lot of stacktrace, the only thing I can make out is:
at Game.<clinit>(Game.java:70)
which is private static long timerTicksPerSecond = Sys.getTimerResolution();
The above uploaded applet still shows the old error, so I guess its not updated yet, can you please paste more of the java console output of the error or update the above uploaded applet. Uploaded the new one. Thanks for helping.
|
|
|
|
|
kappa
|
 |
«
Reply #20 - Posted
2011-06-01 18:10:08 » |
|
oh, I see the issue, your main class needs to be an Applet. Currently its an Application and that is why its failing. You need to refactor your main class into an Applet or create a new Applet class along side your Application class. Have look at the LWJGL Wiki for an example of a what a Basic LWJGL Applet should look like. Its not very different or difficult to convert a LWJGL Application into a LWJGL Applet.
|
|
|
|
|
ra4king
|
 |
«
Reply #21 - Posted
2011-06-01 19:31:58 » |
|
You 64bit zip plays fine. What a fun game! What are they keys? I could only find the arrows, space, and Q for quit. However I get this in the console when I run your applet: 1
| java.lang.ClassCastException: Game cannot be cast to java.applet.Applet |
As kappa said, your Game class needs to extend Applet.
|
|
|
|
jojoh
|
 |
«
Reply #22 - Posted
2011-06-02 18:06:16 » |
|
The Win64 version ran fine on my machine. I had forgotten how much fun and how hard loadrunner is. Great remake.
Attempting to switch out of fullscreen didn't work and I was just stuck with a black screen.
|
|
|
|
m_waddams
|
 |
«
Reply #23 - Posted
2011-06-03 13:16:41 » |
|
You 64bit zip plays fine. What a fun game! What are they keys? I could only find the arrows, space, and Q for quit.
What more keys would you like? See the README, or F1 for Help. There's a new version, with better AI and joystick handling. Try my favorite levels, 6 and 14 (select through left/right on the title screen). However I get this in the console when I run your applet: 1
| java.lang.ClassCastException: Game cannot be cast to java.applet.Applet |
As kappa said, your Game class needs to extend Applet. I'll fix this later, thanks.
|
|
|
|
|
m_waddams
|
 |
«
Reply #24 - Posted
2011-06-03 13:19:53 » |
|
The Win64 version ran fine on my machine. I had forgotten how much fun and how hard loadrunner is. Great remake.
Thanks  Attempting to switch out of fullscreen didn't work and I was just stuck with a black screen.
It should at least have written to the cfg file, so the next startup would start windowed?
|
|
|
|
|
m_waddams
|
 |
«
Reply #25 - Posted
2011-06-04 10:33:43 » |
|
1
| java.lang.ClassCastException: Game cannot be cast to java.applet.Applet |
As kappa said, your Game class needs to extend Applet. I got my applet working, pretty smooth when fullscreen. But the initialization takes close to a minute, after the LWJGL progressbar has finished that is. When I run the applet in Eclipse there is no waiting, like when running as an application. The problem seems to be: 1
| InputStream is = Sprite.class.getClassLoader().getResourceAsStream("tiles/" + ref); |
It does this for every tile in the background, which is 16 x 28... Tiles are only 20 by 22 and about 1KB per tile (PNG). Why is this so slow? Update: I now just generate them from 1 big getResourceAsStream, saves 45 seconds! I would still like to know why getResourceAsStream is so slow though. I'll have to rewrite getting the other sprites and levels within 1 read too, that should save another 10 seconds or so. Bit of a hassle since it is not really an option for the application version, where you can make your own levels, so I have to keep the old code too...
|
|
|
|
|
jojoh
|
 |
«
Reply #26 - Posted
2011-06-04 12:57:52 » |
|
It should at least have written to the cfg file, so the next startup would start windowed?
Yep it did, but alt-tab didn't even work to get out of the game when it black-screened. Had to ctrl-alt-del -> task-manager to get out of it, so it might not be the way for general population to switch  Tested the applet version as well. It sort of worked, but the up key was "stuck", so that made a challenging game even more challenging  Quite interesting to find ways to solve it... Tested on both FF and chrome, Win7
|
|
|
|
m_waddams
|
 |
«
Reply #27 - Posted
2011-06-04 13:11:53 » |
|
Yep it did, but alt-tab didn't even work to get out of the game when it black-screened. Had to ctrl-alt-del -> task-manager to get out of it, so it might not be the way for general population to switch  The applet version starts windowed (within the browser that is). What happens if you go fullscreen (guess that works) and then back again? Tested the applet version as well. It sort of worked, but the up key was "stuck", so that made a challenging game even more challenging  Quite interesting to find ways to solve it... Tested on both FF and chrome, Win7 Hmm, I have that with a wrongly calibrated joystick sometimes, otherwise this is new to me... Just found out I had I wrong link in the opening post, guess you knew where to find it? Could you test the latest version, see if the loading time has improved for you? (you can browse java-expert.nl/games/ to see modification times, to see if you're testing a newer version : )
|
|
|
|
|
jojoh
|
 |
«
Reply #28 - Posted
2011-06-04 17:17:58 » |
|
The applet version starts windowed (within the browser that is). What happens if you go fullscreen (guess that works) and then back again?
Never thought of testing that... Went to fullscreen OK, but black screen again in the way back, but this time I could at least alt-tab away from it. This could naturally have something to do with it: 1 2 3 4 5 6 7 8 9 10
| java.io.FileNotFoundException: LodeRunner.cfg (Access is denied) at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.<init>(Unknown Source) at java.io.FileOutputStream.<init>(Unknown Source) at loderunner.Config.write(Config.java:40) at loderunner.Game.getInput(Game.java:842) at loderunner.Game.renderFrame(Game.java:457) at loderunner.Game.gameLoop(Game.java:442) at loderunner.Game.access$0(Game.java:435) at loderunner.Game$1.run(Game.java:67) |
Hmm, I have that with a wrongly calibrated joystick sometimes, otherwise this is new to me...
Could be. Tried to control it with wheel, but no luck Just found out I had I wrong link in the opening post, guess you knew where to find it?
Ye, hacker I am  Could you test the latest version, see if the loading time has improved for you? (you can browse java-expert.nl/games/ to see modification times, to see if you're testing a newer version : )
Didn't think about loading time first time around, so was probably not too bad then, but really fast now at least.
|
|
|
|
ra4king
|
 |
«
Reply #29 - Posted
2011-06-04 18:16:26 » |
|
Applet version worked fine, though there were no sounds. How do you go to full screen in the applet?
|
|
|
|
|