Some questions...

I think there is going to be room for several of these kinds of frameworks, just like there are about a billion Java web frameworks.

That said, JavaFX doesn’t suck. (The demos could be better, though, you’re right.) I tell people interested in PulpCore, if they want to use Swing, use JavaFX or Project SceneGraph instead. PulpCore can’t compete with all the Swing components.

[quote]Pulpcore may need to update its comparison soon
[/quote]
It’s probably already out of date :wink:

I am excited about the JavaFX video component, especially if it’s software-rendered. Hopefully it will work with Project SceneGraph, too.

Puppygames will of course be extra glad to write JavaFX game demos for appropriate remuneration :slight_smile:

Cas :slight_smile:

it should exist a place with a nice javafx applet, where it is ??

I think that has not been made clear enough so far, even if most of us sort of assumed it; that will make people a lot more likely to give it a shot.

FWIW, having just taken a first look at the syntax, I don’t see the scripting language as all that bad, personally, though I’ve done a bit more AS3 than maybe some here (the AS3 influence is clear, and I’m not sure if that’s a good thing - it might be seen as little more than a late clone of the language with some odd alterations). I’m particularly happy to see that some of Java’s most glaring omissions (first class functions, object literals, and Python-ish array slicing to name the first few I noticed) are in there. Since I haven’t actually used the thing yet I’m not sure if there’s anything important missing, but at least at a first glance I can say that I’m willing to give it a fair shot - there’s a decent amount of stuff in there that makes the language more powerful than Java. It’s not quite Scala (ah, Scala…), but it’s a step in the right direction, IMO.

Which makes sense, if you think about it - Java (the language) is optimized for huge teams so that a few bad programmers don’t have the ability to do much damage to others thanks to the requirements of Java’s syntax. Since applet projects are usually much smaller in scope, this is much less of a concern, so a bit of safety can be sacrificed in the name of productivity.

It works to a point… but we won’t be doing it again - we just can’t keep doing unpaid work.

Cas :slight_smile:

I cannot believe that you guys are still seriously entertaining the idea of writing game code against the JavaFX API. I feel that you’re all just being polite out of respect for the amount of work that has gone into it rather than letting rip and letting the JavaFX team know that JavaFX is totally unsuitable for games writing. JavaFX is an application API, not a games API.

As Ant has pointed out, you can mix Java code with the JavaFX script and if, as David seems to think, JavaFX does not suck for games writing, then he can translate all of his Pulpcore examples (including Milpa) into JavaFX and discontinue Pulpcore from that day forth. But I’ll bet every cent of Google Adsense money that Milpa generates over the next five years that nobody writes one single playable, revenue generating game using JavaFX. JavaFX is in no way suitable for writing casual, web-based games. Period. You all know this but you’re just being to damned polite!

Oh, and might I point out that allowing people to tear an Applet off a web page onto the desktop is a really bad idea for those of you that make money from content-based advertising, such as Google Adsense. If you do write a good, reasonably addictive game then the first thing everyone will do is tear it off the web page and stuff it onto their desktop to avoid opening the browser whenever they want to play the game.

Lastly, I want to talk about JavaFX performance. On second thoughts no I don’t because I have completely had enough of entertaining the idea that JavaFX is useful for games writers.

–Mario

To be honest… it probably won’t be useful to game writers for several years. Before it is useful it has to become extremely widespread. Right now it’s 3rd in line, behind Silverlight and Flash. When it gets there… some people somewhere will make a game in it, of some sort. But right now it’s “tinkering” time.

Cas :slight_smile:

[quote]JavaFX is in no way suitable for writing casual, web-based games. Period. You all know this but you’re just being to damned polite!
[/quote]
lol, there are also some bad feedbacks too

for now, It may be usefull for little animation or gui

I notice that there is a little javafx animation when launching wurm online, unfortunatly it throw an exception on my computer (nor really annoying as it doesn’t stop or crash anything)…

