Is there anyone here who has done bar charts or other statistics representations? Preferably in combination with Lemur.
I need to show progress of the evolving little guys in my game Unga Munga over time. Stuf like: how many survive? How many attack others? How many use tools?
I also want to give the player some insight in the ‘character’ of a selected guy. This could be a pie chart showing the percentages in which it choose to run, fight or push rocks.
For me, I know Java2D very well and would be tempted to use it here. It’s pretty trivial to get a java.awt.Graphics object from a BufferedImage and then you have the full capabilities of Java2D. …then just convert that to a texture.
A perhaps slightly more light-weight option would be to paint to a JME ImageRaster but then you lack all of the Java2D features.
If the thought of sending new texture data every time you update is distasteful (though it’s really not a big deal) or if you really have your heart set on real geometry then things get more complicated. Bar charts are straight forward. Anything more complicated involves different tricks.
To follow on pspeed’s idea, JFreeChart or similar chart library. At least the jFreeChart is even by default a BufferedImage at the end. You can even hook a custom graphic builder there to translate the charts directly to jME for creating (scalable) graphics instead going through BufferedImage first for raster textures.
Only when you are trying to show it (whether you chose to draw it directly as quads etc or otherwise attaching it to the scene graph) you need to use the render thread. But for that you have the Application.enqueue(). Other than that, you can design it to run in as many threads as you want. With the limitation of what i.e. JFreeChart supports then.