1
\$\begingroup\$

I am in the process of developing a 2D tile-based RPG with Eclipse, LWJGL, and Slick utilities.

For some reason eclipse seems to be lagging heavily which doesn't make sense as all I have rendering is a 64x64 test map using 16x16 tiles, the character, and text when i press enter.

To see if it is a problem with my code or with eclipse, I am trying to export it into a jar or exe and run it outside of eclipse.

Since I use png spritesheets and xml files to supply coordinates and map data, I need to also include a resource folder.

I've tried exporting from Eclipse as a jar, then adding that jar, the Slick jar, and LWJGL jar into JarSplice, but it says error opening zip file, which I assume is that the resource folder is zipped when Eclipse creates a jar.

I need to know how to get the jar to run, and where I need to place the resource folder, and if I need to change any code to be able to access the resource folder. I think I saw something about the appdata folder being where you place such things, but I do not know how to use it.

P.S My code uses 3 spritesheets (Tiles, Character, Text), 4+ xml files (one for each spritesheet + one for each map), and uses Immediate mode rendering, so if the problem is that immediate mode isn't fast enough, should I go up all the way to VBO's, or would display lists suffice?

EDIT: I normally wouldn't think it was Eclipse, however Eclipse itself seems very slow lately.

Sometimes when I run my code, it works without lagging at all, and others it seems as if the frame-rate is less than 10.

Also sometimes basic functions in my code decide not to work. For instance, I implemented a way so when the enter key is down three lines of text appear, sometimes when I run, they show up sometimes they don't.

Another instance (I run in fullscreen mode) is that sometimes when I hit run, my view will size up to fullscreen, but it still just shows Eclipse, and I have to take my battery out to exit.

\$\endgroup\$
  • \$\begingroup\$ I would look into VisualVM and profile your code. I doubt its eclipse that is causing the lag. \$\endgroup\$ – mobo Aug 26 '13 at 0:43
  • \$\begingroup\$ I normally wouldnt think it was eclipse, however eclipse itself seems very slow lately, and sometimes when i run my code, it works fine and others it doesn't. For instance i implemented a way so when the kkey enter i down three lines of text appear, sometimes when i run, they show up sometimes they don't. Another instance ( I run in fullscreen mode ) is that sometimes when i hit run, my view will size up to fulscreen, but it still just shows eclipse, and i have to take my battery out to exit. I will look into VisualVM though, thank you. \$\endgroup\$ – Ben Marshall Aug 26 '13 at 0:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.