Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (539)
Games in Android Showcase (132)
games submitted by our members
Games in WIP (603)
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 1.2 is out  (Read 8984 times)
0 Members and 1 Guest are viewing this topic.
Offline zammbi

JGO Coder


Medals: 4



« Posted 2009-06-03 05:04:11 »

Looks like 1.2 is out.

http://javafx.com/docs/articles/javafx1-2.jsp

Going to test it now...

I see they now have Linux and Solaris support.

Current project - Rename and Sort
Offline kappa
« League of Dukes »

JGO Kernel


Medals: 81
Projects: 15


★★★★★


« Reply #1 - Posted 2009-06-03 08:01:36 »

Looks like a nice improvement from 1.1, still not there yet for me, but javafx development has a great side effect of improving client side java things such as applets and jws, which is only good for java gaming Smiley

Guess Sun are keeping up with their tradition of messing up the versioning with 1.2 (why not just call it 2.0?), once they reach 1.5 they'll be like oh wait the version isn't increasing fast enough lets call it 5.0 Smiley. A quick look at Flex and Silverlight versioning their on versions 4.0 and 3.0.
Offline zammbi

JGO Coder


Medals: 4



« Reply #2 - Posted 2009-06-03 09:38:12 »

Quote
Guess Sun are keeping up with their tradition of messing up the versioning with 1.2 (why not just call it 2.0?)
Well I don't think its a 2.0, they are releasing them quite fast enough.

But Its quite funny of the current Java versions. What will people call it when it gets to 2.0 heh...

Seems JavaFx has had some nice improvements. Just gota get around the new bugs heh.

Current project - Rename and Sort
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline brackeen

Junior Devvie





« Reply #3 - Posted 2009-06-03 16:32:36 »

It's getting better. They added a fullsceeen option for applets, which is cool. Also supposedly the speed problems have ben fixed (haven't tested it though).

Still has problems on Mac, though. The video example hosed my browser, and the Snakes & Ladders applet wouldn't load. Still seeing security popups too.
Offline Jackal von ÖRF

Junior Devvie





« Reply #4 - Posted 2009-06-03 16:49:41 »

But Its quite funny of the current Java versions. What will people call it when it gets to 2.0 heh...

Scala?  Roll Eyes

Offline zammbi

JGO Coder


Medals: 4



« Reply #5 - Posted 2009-06-04 00:07:53 »

Performance seems to be good now. My game seems to run ok.
Just a few annoying bugs have poped up, which I need to somehow get around.

Current project - Rename and Sort
Offline trembovetski

Senior Devvie




If only I knew what I'm talking about!


« Reply #6 - Posted 2009-06-04 06:55:01 »

Could you mention those bugs (platform/config?), or file them at http://javafx-jira.kenai.com?

Dmitri
Offline zammbi

JGO Coder


Medals: 4



« Reply #7 - Posted 2009-06-04 09:08:11 »

Well I haven't had time to make test cases so I'll just post them here and someone can see if its a common bug.

Windows 7.
Java 6 update 13.

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
def mediaToPlay:Media = Media{
        source:"{__DIR__}music/Rite.mp3";
    }
def player : MediaPlayer = MediaPlayer{
    media: bind mediaToPlay
    autoPlay: false;
    repeatCount: 1;
    volume: 80;
    onEndOfMedia:function() {
        //player.onEndOfMedia
        if(songNumber == 0){

            mediaToPlay.source="{__DIR__}music/Alutia.mp3";
        }else if(songNumber == 1){
            mediaToPlay.source="{__DIR__}music/Sapphire.mp3";
        }else if(songNumber == 2){
            mediaToPlay.source="{__DIR__}music/Rite.mp3";
            songNumber = 0;
        }
        songNumber++;
       //player.currentTime=0s;
        player.play();
    };
}

