Definitely supporting only the Ogg format would be the easiest route for me, but I don’t think that the Ogg format has much market penetration so my music player wouldn’t be all that usable for a lot of people. I rather doubt many gamers would be willing to convert their MP3s to Ogg just to play Carpe Diem, though it will support running in windowed mode so using their own music player isn’t out of the question either.
I should be able to, using JavaFX, detect if a format is supported or not so trying to play an MP3 when it’s not supported by the system shouldn’t cause a crash or anything. One option I thought of was to use JavaFX for MP3 playback and jME for Ogg playback, that way if JavaFX isn’t working properly on a system they can, at least, play Ogg.
Really it would be nice if the Ogg format had a larger market share, it is a great format. Unfortunately in todays market I find that often times it is not the fittest that survives.
Know what is funny about that? It basically is the same I do with vertex shaders, by just having a mesh with hight vertex count in the middle and moving it with the cam over the heightmap
(Probably with your approch faster on current systems however)
This morning I played with jME’s particle editor and wanted to achieve a nice looking fire effect by only using the editor tools. This is what I came up with. I personally think it looks nice enough for use in a game.
Check it out:
There is no source, this was created using the visual editor of jME.
I can zip up my resources if you would like it? The only source is the LightFlickerControl.java class.
Some pretty cool stuff posted in here lately. Love to see what everyone is coming up with.
If anyone is curious I did end up polishing off my music player for Carpe Diem:
It does indeed support MP3 which was surprisingly easy to include. If anyone is thinking about using JavaFX for audio playback in their jME projects the only thing you need to keep in mind, apparently, is that the JavaFX ‘toolkit’ needs to be enabled. Typically, through a JavaFX application, this is done when Application.launch() is called, but in jME that’s not necessary. You can just create:
new JFXPanel();
You don’t need to store it in a variable or anything, enabling the JavaFX toolkit is part of the JFXPanel constructor so once it’s created you can just leave it for the garbage collector. Once that is done you’re free to create and use an instance of MediaPlayer.
new MediaPlayer(new Media(new File("Path/To/Audio.mp3").toURI().toString());
That simple
P.S. I wanted a somewhat retro look for the information display in the player window so I ended up making my own digital font with Blender. I only included the 0-9 characters plus a colon since that’s all I plan on using it for. I’d be happy to hand out the .png and .fnt files if anyone wants it, it’s only in 24 point size.
Oh yeah, in the screen cap above that’s the drag and drop feature being shown. I didn’t use Nifty’s built in drag and drop functionality, I wrote my own. The dragged items are basically just a window like the other windows, but without a decoration.