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.

■ Contents<br />

■■Chapter 15: Implementing Game Audio Assets: Using the <strong>Java</strong>FX<br />

AudioClip Class Audio Sequencing Engine323<br />

<strong>Java</strong>FX AudioClip Class: A Digital Audio Sequencer324<br />

Creating and Optimizing Digital Audio: Audacity 2.0.6325<br />

Optimization Versus Compression: The Audio Memory Footprint 327<br />

Adding Audio to InvinciBagel.java: Using AudioClip333<br />

Referencing AudioClip Assets: Using the java.net.URL Class 333<br />

Adding Your Audio Asset Loading Method: .loadAudioAssets( ) 335<br />

Providing Access to Your AudioClip: The .playiSound( ) Methods 338<br />

Summary341<br />

■■Chapter 16: Collision Detection: Creating SVG Polygons for the Game Actors<br />

and Writing Code to Detect Collision343<br />

The SVG Data Format: Hand Coding Vector Shapes344<br />

Creating and Optimizing Collision Data: Using GIMP345<br />

Creating an Optimized Collision Polygon: Using the Path Tool 352<br />

Refining SVG Path Collision Shapes in GIMP: Using Import Path 356<br />

Creating and Optimizing Physics Data: Using PhysEd363<br />

Replacing Dummy Collision Data: InvinciBagel.java365<br />

Bagel Class Collision Detection: .checkCollision( )370<br />

Locating a Node Object: Using the Bounds Object372<br />

Using Node Local Bounds: The .getBoundsInLocal( ) Method 373<br />

Using Node Parent Bounds: The .getBoundsInParent( ) Method 373<br />

Using Node Intersection: The .intersects(Bounds object) Method 374<br />

Using Shape Class Intersect: The .intersect( ) Method374<br />

Overriding the Abstract Hero Class: .collide( ) Method375<br />

If Collision Detected: Manipulating the CastingDirector Object 378<br />

Removing Actors from the Scene Graph: .getChildren( ).remove( ) 380<br />

Reset the Removed Actor List: .resetRemovedActors( ) Method 384<br />

Optimizing Collision Detection Processing: if(collide(object)) 385<br />

www.it-ebooks.info<br />

xv

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

Saved successfully!

Ooh no, something went wrong!