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


Next, let’s test this first game board square on the 3D game board by substituting the diffuse1 Image
object reference from the blank (default) game board square texture map to the one with the image inside
of it. Your Java 9 Image object instantiation (and loading) construct is shown at the top of Figure 18-15 and
should look like this code:


diffuse1 = new Image("/gamesquare1bird1.png", 256, 256, true, true, true);


Use a Run ➤ Project work process to make sure the content is facing the right direction, as shown in
Figure 18-16.


Figure 18-15. Test the first game board square by swapping in the new texture map image in the diffuse1
instantiation

Free download pdf