Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JavaFx 2.0 Game Engines/Frameworks -- How will JavaFx 2.0 change Java gaming?

I realize JavaFx 2.0 has only been out for a short time but was hoping someone is aware of an FX 2.0 game engine ( or even such a project in open source development )? I've been unable to find one- so if you do please point me in the right direction.

I'm also wondering how JavaFX2.0 will change java game programming. From what I've read and the small experiments I've made I can definitely say it is much more pleasant to code in. And I believe it runs on a faster hardware accelerated graphics engine than regular Java swing or awt based stuff. But is it complete enough to support an entire game framework of any complexity?

like image 448
Marc H Avatar asked Feb 13 '12 05:02

Marc H


People also ask

Is JavaFX good for game development?

JavaFX Game is more reliable, fast and light weight standalone application than Swing, Applet and AWT. Games can be done by animation packages in JavaFX. JavaFX provides rich GUI for gaming applications.

Does libGDX use JavaFX?

libGDX is not compatible (I think) with JavaFX, create all the app in LibGDX, is a good deal. Unfortunately at this time you may be right. I tried to get libGDX working in a JavaFX application (as a Swing component) to no avail. After manually copying liblwjgl.


2 Answers

JavaFX is great for simple browser based / 2D games - the kind of areas where Flash is currently most common. Reasons:

  • Great performance for 2D apps (good use of hardware acceleration under the hood)
  • Very easy to skin with CSS - web designers will love this
  • The new JavaFX 2.0 API is very usable from pure Java (or other JVM languages like Scala, Clojure)
  • Cross platform, so can reach the largest possible audience

It's unlikely to be suitable for complex / high performance 3D games where you will need a proper OpenGL game engine like jMonkeyEngine.

I think the jury is still out with respect to the games in the middle ground (shoot-em-ups, 3rd person view RPGs, RTS games etc.). These games don't necessarily need a full 3D engine but do need good, smooth graphics performance. I suspect JavaFX would be fine for these on modern hardware, but I'd strongly suggest doing a quick prototype just to check the performance meets your requirements.

like image 51
mikera Avatar answered Sep 21 '22 10:09

mikera


javaFx is not much more than a GUI toolkit like Swing, but with some extras. It is already possible to render a proper game engine into a javafx node. Here is a dome showing this.

http://www.java-gaming.org/topics/lwjgl-javafx-integration/27801/view.html.

But this does not solve the problem to lock the mouse for first person like games.

like image 36
Arne Avatar answered Sep 21 '22 10:09

Arne