Pro Java 9 Games Development Leveraging the JavaFX APIs

(Michael S) #1
Chapter 15 ■ 3D Gameplay UI CreatIon: UsInG the sphere prImItIve to Create a UI noDe

Once you have done all four letters once, you can use the same right-click on a layer and use the
Duplicate Layer work process to replicate these letters; then use your Move tool to position the letters on
the other four stripes, as shown on the right in Figure 15-6.


To use the GIMP Move tool, first click the text element, which will show the Move tool what you want to
move, and then use the right arrow key to position the letter over the next stripe. Using the right arrow key
instead of dragging the letter with the mouse will keep the letter at exactly the same pixel height location,
keeping the letters in perfect alignment with each other.
As you will see in Figure 15-6, this work process will yield a uniform, professional map result. Although
your letters seem cramped on the GIMP canvas, when mapped onto the curvature of a Sphere primitive, the
result is quite readable, even while being animated, because the curvature of the surface seems to “stretch”
these letters farther apart.
Once you are satisfied with the spinner texture map, use the File ➤ Export As menu sequence, and save
your gameboardspin.png file to your C:/Users/Name/Documents/NetBeansProjects/JavaFXGame/src/
folder, as shown in Figure 15-7. Notice that our boardgamesquare PNG24 files are well optimized, at 680
bytes, and our boardgamequad files are only 10KB each. If you click a file name, you will get a good preview
of the texture map on the right side of the dialog. This is a great feature, especially for similar file names,
because you can click any file name to preview it and GIMP will put that file name in the Name field; then
you can just change the number at the end as a typing shortcut!


Figure 15-6. Replicate the four SPIN letters twice in the center of each of the eight stripes, at exactly the same
height

Free download pdf