Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (524)
Games in Android Showcase (127)
games submitted by our members
Games in WIP (592)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  JavaFX media - yea or nay?  (Read 569 times)
0 Members and 1 Guest are viewing this topic.
Offline Taisch

Junior Newbie





« Posted 2013-10-14 16:37:39 »

Hi,

I've just started out with java and coding games in java. I made a simple minded little game and wanted to have some background music for it. I originally thought to use an mp3 for it. But no mp3 support in the java sound api... but it seems in java 7, javafx is included.  I don't really want to deal with javafx, but the Media and Mediaplayer part of it did exactly what I wanted (load mp3, play mp3, allow volume control and mute, all very simple to use). It seemed to have good speed, and didn't try to decompress the whole file at once or anything, etc.

However, when I tried to send the game to other people to test, I found that 2/3 of them didn't have Java 7 installed on their desktops.

Should I continue using the JavaFX bits and hope for the best? (everyone will update? Maybe?) Or try using some other library? (I did bash my head for awhile with javazoom... got jlayer player to work, but not basicplayer. Downloaded some of the suggested libraries from here but have only tried tinysound so far.).

Thanks.

Offline Mac70
« Reply #1 - Posted 2013-10-14 18:24:08 »

In my opinion Swing+Java2d/JavaFX are more suited for programs rather than games - you can do prototyping or tools using them, but I wouldn't write games in them - use LWJGL or LibGDX instead. Smiley

Check out my Devblog! Smiley
Offline gouessej
« Reply #2 - Posted 2013-10-14 18:46:45 »

I agree with Mac70. I don't find JavaFX really suited for games, its 3D API has some of the same design flaw than Java3D 1.5 (no more in 1.6), its memory footprint is higher than Swing and it is less reliable too. I advise you to use other libraries, the "hard" way with the sets of low level bindings like JogAmp (JOGL, JOAL and JOCL) or high level libraries (LibGDX, JMonkeyEngine, Ardor3D, Paul Lamb's Sound Library, ...). Why not using Ogg instead of MP3?

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Taisch

Junior Newbie





« Reply #3 - Posted 2013-10-14 19:31:53 »

Thanks for the replies.  Smiley Yeah, I didn't really like the look of JavaFX, though I do like Swing. Swing seems to do what it does very elegantly and robustly. Which isn't gaming, but ah well. (I did find that out by about my second learning-experience game, when I realized I would have to code everything more directly myself.)

I have nothing against ogg. I naively thought mp3 would be more widely supported. I probably will end up using Ogg if I don't go with the JavaFX media. I downloaded Paul Lamb's sound library yesterday. I'll try to figure it out later.

I'm going to do another newbie project first, then tackle LWJGL and 3D. If I ever do. 3D makes me dizzy.  Undecided
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

toopeicgaming1999 (64 views)
2014-11-26 15:22:04

toopeicgaming1999 (57 views)
2014-11-26 15:20:36

toopeicgaming1999 (10 views)
2014-11-26 15:20:08

SHC (24 views)
2014-11-25 12:00:59

SHC (24 views)
2014-11-25 11:53:45

Norakomi (28 views)
2014-11-25 11:26:43

Gibbo3771 (24 views)
2014-11-24 19:59:16

trollwarrior1 (37 views)
2014-11-22 12:13:56

xFryIx (76 views)
2014-11-13 12:34:49

digdugdiggy (52 views)
2014-11-12 21:11:50
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!