JavaFX 1.2 is out

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.

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 :slight_smile:

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 :). A quick look at Flex and Silverlight versioning their on versions 4.0 and 3.0.

[quote]Guess Sun are keeping up with their tradition of messing up the versioning with 1.2 (why not just call it 2.0?)
[/quote]
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.

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.

Scala? ::slight_smile:

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.

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

Dmitri

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.


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)
[/quote]
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.

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:

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.

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

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

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/index.php/topic,20547.0.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?
[/quote]
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:
[/quote]
If its only that fxz I’ll post it up there.

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?

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.

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).
[/quote]
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.
[/quote]
Thanks.

[quote]Regarding color adjust crash: does that happen with any node, or only with particular fxz?
[/quote]
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?
[/quote]
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.
[/quote]
Still having the same problems :-\

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.

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

Yep still get the crash.

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