Im interested in working on JavaFX for the first time. I have a project i am working on, in which i dont have a lot of time to complete. I was wondering if javaFX would be a great platform to animate and make a 3x3 rubik's cube game? With all the mouse movements and rotations, Without having to work out alot of linear Algebra.
1 Answers
Jelinek provides public domain sample algorithms and source code for creating a Rubik's cube in Swing/AWT. You could start with that and try converting it to JavaFX, possibly using a Canvas as the drawing surface.
The 3D capabilities in JavaFX 2.2 are quite limited. There are some samples you could look at in the Ensemble application to give you an idea of what it is capable of. There is a tutorial on the Ensemble 3D xylophone which should help provide much of the basic knowledge required to build your application.
Java 8 will have a much more comprehensive 3D feature set. Such an application would likely be much easier to implement in Java 8 than the current JavaFX 2.2 release. Java 8 is not due for final release until September 2013, but you can download a preview version of Java 8. The preview version does not currently fully implement all of the planned 3D features for Java 8, but does implement significantly more than the JavaFX 2.2 release, especially around concepts like 3D transformations, normal calculations, vector logic, etc which would be required for the implementation.

- 150,031
- 14
- 366
- 406