NB: can’t you make in game advertising in java with any ad provider using showdocument(“http://your-adprovider-serveur/uri-provider.php?id=your-adpublisher-id”), nop ?

I know you can call some Java methods in JavaFX source code but is it possible to use some JavaFX components directly inside a Java source code? I would like to use some JavaFX components in my menus but I don’t want to write a .fx file with this strange language. I know it is possible to use some classes of JMC (JMediaPlayer for example) in a Java program. Is it possible to import JavaFX classes and use them as any Java classes?

well i think you can make games in javafx 1.0, simple and even alittle more crazy (see moontank for one, multiplayer 3d javafx 1.0 game at javaone); its a case of having an idea and just doing it. i don’t tend to roll with people that are just haters before something has even shipped, thats being a bit closed minded tbh. cheer up mgianota you havn’t seen how bad it really is yet :wink:

I’ve just seen the hardware accelerated demos of JavaFX and have changed my mind about using it for games writing.

–Mario

Ok it is possible to write a game from scratch in JavaFX… but when your Java source code counts hundreds of thousands lines, you don’t want to rewrite everything only to use some graphic components of JavaFX. Is it possible to use an ImageView in a Java AWT Frame? For example, can I write something like this below?

import javafx.scene.image.ImageView;

public class Test{

        public static void main(String[] args){
                ImageView iv=new ImageView();
                //.....
        }


}

For Java Webstart, it seems not complicated:

<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" codebase="http://javafx.com/releases/preview1/demos/SwirlingSquares" href="launch.jnlp">
    <information>
        <title>Swirly Squares</title>
        <vendor>Sun Microsystems</vendor>
        <description>JavaFX Demo showing squares swirling around with a shaped window.</description>
        <description kind="short">Swirly Squares</description>
        <homepage href=""/>
        <offline-allowed/>
    </information>
    <security>
        <all-permissions/>
    </security>
    <resources>
        <property name="jnlp.packEnabled" value="true"/>
        <j2se version="1.6+"/>
        <jar href="BlogDemo.jar" main="true" download="eager"/>
        <jar href="lib/Scenario.jar" download="eager"/>
        <jar href="lib/javafx-swing.jar" download="eager"/>
        <jar href="lib/javafxgui.jar" download="eager"/>
        <jar href="lib/javafxrt.jar" download="eager"/>
    </resources>
    <application-desc main-class="blogdemo.Main">
    </application-desc>
</jnlp>

I’ve changed my mind again on using JavaFX for games writing. All I want are the media components --I’d do the rest in Swing and Java2D. I’ll have to investigate the JavaFX JAR files and decompile the media player to see how its done. The rest of the API isn’t really that useful. Let’s face it, most of the rest of the API comes down to 2d/3d matrice transformations on shapes and some shading with a few lighting effects thrown in.

@aNt: I’m too busy to get miserable. I have a ton of content to organise from an artist chappy (the kind that thinks he can write software because he’s written a Flash action script) into an interactive database thingy. I also have two freelancer programmers that are pouring cold water all over the JavaFX scripting language and giving me a headache (“the script just sucks, because it just does! Why can’t I use Java2D’s affine transforms?”) to the point where I wish I had never suggested implementing the damned thing in JavaFX in the first place. So we’re using Swing/Java2D as a front end to the database. Why? Because we don’t have to use a scripting language that has a syntax straight out of an MIT post-grad thesis from 1995 to drive the JavaFX components. I’m sorry you believe I’m some kind of technology hater (I’m not, I love technology) but from an OO programming perspective the scripting language is a really bad design choice. It also looks suspiciously like it has been bolted onto the framework, rather than designed with the framework from the outset. Sorry aNt, but I have got zero time and patience for mashed-up software.

Yeah, it is possible to write games using the script --just about…, but I bet nobody writes any … they all use LWJGL, or Java2D and for a good reason. The problem, as far as I can see, with JavaFX script is that it seems to permit you using regular Java classes from within a script but there seems to be no intuitively obvious way to do things the other way around, i.e, incorporating the JavaFX API into a Java application. A shame really, 'cos I can think of a ton of ways to use the media player. Also, I think too much emphasis has been placed on the script and it is immediately off-putting to programmers that are used to working with Swing and Java2D; there’s a lot more to working with Swing and Java2D than just setting attributes and handling events which is all that the script seems designed to do.

–Mario

Mario i agree; and i’ll ask chris about the java to javafx thing.

aNt if you remember when you talk to Chris, ask about the possibility of a set of Java docs for the JavaFX classes. There’s got to be a stack of people interested in incorporating the media player into database applications (as well as games), but they’ll want to do it in Java not in script.

–Mario

well you can call javafx from java using reflection api’s, i tried it today seemed a bit wild but does work, something like:

– java

import javafx.reflect.*;

FXLocal.Context context = FXLocal.getContext();
FXClassType clazz = context.findClass(“test.MyFXTest”);
FXValue[] args = new FXValue[1];
args[0] = context.mirrorOf(“super”);
FXFunctionMember func = clazz.getFunction(“helloKen”, context.getStringType());
func.invoke(null, args);

– javafx

function helloKen(s: String) {

}

jmc is also a java api :slight_smile:

This might help:
http://openjfx.java.sun.com/current-build/doc/api/