Killer Game Programming in Java

First Edition Juni 2005
ISBN 978-0-596-00730-0
Seiten 996
EUR43.00, SFR71.90


Weitere Informationen zu diesem Buch

Inhaltsverzeichnis | Index | Probekapitel | Kolophon | Rezensionen |
Beispiele |


Index

	
[ A ], [ B ], [ C ], [ D ], [ E ], [ F ], [ G ], [ H ], [ I ], [ J ], [ K ], [ L ], [ M ], [ N ], [ O ], [ P ], [ Q ], [ R ], [ S ], [ T ], [ U ], [ V ], [ W ], [ X ],

A[ Top ]
Abstract Windowing Toolkit (see AWT)
active rendering, converting to, 21
AffineTransformOp class, 119
algorithms
      A* pathfinding, 379-382, 386
      animation (see animation algorithms)
      approximate and probabilistic, 590
      boid, 593
      bounding box, 442
      CLOD, 747
      collision, 291
      cone rotation, 636
      dead reckoning, 883
      Euler's integration, 577
      explosion facing the viewer, 639
      flatness fractal, 689
      flocking and Artificial Life, 592
      nearest neighbor for scaling, 149
      nearness testing, 495
      optimized view frustum, 395
      traversing a scene graph, 434
AlienAStarSprite class, 350
AlienQuadSprite class, 373
AlienTiles (see isometric tile games)
AlphaComposite class, 152
AmmoManager class, 650
animation algorithms, 13-45
      active rendering, converting to, 21
      alternative approaches, 39-45
            swing timer, 40-43
            utility timer, 44
      animation loop (update, rendering, sleep), 14
      example programs for, 14
      execution speed control, 22-31
      FPS, 13
            separating updates from rendering, 35-37
            UPS, 34-37
      GamePanel (JPanel subclass) (see GamePanel)
      pausing and resuming, 37-39
      sleep( ) call accuracy, 31-33
      sleep( ) call inaccuracy handling, 33
      threaded canvas as, 14-19
            double buffered drawing, 18
            game termination, 17
            local memory variables, preventing with volatile, 17
            sleep necessity, 17
            stopping threads, 16
            synchronization concerns, 16
      timer resolution (granularity), 24
      timers
            J2SE, 26
            Java 3D bug alert, 31
            non J2SE, 26
            resolution of, 27-30
      user interaction, adding, 20
animation framework (see animation algorithms)
AnimSprite3D class, 515
AnimTour3D
      animated 3D sprite, 515-524
            activity, 519
            animating, 520-524
            controlling, 520
            floor boundary detection, 519
            Poser, 518
            poses, 517
      class diagrams, 513
      code for, 514
      full-screen version (see AnimTourFS)
      scene creation, 514
AnimTourFS, 525-530
      display mode, changing, 528
      full-screen failure fallback, 527
      full-screen scene, creating, 525-528
      Java FSEM tutorial, 529
      windowed version (see AnimTour3D)
