Game Development Reference
In-Depth Information
Figure 16-17 . Change your SVG Path data from using the C (curve) data type to the L (line) data type representation
The final SVG data set is shown in Figure 16-18 , and you can copy and paste that
data into your Java code as well as into an empty Notepad document and save it as its
own file, named iBshape1svg.txt , so that we can do some math next, and see exactly
how much data we have reduced our collision polygon from the automatic GIMP cre-
ated collision polygon, to our hand-optimized custom collision polygon. If you import
the collision data shown in Figure 16-18 in GIMP, you will get the desired collision
polygon shown in Figure 16-14 with 15 data point pairs, instead of 100!
Figure 16-18 . To use optimized SVG Path data set, select the part after d= (including quotes), and paste into the
code
 
 
 
Search WWH ::




Custom Search