28.04.2019 Views

[JAVA][Beginning Java 8 Games Development]

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 16 ■ Collision Detection: Creating SVG Polygons for the Game Actors and Writing Code to Detect Collision<br />

Figure 16-2. Click in a transparent area using Fuzzy Select Tool to select Actor<br />

In this case, the Fuzzy Select tool is selecting transparency values. In fact, you should notice that you have to<br />

select an option to select transparent areas in an image, using the Fuzzy Select Tool Options dialog, which can be seen<br />

at the bottom of the Toolbox Tool Options floating palette. As you can see, I have instructed GIMP to not only “look” at<br />

the RGB plates in the image, but also to look at the Alpha plate, by selecting the “Select transparent areas” option.<br />

Now that we have that selection set that contains everything except the sprite character that we wanted to select,<br />

we need to figure out a way to get the opposite of what we now have selected. Selecting the transparent areas was<br />

admittedly much easier than trying to select the different colored areas of the InvinciBagel character! Fortunately<br />

GIMP has an algorithm that inverts the selection completely, selecting everything that is not selected, and deselecting<br />

everything that is selected.<br />

Under the GIMP 2.8 Select menu, find the Invert option, or, use the Control+I keyboard shortcut, shown on the<br />

menu next to the Invert option, all of which can be seen on the left half of Figure 16-3. Once you do this you will notice<br />

that the animated “marching ants” no longer march around the square perimeter (extents) of the digital image and<br />

that they are only around the InvinciBagel character, which means that the selection has been inverted and what we<br />

wanted to select is now contained in the selection set.<br />

www.it-ebooks.info<br />

347

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!