Lode Runner remake

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.

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:


java.lang.ClassCastException: Game cannot be cast to java.applet.Applet

As kappa said, your Game class needs to extend Applet.

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.

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).

I’ll fix this later, thanks.

Thanks :slight_smile:

It should at least have written to the cfg file, so the next startup would start windowed?

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:


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…

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 :slight_smile:

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 :wink: Quite interesting to find ways to solve it… Tested on both FF and chrome, Win7

The applet version starts windowed (within the browser that is). What happens if you go fullscreen (guess that works) and then back again?

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 : )

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:

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)

Could be. Tried to control it with wheel, but no luck

Ye, hacker I am :slight_smile:

Didn’t think about loading time first time around, so was probably not too bad then, but really fast now at least.

Applet version worked fine, though there were no sounds. How do you go to full screen in the applet?

Tested win32 version but it said cannot manifest main-class and so on.

Press ‘F’. Unless you mean in the code, then it’s the same as in the application version, I just do ‘Display.setFullscreen(fullscreen);’ (which happens to toggle between true and false). Switching back should work now too. Only problem is I lose the mouse focus, haven’t figured out how to get it back. The user will have to click the playing window first… (unless he/she is using a joystick, that doesn’t seem to need focus.
I guess I need to mention F1 somewhere, I don’t want it to show permanently on the Titlescreen though.

Any idea about the sounds? A new version is available, maybe try that? Loading time is now down to 7 or 8 seconds, and it shows the Titlescreen after 2 :slight_smile:

More info please :slight_smile:
OS, exact error, Java version. Did you use the batch file or java -jar?

And could you try the applet?
Thanks!

Hmm, doesn’t trouble my system. Is there a way to test if the prog is running as an Applet or Application?

It asks for calibration now, if it sees it will go haywire :slight_smile: If you still have a ‘stuck’ key, you probably need to disconnect any controller (except the keyboard and mouse of course).

That fixed it :slight_smile:

Applet version worked here… with sounds!
Win7 64-bit.

Cool. I’m just trying to get webstart to work. Lode Runner Retro Webstart
Seems to work for Windows (32). Not sure about Linux though, could someone test? For some reason I can’t get it to work, but don’t get an error… (it seems to download native_windows.jar?)
Update: Wine had associated itself with webstart :slight_smile: Aarrrggghhh

Worked fine on win7 64-bit.
Although there were no problems, I think full-screen for testing these small games are a bit scary. I’d much rather go with windowed so if anything screws up, I have control of stuff. :slight_smile:

I used jar but it works now by using batch file. Can’t get pass lv2 though :smiley: btw nice game!

Level 2 :slight_smile: Those are learning levels. The first difficult one should be level 6.