Game Development Reference
In-Depth Information
point pairs instead of data point triplets. If you recall back in
Table 16-1
, the only SVG
command that uses triplet (three) X,Y data point pairs is the
C
, or Cubic Bezier
(Spline) Curve. Sure enough, as you see in
Figure 16-15
,
right under the
M
(moveto)
opening SVG command is the C command. This explains why GIMP put three data
points in each point in your polygon. The reason all the data point triplets have the
same value
is because we checked the
polygon
option in GIMP. This puts the spline
curve control handles “away” or out of sight, directly on top of the X,Y data point. This
defines zero curvature, or the square polygon structure seen in
Figure 16-14
.
Let's export the SVG data with the triplets removed, which is shown in
Figure
work process, primarily for learning purposes, as we are not quite finished with the op-
timization work process.
Figure 16-15
.
Remove duplicate point data for those points in the interior of the collision polygon, to further optimize
Save the XML data shown in
Figure 16-15
as
sprite1svghandintegerxmloptim-
ized.txt
and then use the same Import Path work process, shown in
Figures 16-12
and
6-13, to import this further optimized SVG data set into GIMP. As you can see in
Fig-
moves the polygonal nature of your collision polygon. So, we will need to do some fur-
ther work on our SVG data to correct this.