Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (581)
games submitted by our members
Games in WIP (500)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: 1 [2]
  ignore  |  Print  
  Some questions...  (Read 11970 times)
0 Members and 1 Guest are viewing this topic.
Offline aNt

Senior Member




AFK


« Reply #30 - Posted 2008-11-04 10:38:51 »

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
Offline mgianota

Senior Newbie





« Reply #31 - Posted 2008-11-04 12:00:03 »

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

--Mario
Offline gouessej

« In padded room »



TUER


« Reply #32 - Posted 2008-11-04 12:55:15 »

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

1  
2  
3  
4  
5  
6  
7  
8  
9  
public class Test{

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


}


For Java Webstart, it seems not complicated:

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


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

Senior Newbie





« Reply #33 - Posted 2008-11-04 14:52:19 »

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
Offline aNt

Senior Member




AFK


« Reply #34 - Posted 2008-11-06 00:56:56 »

Mario i agree; and i'll ask chris about the java to javafx thing.
Offline mgianota

Senior Newbie





« Reply #35 - Posted 2008-11-06 06:23:53 »

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
Offline aNt

Senior Member




AFK


« Reply #36 - Posted 2008-11-07 00:04:31 »

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) {
...
}
Offline aNt

Senior Member




AFK


« Reply #37 - Posted 2008-11-07 00:05:16 »

jmc is also a java api Smiley
Offline gouessej

« In padded room »



TUER


« Reply #38 - Posted 2008-11-10 12:57:59 »

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

Pages: 1 [2]
  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.

xsi3rr4x (62 views)
2014-04-15 18:08:23

BurntPizza (60 views)
2014-04-15 03:46:01

UprightPath (73 views)
2014-04-14 17:39:50

UprightPath (56 views)
2014-04-14 17:35:47

Porlus (73 views)
2014-04-14 15:48:38

tom_mai78101 (99 views)
2014-04-10 04:04:31

BurntPizza (159 views)
2014-04-08 23:06:04

tom_mai78101 (254 views)
2014-04-05 13:34:39

trollwarrior1 (208 views)
2014-04-04 12:06:45

CJLetsGame (215 views)
2014-04-01 02:16:10
List of Learning Resources
by SHC
2014-04-18 03:17:39

List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30
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!