Pro Java 9 Games Development Leveraging the JavaFX APIs

(Michael S) #1
Chapter 18 ■ 3D Gameplay DesiGn: CreatinG your Game Content usinG Gimp anD Java

Paste this image data under the Steel Hoop layer and rotate the Clipboard layer 45 degrees, as shown in
Figure 18-22.


Next, use the File ➤ Export As work process and save your second gameboardquadrant1bird0.png
file (as I have decided to start numbering these at zero to match up with the random number generator
output).
Let’s preview the second game board square 1 and game board quadrant 1 textures by changing the
diffuse1 and diffuse21 Image object file name references using the following Java 9 code, as shown in
Figure 18-23:


diffuse1 = new Image("/gamesquare1bird0.png", 256, 256, true, true, true);
diffuse21 = new Image("/gamequad1bird0.png", 512, 512, true, true, true);


Figure 18-22. Rotate the image layer 45 degrees after inverse-selecting and deleting corners protruding from
the hoop

Free download pdf