Which gui "engine" should I use?

I’m looking to implement a menu systems for a 3rd person game which I intend to feel very similar to an MMO like WoW’s of Everquest’s.

  1. Should I look to fengui, nifty, or TWL for this task?
  2. If so, which of those might work best and a quick “why” would be much appreciated?

Nifty, its the only gui library supported by the core team and the others you mentioned have no proper implementations for jME3…

Where can I get the 1.3 nightly build of Nifty? I’d like to try the screen builder classes but can’t find that jar.

It wont work with the jme3 renderer anyway. You will have to use the version that comes with jme3 and wait until that one is updated (after nifty 1.3 is released).

Ok, thanks normen. I’m gonna go tinker with it, after I add music in.

when I tried to use a 3 MB ogg track. ARGH

[java]SEVERE: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]

java.lang.OutOfMemoryError: Java heap space

at java.util.Arrays.copyOf(Arrays.java:2786)

at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:94)

at com.jme3.audio.plugins.OGGLoader.readToBuffer(OGGLoader.java:119)

at com.jme3.audio.plugins.OGGLoader.load(OGGLoader.java:169)

at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:233)

at com.jme3.audio.AudioNode.(AudioNode.java:89)

at mygame.DungeonDigger.setupMusic(DungeonDigger.java:307)

at mygame.DungeonDigger.simpleInitApp(DungeonDigger.java:122)

at com.jme3.app.SimpleBulletApplication.initialize(SimpleBulletApplication.java:261)

at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:134)

at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:183)

at java.lang.Thread.run(Thread.java:619)[/java]

Welcome to the world of java!xD

That’s one of the saddest errors in java history! You use Windows right? xD

try to allocate more memory to the VM.

I you use JMP go to Run/Set Project Configuration/Customize, in the VM text fields there must be a line with “-Xms40m -Xmx40m”

This means your VM start with 40mb of memory and can extends to …40. (it seems to be net beans default config)

try to change those values, for example “-Xms40m -Xmx80m”

@nehon that did the trick however! I had to set it to 305 in order to make it not crash. Is that normal when all I added was an mp3 converted to an ogg, that’s 3mb? I feel like I did something sloppy.

To be honest i don’t know how ogg are managed in memory. It seems strange indeed.

how do you load your file?

Here’s all my audio code;


[java]AudioNode audio_background;[/java]


[java]audio_background = new AudioNode(assetManager, “Sounds/requiem.ogg”, false);





audioRenderer.playSource(audio_background); // play continuously[/java]


[java]audio_background = new AudioNode(assetManager, “Sounds/requiem.ogg”, true);[/java]



@normen Well damn normen, why don’t you just fix every problem I have! I’m nicknaming you “The Resource”. kudoses infinite to you.

Yeah if you specify a 3 MB song in buffered mode it won’t be well :stuck_out_tongue:

It will decompress the entire OGG file which could take 40 MB in memory.

In stream mode, the sound is decompressed as needed so it is better for long, one-time sounds.

Thx, normen and Momoko_Fan! I learned something new :slight_smile:

DarkPhoenixX said:
Thx, normen and Momoko_Fan! I learned something new :)

Likewise. Now I know and knowing is half the battle.