Game Development Reference
In-Depth Information
Figure 16-7 . Select the SVG data (including quote characters) for the SVG Path representation, and use it in your
code
As you can see in Figure 16-7 , there are 32 times 3 data pairs, which is close to 100
data points, which is a lot of data to process, especially if two objects that both have
SVGPath collision detection data defined are colliding!
If you look at the InvinciBagel character in Figure 16-4 , we really should be able to
define a collision polygon around the character using 14 to 16 lines that perfectly en-
capsulate the character, and use many times less (16 times less, in fact, as you will see
during the next section of the chapter) data, which equates to 16 times less memory,
and 16 times less processing (1600% higher efficiency) overhead, if not more.
For that reason, I want to show you the more complex work process in GIMP for
defining your own custom collision polygon SVG data shape object, using as few lines
(between data points) as possible. This essentially equates to collision detection SVG
Path shape data optimization , and since I've been showing you the data optimization
work process for other new media elements, there is no reason to stop that trend now!
So next, let's take a detailed look at how to reduce our collision detection SVG Path
shape data overhead by 1600% in the next section of this chapter.
 
Search WWH ::




Custom Search