APIs
      DirectX, 388
      J2ME's M3G, 564
      JAI, 393
      Java 3D (Java's scene graph API), 387
      Java MuticastSocket, 827
      Java Sound, 185
            caparisons to JMF, JOAL, 202
            low-level access, 182
            MIDI support, 197
            resources, 202
      JMF, 393
      JNLP, 922
      JTA, 812
      OpenGL's audio, 178
      particle system, 590
      scene graph, 404
      Xith3D, 952
applications
      AnimTourFS, 525
      Lathe3D, 459-486
      Loader3D, 444-458
      LoaderInfo3D, 424
      LoadersTests, 205-225
      Mover3D, 531-564
      packaging as JAR files, 175, 177
      PlayerPiano, 268
      SoundPlayer, 182-185
      Tour3D, 487-511
articulated figure (sprite) (see Mover3D)
audio effects (see sound effects)
audio (see sound)
audio synthesis (see sound synthesis)
AudioClip class, 179-182
Auriga3D game engine binding, 405
Aviatrix3D screen graph API, 405
AWT (Abstract Windowing Toolkit) imaging model, 106-110
      filters, chaining, 110
      ImageIcon class, 108
      images, processing, 109
      MediaTracker class, 107
AxisAngle4d class, 615

B[ Top ]
BackgroundSound class, 618
BallSprite class, 280
BandCombineOp class, 119
BandCombineOp processing, 167-169
Base64Converter class, 811
BASE64Encoder, 811
BatSprite class, 280, 293
Behavior class, 503
BirdsEye class, 658
Board class, 847
Boid class, 600
boids, flocking, 592-594
      application of (see Flocking3D)
BoidShape class, 596
BoidsList class, 607
BooleanControl class, 234
BoundingSphere class, 495
BranchGroup class, 390
Brick class, 333
BricksManager class, 303
buffered sample, playing, 194-196
BufferedImage class, 113
      advantages, 113
      internals, 117
BufferedImageOp class, 119
BufferedImageOp interface, 119
BugPanel class, 274
BugRunner class, 910
bugs
      J2SE 5.0 short sound bug, 193
      Java 3D timer bug alert, 31
      MIDI volume, 244
      showMsg( ), 821
      WAV file bug, 208

C[ Top ]
Canvas3D class, 426
chat, 817-843
      clients with servlet server, 831-843
            chat group information, storing, 841-843
            chat servlet, 838-841
            Chatter class, 843
            clients, URL-based, 833-837
            polling for chat messages, 837, 838
      threaded TCP clients and server, 818-824
            Chatter class, 823
            client, 819-821, 823
            message and threads, showing, 821
            messages, waiting for, 821
            server, 822
            threaded chat handler, 822
      UDP multicasting clients and name server, 824-831
            client login and logout, improving, 827
            invisible messages, 831
            multicast chatting, 827-831
            name server, 826
            who implementation, 831
ChatClient class, 819
ChatGroup class, 823
Chatter class, 823
ChatWatcher class, 821
CheckerFloor class, 415
Checkers3D, 407-423
      class diagrams for, 408
      code for, 408
      floor tiles, 415-418
            axis labels, 418
            colored, 417
      Java 3D and Swing integration, 409
      scene graphs
            background, 412
            creating, 410-412
            lighting, 411
            viewing, 421-423
      spheres, floating, 413
            coloring, 413
            positioning, 414
      viewers
            movement, 420
            positioning, 419
Checkers3D class, 918
classes
      AffineTransformOp, 119
      AlienAStarSprite, 350
      AlienQuadSprite, 373
      AlphaComposite, 152
      AmmoManager, 650
      AnimSprite3D, 515
      AudioClip, 179
      AxisAngle4d, 615
      BackgroundSound, 618
      BallSprite, 280
      BandCombineOp, 119
      Base64Converter, 811
      BASE64Encoder, 811
      BatSprite, 280
      Behavior, 503
      BirdsEye, 658
      Board, 847
      Boid, 600
      BoidShape, 596
      BoidsList, 607
      BooleanControl, 234
      BoundingSphere, 495
      BranchGroup, 390
      Brick, 333
      BricksManager, 303
      BufferedImage, 113
      BufferedImageOp, 119
      BugPanel, 274
      BugRunner, 910
      Canvas3D, 426
      ChatClient, 819
      ChatGroup, 823
      Chatter, 823
      ChatWatcher, 821
      CheckerFloor, 415
      Checkers3D, 918
      Clip, 187
      ClipsInfo, 207
      ClipsLoader, 178
      ColorConvertOp, 119
      ColorCube, 393
      ColouredTiles, 417
      CompoundControl, 234
      ConeSound, 618
      Control, 234
      ConvolveOp, 120, 160
      Cookie, 839
      CropImageFilter, 110
      DatagramPacket, 776
      DistTourSprite, 886, 892
      DLLUninstallAction, 914, 916
      EllipseShape3D, 484
      EllipticLimb, 538
      EnumControl, 234
      ExplosionsClip, 616
      FadeMidi, 240
      FBFWatcher, 867
      Figure, 543
      FileFilter, 917
      FloatControl, 234
      FlockBehavior, 595
      FourByFour, 846
      FractalLand3D, 689
      FractalMesh, 689
      GamePanel, 14
      GeneralPath, 111
      GeometryArray, 424, 434
      GeometryInfo, 461
      GeometryUpdater, 571
      GetWebPage, 810
      GLCanvas, 403
      Graphics2D, 111
      GroundCover, 736
      GroundShape, 736
      GrowthBehavior, 749, 761
      GunTurret, 616, 622
      HeightFinder, 742
      ImageConsumer, 110
      ImageFilter, 110
      ImageIcon, 108
      ImageIO, 114
      ImagesCsSeries, 652
      ImagesLoader, 126
      ImagesPlayer, 138
      ImagesSeries, 615
      IndexedGeometry, 598
      InetAddress, 775
      J3DTimer, 26
      JackPanel, 303
      JOALMixer, 393
      JumperSprite, 308
      KeyAdapter, 492
      KeyBehavior, 705
      KeyEvent, 506
      KeyNavigatorBehavior, 647
      Landscape, 689
      LaserBeam, 616
      LatheShape3D, 459
      Leaf, 389
      Limb, 534
      Line, 187
      LineParticles, 571
      LoaderBase, 428
      LocationBeh, 539
      LookupOp, 120
      Lw3dLoader, 428
      MazeManager, 658
      MediaTracker, 107
      MemoryImageSource, 110
      MetaMessage, 198
      MidiChannel, 255
      MidiMessage, 198
      MidisInfo, 207
      MidisLoader, 178
      Mixer, 187
      MorphingMesh, 564
      MouseRotate, 421
      MouseTranslate, 421
      MouseZoom, 421
      MoveableEllipticLimb, 538, 547
      MoveableLimb, 538, 547
      MultiChat, 827
      MultiTimeClient, 807
      MultiTimeServer, 806
      MyTimerTask, 45
      NameServer, 826
      NetFourByFour, 867
      NormalGenerator, 461
      ObjectFile, 428
      Obstacles, 48
      OrbitBehavior, 420
      OrientedShape3D, 571
      OverlayCanvas, 875
      PanChanger, 246
      PanMidi, 246
      Perf, 26
      PickCanvas, 631
      PickDragBehavior, 857
      PickHighlightBehavior, 641
      PickMouseBehavior, 617, 631
      PickRay, 632
      PickRotateBehavior, 640
      PickTool, 620
      PickTranslateBehavior, 640
      PickZoomBehavior, 640
      PixelGrabber, 110
      PlayClip, 190
      PlayerSprite, 376
      PlayMidi, 200
      PlaySound, 180
      Point2D.Double, 62
      PointLight, 674
      PointParticles, 571
      PointSound, 618
      PointsUpdater, 570
      Port, 189
      Positions, 852
      PredatorBehavior, 595
      PredatorBoid, 596
      PreyBehavior, 595
      PreyBoid, 596
      Primitive, 413
      QuadArray, 424, 434
      QuadParticles, 571
      RescaleOp, 120
      RGBImageFilter, 110
      RhodoneaShape3D, 485
      Ribbon, 324
      SceneGraphObject, 433
      ScoreClient, 785
      ScoreServer, 788
      SecondViewPanel, 677
      Selector, 792
      Sequencer, 224
      ServerSocket, 776, 783
      Shape3D, 390
      SharedGroup, 711
      ShootingBehaviour, 616, 634
      ShortMessage, 198
      ShowImage, 108
      SimpleUniverse, 392
      Skeleton, 563
      SkinnedMesh, 563
      SleepAcc, 31
      Socket, 776
      SocketChannel, 792
      SoundsPanel, 207
      SourceDataLine, 186
      Sphere, 413
      Spotlight, 674
      Sprite, 280
      Sprite3D, 495
      StopWatch, 29
      StopWatchSource, 27
      Stripifier, 687
      SurfaceOfRevolution, 477
      SwingUtilities, 821
      SysexMessage, 198
      TexCoordGeneration, 478
      Text2D, 415
      TexturedFloor, 658
      TexturedPlane, 648, 658
      Thread, 37
      ThreadedChatServerHandler, 822
      ThreadedScoreHandler, 790, 822
      TiledImage, 123
      TiledSprite, 368
      TilesList, 352
      TilesPriQueue, 352
      TimeBehavior, 495
      Timer, 44
      TimerRes, 27
      TimerTask, 44
      TimeUnit, 26
      TourGroup, 900
      TouristControls, 492
      TouristInfo, 900
      TourServer, 885
      TourServerHandler, 885, 900
      TourSprite, 500
      TourWatcher, 885, 892
      TransformGroup, 390
      TransparencyAttributes, 439
      TreeLimb, 750, 768
      TriangleArray, 434
      TriangleStripArray, 424
      TurnStile, 286
      UninstallAction, 915
      Viewer, 419
      ViewerAvatar, 649
      ViewingPlatform, 419
      ViewPlatformBehavior, 655
      VolatileImage, 121
      VolChanger, 240
      WakeupCondition, 504
      WakeupOnAWTEvent, 504
      WakeupOnElapsedFrames, 504
      WakeupOnElapsedTime, 504
      WormChase, 78
      WormChase (AFS), 78
      WormChase (FSEM), 91
      WormChase (UFS), 84
      WormChaseApplet, 71
      WormPanel, 72
      WrapAnimTour3D, 514
      WrapCheckers3D, 427
      WrapFlocking3D, 596
      WrapFourByFour, 846, 848
      WrapFractalLand3D, 689
      WrapLoader3D, 447
      WrapLoaderInfo3D, 427
      WrapMaze3D, 666
      WrapMover3D, 538
      WrapNetFBF, 874
      WrapNetTour3D, 891
      WrapShooter3D, 618
      WrapTour3D, 505
      WrapTrees3D, 752
Clip class, 187
ClipsInfo class, 207
      storing clip information, 216-219
ClipsLoader class, 178
      constructor, 214-216
            playing clips, 216
ClipsLoader formats, 208
ColorConvertOp class, 119
ColorCube class, 393
ColouredTiles class, 417
CompoundControl class, 234
ConeSound class, 618
Control class, 234
convolution processing, 155-160
ConvolveOp class, 120, 160
Cookie class, 839
copyrights, sound, 209
CropImageFilter class, 110

D[ Top ]
DatagramPacket class, 776
DEM (Digital Elevation Model), 745
DistTourSprite class, 886, 892
DLLUninstallAction class, 914, 916

E[ Top ]
EllipseShape3D class, 484
EllipticLimb class, 538
emergence, 592
endLimbTG class, 756
EnumControl class, 234
ExplosionsClip class, 616

F[ Top ]
FadeMidi class, 240
fault fractal, 709
FBM (Fractal Brownian Motion) fractal, 709
FBFWatcher class, 867
Figure class, 543
FileFilter class, 917
filters, chaining, 110
FloatControl class, 234
FlockBehavior class, 595
flocking boids, 592-594
      application of (see Flocking3D)
Flocking3D, 592, 594-613
      ancestor of, 595
      boid behavior in, 594
      boids, grouping, 607
      class diagram, 596
      code for, 594
      features illustrated in, 595
      flock behavior, 608-613
            boid animation, 608
            eat prey, 612
            other flocks and velocity rules, 611
            predator behavior, 612
            prey behavior, 610
            velocity rules, 608-610
      obstacles, 597-607
            boid shape, 598
            boid types, 600-607
      scene creation, 596
floor tiles, 415-418
      axis labels, 418
      colored, 417
FourByFour class, 846
FPS (frames per second), 13, 34-37
      execution speed control, 22-31
      good game value, 25
FPShooter3D (first-person), 642-655
      ammunition management, 650,
            shooting the gun, 651
      class diagrams, 643
      code for, 644
      images in the viewpoint, 648-650
            using GIFs, 650
      laser beam management, 651-654
            firing beam, 652-654
      target setup, 644
      user's viewpoint
            initializing, 647
            moving, 654
            positioning and moving, 645-647
Fractal Brownian Motion (FBM) fractal, 709
FractalLand3D, 686-710
      class diagrams, 688
            flatness, 689
      code for, 688
      collision avoidance, 706
      fractal land, 689-691
            linear fog, 689
            user controls, 690
      ground, 697-701
            stripification, 699
            texture minification, 700
            textures, multiple, 701
      key presses, 705
      landscapes, 691-705
            floors, 692-694
            generating, 701-705
            heights, picking, 695
            other fractal examples, 709
            terrain representation, 696
            walls, 694
      scene objects, 707-709
      terrain following, 706
FractalLand3D class, 689
FractalMesh class, 689
fractals (see FractalLand3D)
frames per second (see FPS)
freeware/shareware games, 8-10
FSEM (Full-Screen Exclusive Mode), 525

G[ Top ]
game programmer, nonsupport of Java, 7
GamePanel (JPanel subclass), elements introduced, 13
games
      AlienTiles (see isometric tile games)
      Checkers3D (see Checkers3D)
      consoles, nonsupport of Java, 5, 7
      FPS, good value for, 25
      freeware/shareware, 8-10
      JumpingJack (see JumpingJack game)
      mazes (see Maze3D)
      pausing and resuming, 37-39
      programming
            core technology (animation algorithm), 13
            Java use objections (see Java, objections to use)
      shooting (see Shooter3D, FPShooter3D)
      side-scrolling (see JumpingJack game)
      Sun Game Server, 904
      tic-tac-toe (see tic-tac-toe)
      WormChase (see WormChase game)
GeneralPath class, 111
GeometryArray class, 424, 434
GeometryInfo class, 461
GeometryUpdater class, 571
GetWebPage class, 810
GIF (Graphics Interchange Format), 105
GL4Java, 402
GLCanvas class, 403
granularity (timer resolution), 24
Graphics2D class, 111
GroundCover class, 736
GroundShape class, 736
GrowthBehavior class, 749, 761
guns, shooting (see Shooter3D, FPShooter3D)
GunTurret class, 616, 622

H[ Top ]
heads-up display (HUD), 403
HeightFinder class, 742
HUD (heads-up display), 403

I[ Top ]
Image class, converting to BufferedImage, 116
ImageConsumer class, 110
ImageFilter class, 110
ImageIcon class, 108
ImageIO class, 114
images
      buffering, 113-120
            BufferedImage class internals, 117
            BufferedImageOp interface, 119
            converting Image to BufferedImage, 116
      effects, applying, 134
            ImagesTests, 135-137
      graphic formats
            GIF, 105
            JPEG, 106
            PNG, 106
      initializing, 137
      loading, 126-134
            configuration file example, 127
            getting an image, 129
            image-loading method, 132
            ImagesLoader, 130
            implementation details, 131
            internal data structures, 129
            strip file images, 133
      loading formats (o, n, s, g), 126-134
      managed, 120
      names[] array, 213
      `o' images, visual effects
            affine transforms, 153-155
            alpha compositing, 152
            BandCombineOp processing, 167-169
            convolution processing, 155-160
            drawImage( )-based processing, 149-152
            LookupOp processing, 160-164
            operation categories, 147
            pixel effects, 170-175
            precalculation, 149
            rescaling operation, 164-167
      painting, 140-142
      processing, AWT image model, 109
      sequence display, 144-146
            implementation details, 146
      transparency (BITMASK, TRANSULENT, OPAQUE), 164
      updating, 138-140
      VolatileImage class, creating and managing with, 121
ImagesCsSeries class, 652
ImagesLoader class, 126, 130
ImagesPlayer class, 138
ImagesSeries class, 615
ImagesTests application, 124-126
      class diagrams for, 126
      code for, 126
      image names and effects, 125
      starting, 135-137
imaging in Java, 105-123
      AWT imaging model, 106-110
      formats, 105
      pull imaging model, 123
      transparent color, 105
IndexedGeometry class, 598
InetAddress class, 775
install4j installer, 905-919
      BugRunner, 909-917
            installer creation, 912-914
            JAR preparation, 909-911
            resulting installer, 917
            testing, 912
            uninstalling, 914-917
      Checkers3D, 918
            changes to, 919
            installer creation, 919
            installer result, 919
            JAR preparation, 918
      Java 3D components, 906-909
            BugRunner, 906-908
            j3dutils.jar, separating out timer code, 908
      JWS comparison, 905
      location of, 905
installation problems, Java, 5
installations (see install4j, JWS)
instruments and soundbanks, creating, 261
isometric tile games, 345-386
      alien sprites, 373-376
            A*-based, 378-382, 386
            AlienAStarSprite, moving, 382
            quadrant-based, 376-378
            updating, 374
            uploading, 376
      animation framework, 352-355
            ending game, 355
            game world management, 353
            input control, 353
      class diagrams, 350-352
      isometric tiles, 346-350
            aliens, 350
            calculating cost to goal, 383, 384
            movement, 347-349
            sprite/object placement, 349
            storing details, 383
            surface map, 350
      managing the world, 356-363
            drawing the world, 362
            entity information, loading, 359
            floor information, loading, 356-358
            pickup methods, 360
            player methods, 360-362
      managing the world items, 363-366
            entity adding, 364
            entity drawing, 365
            pickup methods, 365
      player sprites, 370-373
            being hit, 372
            drawing, 372
            moving and standing, 371
            picking up pickups, 373
      reading about, 384-386
      sprites on tiles, 368-370
            moving to other tiles, 369
      tile occupier, 366-368
            additional sprite information, 367
            drawing, 368

J[ Top ]
J2SE 5.0 compilation, 73-75
      raw types, 74
      type-safe collection, 73
J2SE 5.0 short sound bug, 193
J3DTimer class, 26
      bug fixed, 387
JackPanel class, 303
JAI (Java Advanced Imaging), 123
Jake2 game engine binding, 405
JAR files
      coding changes for, 109
      LoadersTests application as, 225
      packaging applications as, 175, 177
Java, 123
      author assumptions, 1
      FSEM tutorial, 529
      objections to use, 1-12
            game programmer nonsupport, 7
            game consoles nonsupport, 5, 7
            installation problems, 5
            memory leaks, 3
            Sun nonsupport, 10, 12
            too high-level, 4
            too slow, 2
Java 2D, 110-113
      active rendering, 112
      Graphics2D class, 111
      portability, 122
      speed, 122
      web page for, 111
Java 3D, 387-406
      alternatives, 402
            GL4Java, 402
            JOGL, 403
            LWJGL, 402
            OpenGL Java bindings, 402
            scene graph APIs (see scene graph APIs)
      APIs, 387
      behaviors, 502-504
      Checkers3D example (see Checkers3D)
      criticisms, 394-402
            console support lacking, 396
            games are few, 397-399
            Java dependence, 395
            Sun nonsupport, 400-402
            too high-level, 395
            too slow, 394
      DirectX or OpenGL, 388
      ExponentialFog node, 690
      external models, 424-458
      game engine bindings, 405
            Auriga3D, 405
            Jake2, 405
            Jirr, 406
            Odejava, 406
            Ogre4J, 405
      globals in repeated calculations, 624
      lathe shapes (see Lathe3D)
      Loader3D application (see Loader3D application)
      LoaderInfo3D application (see LoaderInfo3D application)
      loaders for, 428-430
            alternates, 429
            NCSA Portfolio, 429
      particle systems in, 568-571, 589
            float arrays, 569
            inner class coding style, 571
            synchronization problems, 570
      scene graphs, 388-392
            alternative APIs (see scene graph APIs)
            HelloUniverse, 390-392
            nodes, 389
      strengths, 392-394
            documentation and examples, 393
            Java integration, 393
            performance, 392
            scene graph, 392
            unique features, 393
      Swing integration, 409
      techniques, 425-426
      terrain generation projects, 747
      textbooks, 394
      timer bug alert, 31
Java Advanced Imaging (JAI), 123
Java imaging, 105-123
      AWT imaging model, 106-110
      formats, 105
      transparent color, 105
Java Media Framework (JMF), 202
Java Sound API, 185, 202
      resources, 202
Java sound (see sound)
jFree-D2 screen graph API, 405
JiD screen graph API, 405
Jirr game engine binding, 406
Jist3D API, 404
jME graphics engine screen graph API, 404
JMF (Java Media Framework), 202
JOAL, 202
JOALMixer class, 393
JOGL, 403
JPEG (Joint Photographic Experts Group), 106
JumperSprite class, 308
JumpingJack game, 298-343
      animation framework, 303-313
            animation loop, 309-311
            explosions, 311-313
            input, 306, 307
            key presses/actions, multiple, 308-309
      bricks
            managing, 320-332
            storing information on, 333
      class diagrams for, 300-303
      code for, 303
      fireballs, 334-336
            statechart specification, 334-336
      graphical layers, 299
      ribbons
            managing, 313
            wraparound, 314-320
      sprites, jumping, 336-343
            initialization, 338
            JackPanel collision testing, 340
            key event processing, 339
            state representation, 338
            statechart specification, 336
            updating, 341
            vertical movement, 342
      starting, 303
      tiling software, 344
JWS (Java Web Start), 921-952
      benefits of, 922
      BugRunner, 925-939
            application, writing, 926
            deployment file creation, 933-937
            deployment modifications, 927, 929
            private key signs everything, 930, 933
            public-/private-key JAR signing, 929
            server, files moved to, 938
      certificates, third-party, 949
            CSR extraction, 949
            importing into keystore, 949
            requesting, 949
            signing JARs with keypair, 950
      Checkers3D, 938-945
            alternative installation method, 945
            application, writing, 939
            deployment file creation, 942-944
            deployment modifications, 940
            private key signs everything, 941
            public-/private-key JAR signing, 941
            server, files moved to, 944
      development steps, 925
      downsides of, 922, 924
      J2SE documentation information, 951
      JNLP deployment file, 924
      JWS and Java 3D, 951
      JWS and other libraries, 951
      JWS portal page, 921, 946-948
            JavaScript functions, 948
            javawsInstalled, setting in JavaScript, 947
            more information on, 948
            VBScript code, 948

K[ Top ]
Kahlua screen graph API, 405
KeyAdapter class, 492
KeyBehavior class, 705
KeyEvent class, 506
KeyNavigatorBehavior class, 647

L[ Top ]
Landscape class, 689
LaserBeam class, 616
lathe shapes (see Lathe3D)
Lathe3D, 459-486
      class diagrams, 461
      code for, 462
      features covered, 460
      lathe curves, 468-474
            blending functions, 470
            Hermite curves, 469-474
            specifying segments, 469
      lathe shapes, 474-486
            appearance, making an, 481
            geometry creation, 474
            mapping flaw and hack, 479, 481
            revolving, 475-477
            subclassing, 482-486
            texture coordinates, 478-479
      scene creation, 462-468
            curve rotations, different, 467
            shapes, 464-466
LatheShape3D class, 459
Leaf class, 389
lighting scenes, 411
Lightweight Java Game Library (LWJGL), 402
Limb class, 534
Line class, 187
LineParticles class, 571
Loader3D application, 444-458
      building model's scene graph, 451-458
            configuration modification, runtime, 458
            coords data, loading and applying, 454
            loading the model, 453
            model availability, 457
            rotation, 455-457
      code for, 445
      model managing, 450
      scene creation, 449
      (see also LoaderInfo3D application)
LoaderBase class, 428
LoaderInfo3D application, 426-444
      code for, 426
      model
            displaying, 430-433
            scene graph for, 433-436
      model's shape attributes adjustment, 435-444
            shape almost transparent, 438
            shape outline, drawing, 437
            texture, adding, 439-444
            turning shape blue, 437
LoadersTests application, 205-225
      ClipsInfo object
            LineListener interface, 219
            pausing and resuming clips, 218
            stopping clips, 218
      ClipsLoader class constructor, 214-216
      code for, 206
      design and implementation issues, 207-209
      GUI, 205, 212
      JAR file, 225
      listener methods, 211, 213
      playing clips, 216
      SoundsPanel constructor, 213
      storing clip information, 216-219
      termination, 210
      testing, 209-213
            watching with setWatcher( ), 210
LocationBeh class, 539
LookupOp class, 120
LookupOp processing, 160-164
Lw3dLoader class, 428
LWJGL (Lightweight Java Game Library), 402

M[ Top ]
managed images, 120
Maze3D, 656-685
      class diagrams, 657
      code for, 659
      floor, tiling, 668-670
            textured plane, 670
      maze
            managing, 663-666
            plan, 659-662
      scene generation approaches, 685
      scenery, creation, 666-668
            backgrounds, 667
      user interface, 662
      viewpoints, 670-685
            avatars, 675
            backfacing camera, 676-679
            birds-eye view, 681-685
            clip distances, 672
            FOV, 671
            keyboard controls, 676
            moving, 679-681
            positioning of, 676
            spotlights, 673-675
MazeManager class, 658
mazes (see Maze3D)
MediaTracker class, 107
memory leaks, Java, 3
MemoryImageSource class, 110
MetaMessage class, 198
MIDI, 197-202
      MidiInfo information storage, 223
            pausing and resuming sequences, 224
            stopping sequences, 223
      MidisLoader (see MidisLoader)
      sequences, 198
            audio effects on, 236-248
            playing, 199-202
            Sequencer methods, 248
      synthesis, 255-268
            approaches to, 255, 256
            MIDI messages to synthesizer receiver port, 258, 259
            note-playing message to MIDI channel, 256-258
            sequences, creating, 259-268
MidiChannel class, 255
MidiMessage class, 198
MidisInfo class, 207
MidisLoader, 219-223
      sequences
            closing, 222
            pausing and resuming, 221
            playing, 221
            stopping, 222
MidisLoader class, 178
Mixer class, 187
mixer controls, 231-236
MorphingMesh class, 564
MouseListener, 213
MouseRotate class, 421
MouseTranslate class, 421
MouseZoom class, 421
MoveableEllipticLimb class, 538, 547
MoveableLimb class, 538, 547
Mover3D, 531-564
      articulated and morphing, 563
      articulated figure approach, 531-535
            building figures, 534
      articulation
            and mesh deformation, 562
            and skinning, 562
      class diagrams, 537
      code for, 538
      commands panel, 540-543
            processing commands, 541-543
      figures
            making and moving, 543-553
            other articulated, 561
      kinematics, forward and inverse, 535-537
      limbs
            modeling, 553-557
            moving, 557-560
      scene creation, 538
      user input processing, 539
MultiChat class, 827
MultiTimeClient class, 807
MultiTimeServer class, 806
MyTimerTask class, 45

N[ Top ]
NameServer class, 826
NetFourByFour class, 867
NetTour3D, 884-902
      class diagrams, 885
      code for, 886
      NVE, as simple, 886
      scene creation, client, 887
      server activities, 899-902
            broadcasting, 899-901
            client-to-client messaging, 901
      server monitoring, 893-899
            distributed sprite class, 895
            distributed sprite creation, 894
            distributed sprite moving and rotating, 896
            sprite detail requests, responding to, 897
            sprite details, other client's, 897-899
      sprites, 888-893
            defining, 888-890
            local, 890-893
networking, 769-816
      chat (see chat)
      TCP client
            and multiplexing server, 791-800
            and multithreaded server, 788-790
            and sequential server, 800-805
            UDP client and server, 800-805
      client/server model, 776
      communication, elements of, 770-776
            bandwidth, 770-772
            latency, 772
            protocol, 773-776
            reliability, 773
            topology, 770
      example code, 769
      firewalls, 808-815
            applets as clients, 815
            proxy authorization, 811
            web page retrieval, 809
            web-based client and server, 812-815
      other Java approaches, 816
      P2P Java programming, 805-807
            multicasting, 806
      P2P model, 778-780
NormalGenerator class, 461
NotesSynth, extending, 255
NVE (networked virtual environment), 878-904
      background on, 879
      elements of, 880-884
            consistency, 882
            dead reckoning, 883
            objects, 881
            real-time, 882
            scalability, 884
            security, 884
            spaces, 880, 881
            users (avatars), 881
            views, 882
      gaming acronyms, 880
      NetTour3D (see NetTour3D)
      other Java NVEs, 902
            Sun Game Server, 904

O[ Top ]
ObjectFile class, 428
Obstacles class, 48, 67
Odejava game engine binding, 406
Ogre4J game engine binding, 405
OpenGL Java bindings, 402
      GL4Java, 402
      LWJGL, 402
OpenMind screen graph API, 404
OrbitBehavior class, 420
OrientedShape3D class, 571
OverlayCanvas class, 875

P[ Top ]
PanChanger class, 246
PanMidi class, 246
particle class, 571
particle systems (see Particle3D)
Particle3D, 565-591
      class diagrams, 571
      coding techniques, 566-568
      Java 3D particle systems, 568-571
            float arrays, 569
            inner class coding style, 571
            synchronization problems, 570
      lines, fountain of, 578-580
            initializing particles, 579
            particle appearance, 580
            updating particle system, 580
      non-Java 3D approaches, 590
      other particle systems, 589
            Java 3D approaches, 589
      particle systems in (three), 566
      performance results, 587, 589
      points, fountain of, 574-578
            geometry and appearance, 575
            triggering updates, 578
            updating, 576
            updating particles, 577
      quads, fountain of, 580-588
            geometry, specifying, 582
            initializing particle movement, 583
            initializing particle normals, 585
            initializing particle texture coordinates, 583, 585
            particle appearance, 585
            updating particles, 587
      scene creation, 572
Particles3D, 566
pausing and resuming, 37-39
Perf class, 26
PickCanvas class, 631
PickDragBehavior class, 857
PickHighlightBehavior class, 641
PickMouseBehavior class, 617, 631
PickRay class, 632
PickRotateBehavior class, 640
PickTool class, 620
PickTranslateBehavior class, 640
PickZoomBehavior class, 640
pixel effects, 170-175
      teleporting, 171-173
      zapping, 173-175
PixelGrabber class, 110
PlayClip class, 190
PlayerPiano application, 268
PlayerSprite class, 376
PlayMidi class, 200
PlaySound class, 180
PNG (Portable Network Graphics), 106
Point2D.Double class, 62
PointLight class, 674
PointParticles class, 571
PointSound class, 618
PointsUpdater class, 570
Port class, 189
Portable Network Graphics (PNG), 106
Positions class, 852
PredatorBehavior class, 595
PredatorBoid class, 596
PreyBehavior class, 595
PreyBoid class, 596
Primitive class, 413
pull imaging model, 123

Q[ Top ]
QuadArray class, 424, 434
QuadParticles class, 571

R[ Top ]
Real-time Optimally Adapting Meshes (ROAM), 746
rendering, separating updates from, 35-37
RescaleOp class, 120
rescaling operations, 164-167
      brightening, 165
      negating, 166
RGBImageFilter class, 110
RhodoneaShape3D class, 485
Ribbon class, 324
ROAM (Real-time Optimally Adapting Meshes), 746
rotating images, 153-155

S[ Top ]
sampled audio, 185-196
      buffered, playing, 194-196
      J2SE 5.0 short sound bug, 193
      mixer, 187-189
      playing clips, 189-193
      sound effects on, 226-236
            approaches, 226
            byte array manipulation, 227-231
            mixer controls, 231-236
            precalculation, 227
      sound synthesis, 249-255
            note names, 249-251
            NotesSynth, extending, 255
            playing notes, 251
            synthesizing notes, 252-255
scene graph APIs, 404
      Aviatrix3D, 405
      jFree-D2, 405
      JiD, 405
      Jist3D, 404
      jME graphics engine, 404
      Kahlua, 405
      OpenMind, 404
      Xith3D, 404
scene graphs
      background, 412
      creating, 410-412
      lighting, 411
      viewing, 421-423
scene graph viewing, 421-423
SceneGraphObject class, 433
ScoreClient class, 785
ScoreServer class, 788
SecondViewPanel class, 677
Selector class, 792
SeqSynth, extending, 268
Sequencer class, 224
ServerSocket class, 776, 783
Shape3D class, 390
SharedGroup class, 711
Shooter3D (third-person), 614-641
      class diagrams for, 616
      code for, 617
      explosions, 627-631
            rotating, 629
            series of images, displaying, 629-631
      FireBeam thread, 639
      globals in repeated calculations, 624
      gun, controlling, 622-624
      laser beam, 624-627
            shooting, 626
      picking with mouse click, 631-634
            intersections, finding, 633
            picked object, 633
      scene creation, 617
      scene objects, picking, 619-622
            what to pick, 621
      shooting behavior, 634-639
            cone rotation, 636-638
            explosion facing the viewer, 639
            picking debugging, 635
      sounds, 617-619
            problems with, 619
ShootingBehaviour class, 616, 634
ShortMessage class, 198
ShowImage class, 108
showMsg( ) bug, 821
side-scroller games (see JumpingJack game)
SimpleUniverse class, 392
Skeleton class, 563
SkinnedMesh class, 563
sleep( ) call
      accuracy of, 31-33
      inaccuracy, handling of, 33
SleepAcc class, 31
Socket class, 776
SocketChannel class, 792
sound, 178-204
      APIs, 208
      Applet playing, 178
      audio effects, 207
      AudioClip class, 179-182
      background music, 207
      callbacks, 208
      ClipsLoader formats, 208
      copyrights of, 209
      effects (see sound effects)
      J2SE 5.0 short sound bug, 193
      Java Sound API, 185
            resources, 202
            versus JMF, JOAL, 202
      LoadersTests application (see LoadersTests application)
      loading and playing, 205-225
      MIDI (see MIDI)
      MidisLoader (see MidisLoader)
      preloading, 208
      resources, 204
      SoundPlayer application, 182-185
      synthesis (see sound synthesis)
      WAV bug, 208
sound effects, 226-248
      examples, location of, 226
      sampled audio (see sampled audio)
sound synthesis, 249-269
      libraries, 268
      sampled audio, 249-255
            note names, 249-251
            NotesSynth, extending, 255
            playing notes, 251
            synthesizing notes, 252-255
SoundsPanel class, 207
SoundsPanel constructor, 213
SoundsWatcher interface, 210
SourceDataLine class, 186
Sphere class, 413
spheres, floating, 413
      coloring, 413
      positioning, 414
Spotlight class, 674
Sprite class, 280
Sprite3D class, 495
sprites, 270-297
      3D animated, 512-530
            AnimTour3D (see AnimTour3D)
            common approaches, 512
            keyframe animation, 513, 530
      animation framework, 274-279
            animation loop, 276-278
            finishing the game, 278
            user interaction, 275
      articulated figures (see Mover3D)
      ball statechart, 287-293
            specification, 288-289
            translating, 289-293
      ball textual specification, 287
      bat statechart, 293-297
            specification, 293
            translating, 294-297
      bat textual specification, 293
      BugRunner, 270-272
            class diagrams, 273
      coding, 280-284
            bounding box, 282
            constructor, 280
            drawing, 284
            image, 281
            updating, 283
      statechart for, 284-287
            translating to code, 285
      (see also Tour3D)
StopWatch class, 29
StopWatchSource class, 27
strip file images, loading, 133
Stripifier class, 687
Sun Game Server, 904
SurfaceOfRevolution class, 477
swing timer, 40-43
SwingUtilities class, 821
synthesizer receiver port, MIDI messages to, 258
SysexMessage class, 198

T[ Top ]
Terra3D, 711-744
      class diagrams, 712
      code for, 713
      ground cover, 734-741
            ground shape, 738-741
            moving over, 740
            what added, 736-738
            where am I?, 739
      landscapes
            building, 722-728
            walls, 731-734
      landscaping (see Terragen landscaping tool)
      scenery
            3D, 728-731
            creation, 720, 722
      surface height, 741-743
            HeightFinder picking, 742
      terrain
            DEM, 745
            following, accelerating, 743
            generation, 745-748
            Java 3D, other projects, 747
            mesh decomposition, 744
            ROAM, 746
            threads, 744
Terragen landscaping tool, 713-720
      extracting textures from, 718-720
terrain generation (see Terra3D)
TexCoordGeneration class, 478
Text2D class, 415
TexturedFloor class, 658
TexturedPlane class, 648, 658
Thread class, 37
threaded animation, 14-19
      double buffered drawing, 18
      game termination, 17
      local memory variables, preventing with volatile, 17
      sleep necessity, 17
      stopping threads, 16
      synchronization concerns, 16
ThreadedChatServerHandler class, 822
ThreadedScoreHandler class, 790, 822
tic-tac-toe, 844-877
      elements, main, 846
      networked game, 858-877
            canvas, writing on, 875-877
            class comparison to standalone, 867
            client game initialization, 867, 869
            client game play, 871-874
            client game termination, 869-871
            code for, 864
            player handlers, 865, 867
            playing, 863
            top-level server, 865
            two-person protocols, 861
      standalone game, 846-858
            class comparison to networked, 867
            code for, 846
            marker creation, 850-853
            origins of, 847
            picking and dragging, 853-856
            representing the game, 856-858
            scene creation, 848-850
TiledImage class, 123
TiledSprite class, 368
TilesList class, 352
TilesPriQueue class, 352
tiling software, 344
TimeBehavior class, 495
Timer class, 44
timer resolution (granularity), 24
TimerRes class, 27
timers
      J2SE, 26
      Java 3D bug alert, 31
      non-J2SE, 26
      resolution of, 27-30
TimerTask class, 44
TimeUnit class, 26
Tour3D, 487-511
      behaviors in Java 3D, 502-504
      class diagrams, 488
      code for, 489
      scene creation, 489-495
            background image, 490
            full-screen display, 491
            obstacle creation, 494
            scenery and obstacles, adding, 492-494
      sprites
            alien, 500-502, 510
            basic 3D, 495-499
            user's touring, 500, 504-509
TourGroup class, 900
TouristControls class, 492
TouristInfo class, 900
TourServer class, 885
TourServerHandler class, 885, 900
TourSprite class, 500
TourWatcher class, 885, 892
TransformGroup class, 390
TransparencyAttributes class, 439
TreeLimb class, 750, 768
trees that grow (see Trees3D)
Trees3D, 749-768
      class diagrams, 751
      code for, 752
      leaves, displaying, 764
      limbs, 755-761
            color change, 760
            leaves, 760
            scaling, 758
            sorting information on, 756
            subgraph creation, 756-758
      L-systems comparison, 766-768
            Java 3D and, 767
            what to use, 767
      rule execution, 761-764
      scene creation, 752-754
            growth, 754
            leaves, 753
            transparency depth-sorting, 754
TriangleArray class, 434
TriangleStripArray class, 424
TurnStile class, 286

U[ Top ]
UninstallAction class, 915
UPS (updates per second), 34-37
utility timer, 44

V[ Top ]
Viewer class, 419
ViewerAvatar class, 649
viewers
      movement, 420
      positioning, 419
ViewingPlatform class, 419
ViewPlatformBehavior class, 655
virtual environment, networked (see NVE)
volatile, preventing local memory variables, 17
VolatileImage class, 121
VolChanger class, 240
VRAM
      information on, 142-144
      VolatileImage objects in, 121

W[ Top ]
WakeupCondition class, 504
WakeupOnAWTEvent class, 504
WakeupOnElapsedFrames class, 504
WakeupOnElapsedTime class, 504
WAV bug, 208
WormChase (AFS) class, 78
WormChase class, 78
WormChase (FSEM) class, 91
WormChase game
      full-screen, 76-104
            80-85 FPS OS timings, 103
            AFS, 77-82
            approaches, 76
            code for, 78
            FSEM worm, 89-103
            UFS worm, 82-89
      window and applet, 46-73
            applet, 70-73
            application information, 48-50
            application timing, OS, 68
            class diagrams, 48
            class reuse, 47
            code for, 48
            considerations, 47
            game panel, 50-59
            J2SE 5.0 compilation, 73-75
            obstacles, 67
            speed testing, 47
            timer choice, 47
            worm information, storing, 59-67
WormChase (UFS) class, 84
WormChaseApplet class, 71
WormPanel class, 72
WrapAnimTour3D class, 514
WrapCheckers3D class, 427
WrapCheckers3D JPanel, 409
WrapFlocking3D class, 596
WrapFourByFour class, 846, 848
WrapFractalLand3D class, 689
WrapLoader3D class, 447
WrapLoaderInfo3D class, 427
WrapMaze3D class, 666
WrapMover3D class, 538
WrapNetFBF class, 874
WrapNetTour3D class, 891
WrapShooter3D class, 618
WrapTour3D class, 505
WrapTrees3D class, 752

X[ Top ]
Xith3D screen graph API, 404

	

Zurück zu Killer Game Programming in Java


Themen

Buchreihen

Special Interest

International Sites

O'Reilly China O'Reilly France O'Reilly USA O'Reilly Japan O'Reilly Taiwan