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


Figure 18-13. Resize the canvas to 256 pixels and center the 192-pixel image inside the 32 pixels of
transparency to center


Use the Select ➤ All menu sequence and then the Edit ➤ Copy menu sequence to copy both the
transparent 32-pixel boundary and the interior 192-pixel image data into your OS Clipboard. (Yes, the
Clipboard is actually part of your operating system, so you can cut or copy and paste data between all of your
different running applications.)
Select the 256-pixel game board square texture compositing tab and the layer underneath the game
board square layer and use the Edit ➤ Paste as Layer menu sequence to paste the image under the red
borders. Note that in this case you could also paste the layer on top of the game board square edge color
layer; because we are using all straight lines in the composited layers, each layer abuts the other “pixel
for pixel” mathematically so that there are zero overlapping pixels, which was not the case in our circular
quadrant composite.
I’m going to save this texture map file using a different name, gameboardsquarecontent1.xcf, so that it
contains only the images and edge decoration for the first game board square. Eventually there will be 20 of
these XCF files, one for each of the Q1S1 through Q4S5 gameBoard Node quadrant children.
As we add content, these will accumulate in size evenly, and you will not end up with one unwieldy file
that you have to deal with. This approach will keep your pro Java 9 game development work process far more
organized.
Note that the screenshot in Figure 18-14 still uses the Pro_Java_9_Games_Development_Texture_Maps4
XCF file from Chapter 13 , which covered 3D primitive shader and texture mapping concepts and Java coding.

Free download pdf