Space Invaders Tutorial Problems

Started by Brimstone7, March 12, 2006, 19:18:40

Previous topic - Next topic

Brimstone7

I'm trying to learn lwjgl and the Space Invaders tutorial looked like a good start.  I'm pretty sure I have everything up and running (framework only, no real game logic yet) but I've run into two problems.

First, I can't seem to load any textures.  The TextureLoader object complains that it can't find my image file.  If I create a File object with the same String I can verify that the File exists but when I try to create a URL out of the same String (as per the tutorial) the URL is always null so I can never load the texture.  What gives?

Also, I seem to be having a problem with a memory leak.  I didn't copy and paste all of the code from the tutorial (I pretty much transfered one method at a time so I could see what each was doing and also to get rid of support for the Java2D and JOGL branches) but I think my framework is very similar to the code in the tutorial.  Java's memory usage seems to jump up about 20MB everytime I run the program and this is never released, even when the program ends.  Could this be a NetBeans problem, instead (I'm using the latest NetBeans 5.0 release)?

Thanks in advance!

Quick Edit: I think the memory leak problem might only happen when I run my project in fullscreen mode via Display.setFullscreen(true).