28.04.2019 Views

[JAVA][Beginning Java 8 Games Development]

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

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

Figure 16-13. Open the sprite1svghandintegerxml.txt file<br />

As you can see in Figure 16-14, this integer representation of the collision polygon SVG data is identical to a<br />

floating point representation, which was shown in Figure 16-9. The collision polygon is now closed, due to an addition<br />

of an SVG “Z” command, at the end of the SVG data string. We are getting our collision data to be more optimized!<br />

Figure 16-14. Collision polygon is correct using integer data (left); deselect visibility in Layers Palette (right) to see SVG<br />

358<br />

www.it-ebooks.info

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

Saved successfully!

Ooh no, something went wrong!