I can't change songs like I could in 1.1.
Gives this error:
Quote
Exception in thread "AWT-EventQueue-0" com.sun.media.jmc.OperationUnsupportedException: Media player peer cannot set media time to given time:62.209285905
        at com.sun.media.jmcimpl.plugins.javapeer.MediaPlayer.setMediaTime(MediaPlayer.java:741)
        at com.sun.media.jmcimpl.plugins.javapeer.MediaPlayer.start(MediaPlayer.java:618)
        at com.sun.media.jmc.MediaProvider.play(MediaProvider.java:640)
        at javafx.scene.media.MediaPlayer.play(MediaPlayer.fx:212)
        at microbotwars.RenderWindow$3.lambda(RenderWindow.fx:121)
        at microbotwars.RenderWindow$3.lambda(RenderWindow.fx:121)
If I uncomment out the line "player.currentTime=0s;" it doesn't change songs.

Other changes I done to fix the music, just crashes the app (Ill post it when I get it again) or freezes the app(the song still plays) and need to force close.


1  
2  
3  
4  
5  
6  
7  
8  
9  
def images:Node[] = [FXDLoader.load("{__DIR__}Images/bot.fxz")];
Group{
            content:[Duplicator.duplicate(images[0])]
            effect:ColorAdjust {
                    brightness: 0.0
                    contrast: 1.0
                    hue: 0.0
                    saturation: 0.5
                }


Added colorAdjust crashes the VM. The crash log is attached below.

Been having major problems with my map tiles as Nodes(I'll see if I can repeat my weird problems again).

I changed a lot to get rid of some of the problems I been getting, I'll post more if I can get them again.

Edit: 

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
def player : MediaPlayer = MediaPlayer{
    media:bind mediaToPlay
    autoPlay: false;
    repeatCount: 1;
    volume: 80;
    onEndOfMedia:function() {
        //.onEndOfMedia
        if(songNumber == 0){
            player.media = Media{
                source:"{__DIR__}music/Alutia.mp3";
            }
            songNumber++;
        }else if(songNumber == 1){
                        player.media= Media{
                source:"{__DIR__}music/Sapphire.mp3";
            }
            songNumber++;
        }else if(songNumber == 2){
                        player.media= Media{
                source:"{__DIR__}music/Rite.mp3";
            }
            songNumber = 0;
        }
       
        player.currentTime=0s;
        player.play();
    };


This spams error messages.
Quote
Exception in trigger:
java.lang.NullPointerException
        at com.sun.media.jmcimpl.plugins.javapeer.MediaPlayer.setMediaTime(MediaPlayer.java:735)
        at com.sun.media.jmc.MediaProvider.setMediaTime(MediaProvider.java:675)
        at javafx.scene.media.MediaPlayer$_SBECL.onChange(MediaPlayer.fx:335)
        at com.sun.javafx.runtime.location.ObjectVariable.notifyListeners(ObjectVariable.java:142)
        at com.sun.javafx.runtime.location.ObjectVariable.replaceValue(ObjectVariable.java:104)
        at com.sun.javafx.runtime.location.ObjectVariable.set(ObjectVariable.java:115)
        at javafx.scene.media.MediaPlayer.set$currentTime(MediaPlayer.fx:333)
        at microbotwars.RenderWindow$3.lambda(RenderWindow.fx:130)
        at microbotwars.RenderWindow$3.lambda(RenderWindow.fx:130)
        at microbotwars.RenderWindow$3.invoke(RenderWindow.fx:108)
        at microbotwars.RenderWindow$3.invoke(RenderWindow.fx:108)
        at microbotwars.RenderWindow$3.invoke(RenderWindow.fx:108)
        at microbotwars.RenderWindow$3.invoke(RenderWindow.fx:108)
        at com.sun.javafx.runtime.Entry$2.run(Entry.java:105)
        at java.awt.event.InvocationEvent.dispatch(Unknown Source)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)
.....
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
        at com.sun.media.jmcimpl.plugins.javapeer.MediaPlayer.getMediaTime(MediaPlayer.java:779)
        at com.sun.media.jmc.MediaProvider.getMediaTime(MediaProvider.java:686)
        at javafx.scene.media.MediaPlayer.updateTime(MediaPlayer.fx:352)
        at javafx.scene.media.MediaPlayer$_MediaTimerTaskCallback$1.invoke(MediaPlayer.fx:655)
        at javafx.scene.media.MediaPlayer$_MediaTimerTaskCallback$1.invoke(MediaPlayer.fx:655)
        at com.sun.javafx.runtime.Entry$2.run(Entry.java:105)
        at java.awt.event.InvocationEvent.dispatch(Unknown Source)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)


Current project - Rename and Sort
Offline trembovetski

Senior Devvie




If only I knew what I'm talking about!


« Reply #8 - Posted 2009-06-05 06:06:30 »

Thanks, I'll forward your feedback to the media team. I think they had a work around for the setMediaTime exceptions.

One thing I want to point right away - don't set new url to the media, instead create a new Media and set it to the player.
If you plan to play few media files, create Media instances for all of them, dont' re-create them every time you want to play a clip.

Dmitri
Offline trembovetski

Senior Devvie




If only I knew what I'm talking about!


« Reply #9 - Posted 2009-06-05 06:16:18 »

Regarding color adjust crash: does that happen with any node, or only with particular fxz?
Could you send me the fxz if it's the latter? Or attach it to the bug report:
  http://javafx-jira.kenai.com/browse/RT-4898

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

JGO Coder


Medals: 4



« Reply #10 - Posted 2009-06-05 06:25:52 »

Ok thanks for the suggestion, I'll do that.

Do you know much about the node side of things?
I'm trying to add fxz art for tiles on my game: http://www.java-gaming.org/topics/micro-bot-wars-javafx/20547/view.html
Currently I'm using groups and cloning the nodes which is fine for the amount of tiles.
But when I use fxz for my tiles the ram shoots from 70 megs to over 350. Is it possible for node to share there image data? All these tiles are the same, it shouldn't be that much ram? should it?
If there's no way, then I guess I'll leave them as basic squares.

Quote
Regarding color adjust crash: does that happen with any node, or only with particular fxz?
I'll give it a try.
Quote
Could you send me the fxz if it's the latter? Or attach it to the bug report:
If its only that fxz I'll post it up there.

Current project - Rename and Sort
Offline trembovetski

Senior Devvie




If only I knew what I'm talking about!


« Reply #11 - Posted 2009-06-05 06:42:17 »

Ok thanks for the suggestion, I'll do that.

Do you know much about the node side of things?
I'm trying to add fxz art for tiles on my game: http://www.java-gaming.org/topics/micro-bot-wars-javafx/20547/view.html

I know a lot about nodes, but not much about the Production Suite (the stuff that produces, loads and reconstructs the fxz/d files).

FYI, there's some sort of misconfiguration with your jar file - it doesn't contain Main. Have you recompiled it with javafx1.2 packager?

Quote
Currently I'm using groups and cloning the nodes which is fine for the amount of tiles.
But when I use fxz for my tiles the ram shoots from 70 megs to over 350. Is it possible for node to share there image data? All these tiles are the same, it shouldn't be that much ram? should it?

If you're using the cloning I think it may be duplicating the data although it still shouldn't be that much of a problem - your fxzs are relatively small (and they aren't represented as images when loaded by the runtime, they're vector graphics).

I'll point the Production Suite folks at this post. We're still busy with J1 though.

Quote
If there's no way, then I guess I'll leave them as basic squares.
I'll give it a try.If its only that fxz I'll post it up there.

Offline zammbi

JGO Coder


Medals: 4



« Reply #12 - Posted 2009-06-05 06:48:16 »

Quote
FYI, there's some sort of misconfiguration with your jar file - it doesn't contain Main. Have you recompiled it with javafx1.2 packager?
No, I'm using 1.1 still in that release. I am working on a new update with JavaFX 1.2.
I might just do a small update soon so its 1.2.

Quote
If you're using the cloning I think it may be duplicating the data although it still shouldn't be that much of a problem - your fxzs are relatively small (and they aren't represented as images when loaded by the runtime, they're vector graphics).
The file size range from 1 - 4kb
My grid is about 35x50, the tiles are 16x16 pixels in size.

Quote
I'll point the Production Suite folks at this post. We're still busy with J1 though.
Thanks.

Current project - Rename and Sort
Offline zammbi

JGO Coder


Medals: 4



« Reply #13 - Posted 2009-06-05 08:50:46 »

Quote
Regarding color adjust crash: does that happen with any node, or only with particular fxz?
Any fxz it seems.

Quote
FYI, there's some sort of misconfiguration with your jar file - it doesn't contain Main. Have you recompiled it with javafx1.2 packager?
Try the game now.

Quote
One thing I want to point right away - don't set new url to the media, instead create a new Media and set it to the player.
If you plan to play few media files, create Media instances for all of them, dont' re-create them every time you want to play a clip.

Still having the same problems  Undecided

Current project - Rename and Sort
Offline trembovetski

Senior Devvie




If only I knew what I'm talking about!


« Reply #14 - Posted 2009-06-05 18:42:34 »

Any fxz it seems.
Try the game now.

Still having the same problems  Undecided

This may be caused by a caching version mismatch. Could you please clear your java cache (in the Java control panel) and see if it helps?
Also, you may have a ~/.jnlp-applet directory (documentes and settings/username/.jnlp-applet),  make sure to remove it as well.

Dmitri
Offline zammbi

JGO Coder


Medals: 4



« Reply #15 - Posted 2009-06-06 03:47:54 »

This may be caused by a caching version mismatch. Could you please clear your java cache (in the Java control panel) and see if it helps?
Also, you may have a ~/.jnlp-applet directory (documentes and settings/username/.jnlp-applet),  make sure to remove it as well.

Dmitri


Done all that, still getting java.lang.NullPointerException spam error.

Current project - Rename and Sort
Offline trembovetski

Senior Devvie




If only I knew what I'm talking about!


« Reply #16 - Posted 2009-06-06 07:28:10 »

Done all that, still getting java.lang.NullPointerException spam error.

No, I was talking about the crash. Do you still have it?
Offline zammbi

JGO Coder


Medals: 4



« Reply #17 - Posted 2009-06-06 11:44:44 »

No, I was talking about the crash. Do you still have it?
Yep still get the crash.

Current project - Rename and Sort
Offline zammbi

JGO Coder


Medals: 4



« Reply #18 - Posted 2009-06-08 12:38:06 »

Just did more testing, seems nearly all effects cause this crash and it can be any node not just fxzs.

Current project - Rename and Sort
Offline trembovetski

Senior Devvie




If only I knew what I'm talking about!


« Reply #19 - Posted 2009-06-08 16:13:12 »

Just did more testing, seems nearly all effects cause this crash and it can be any node not just fxzs.

This definitely sounds like a deployment issue with version mismatch. Did you delete the ~/.jnlp* dir along with the Java cache? Remove the applet cache dir  manually, just to make sure.

Do you get the crash when running the demos from javafx.com? Try EffectsPlayground, for example:
  http://javafx.com/samples/EffectsPlayground/index.html

Dmitri
Offline zammbi

JGO Coder


Medals: 4



« Reply #20 - Posted 2009-06-09 12:40:27 »

This might be a netbeans problem hmm.
It only happens in standard execution. If I run it in a browser its fine. Also yes that demo also runs fine.
I cleared all my cache manually again...

Current project - Rename and Sort
Offline atomhamster

Senior Newbie





« Reply #21 - Posted 2009-06-11 08:44:25 »

I wonder if anyone is ever going to update Inkscape's export to .fx? Sun should simply put a developer on it and submit this to Inkscape, so there finally is a content "pipeline" once more.
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.

rwatson462 (33 views)
2014-12-15 09:26:44

Mr.CodeIt (23 views)
2014-12-14 19:50:38

BurntPizza (51 views)
2014-12-09 22:41:13

BurntPizza (84 views)
2014-12-08 04:46:31

JscottyBieshaar (45 views)
2014-12-05 12:39:02

SHC (59 views)
2014-12-03 16:27:13

CopyableCougar4 (60 views)
2014-11-29 21:32:03

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

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

toopeicgaming1999 (32 views)
2014-11-26 15:20:08
Resources for WIP games
by kpars
2014-12-18 10:26:14

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
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!