You are previewing jMonkeyEngine 3.0 Cookbook.
O'Reilly logo
jMonkeyEngine 3.0 Cookbook

Book Description

Over 80 practical recipes to expand and enrich your jMonkeyEngine skill set with a close focus on game development

In Detail

This book provides you with engaging hands-on game development tips that will keep the game we'll be developing in focus. Each chapter will provide insight into the how's, what's, and why's of jMonkeyEngine and game development step by step.

The book starts by giving you useful tips on the SDK itself, and how using it will make your life as a developer easier. The book then moves on to cover a variety of patterns which you can use to control cameras, characters, and animations, followed by how to make real-time networked games and dynamic game worlds.

If you are a jMonkeyEngine user or Java developer interested in delving further into game development to expand your skill set, then this book is perfect for you.

What You Will Learn

  • Make an online game with the SpiderMonkey framework
  • Design dynamic and attractive GUIs with NiftyGUI
  • Create cutscenes and smooth camera rides with cinematics
  • Build AI that sees, follows, and finds its way through the game world
  • Use Bullet physics to build a more dynamic game world
  • Explore useful tips on taking your game project to the next level
  • Develop a more maintainable project by using Controls and AppStates
  • Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the files e-mailed directly to you.

    Table of Contents

    1. jMonkeyEngine 3.0 Cookbook
      1. Table of Contents
      2. jMonkeyEngine 3.0 Cookbook
      3. Credits
      4. About the Author
      5. About the Reviewers
      6. www.PacktPub.com
        1. Support files, eBooks, discount offers, and more
          1. Why Subscribe?
          2. Free Access for Packt account holders
      7. Preface
        1. Common development concepts in jMonkeyEngine
        2. What this book covers
        3. What you need for this book
        4. Who this book is for
        5. Conventions
        6. Reader feedback
        7. Customer support
          1. Downloading the example code
          2. Downloading the color images of this book
          3. Errata
          4. Piracy
          5. Questions
      8. 1. SDK Game Development Hub
        1. Introduction
        2. Setting up a project
          1. Getting ready
          2. How to do it...
          3. How it works...
        3. Importing a model
          1. How to do it…
          2. How it works…
        4. Using Scene Composer
          1. Getting ready
          2. How to do it…
          3. How it works...
          4. There's more…
        5. Modifying heightmaps with Terrain Editor
          1. How to do it...
          2. How it works...
        6. Adding a sky box and lighting
          1. How to do it…
          2. How it works...
          3. There's more…
        7. Adding water using a filter
          1. Getting ready
          2. How to do it…
          3. How it works...
        8. Adding some ambient audio
          1. How to do it…
          2. How it works...
        9. Creating bitmap fonts with Font Creator
          1. How to do it…
          2. How it works...
        10. Retrieving an attachment node
          1. Getting ready
          2. How to do it…
          3. How it works...
          4. There's more…
        11. Using ParticleEmitter – Soaring Birds
          1. Getting ready
          2. How to do it…
          3. How it works...
          4. There's more…
        12. An advanced ParticleEmitter class
          1. Getting ready
          2. How to do it…
          3. How it works...
          4. There's more…
      9. 2. Cameras and Game Controls
        1. Introduction
        2. Creating a reusable character control
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
        3. Attaching an input AppState object
          1. Getting ready
          2. How to do it...
          3. How it works...
        4. Firing in FPS
          1. Getting ready
          2. How to do it...
          3. How it works...
        5. Firing non-instant bullets
          1. Getting ready
          2. How to do it...
          3. How it works...
        6. Creating an RTS camera AppState object
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
        7. Selecting units in RTS
          1. Getting ready
          2. How to do it...
          3. How it works...
        8. Making the camera follow units
          1. Getting ready
          2. How to do it...
          3. How it works...
        9. Following a character with ChaseCamera
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more…
        10. Adding a game controller or joystick input
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more…
        11. Leaning around corners
          1. Getting ready
          2. How to do it...
          3. How it works...
        12. Detecting cover automatically in a third-person game
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
      10. 3. World Building
        1. Introduction
        2. Using noise to generate a terrain
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
        3. Lighting your world and providing it with dynamic lights
          1. How to do it...
          2. How it works...
          3. There's more…
        4. Deforming a terrain in real time
          1. Getting ready
          2. How to do it...
          3. How it works...
        5. Automating trees' distribution
          1. How to do it...
          2. How it works...
          3. There's more...
        6. Endless worlds and infinite space
          1. How to do it...
          2. How it works...
        7. Flowing water with cellular automata
          1. Getting ready
          2. How it works...
          3. How it works...
        8. The essentials of a cube-based world
          1. Getting ready
          2. How to do it...
          3. How it works...
      11. 4. Mastering Character Animations
        1. Introduction
        2. Previewing animations in SDK
          1. How to do it...
          2. How it works...
        3. Creating an animation manager control
          1. How to do it...
          2. How it works…
        4. Extending the animation control
          1. How to do it...
          2. How it works...
        5. Handling jump animations
          1. How to do it...
          2. How it works...
        6. Creating a custom animation - leaning
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
        7. Creating a subanimation
          1. Getting ready
          2. How to do it...
          3. How it works...
        8. Lip syncing and facial expressions
          1. Getting ready
          2. How to do it...
          3. How it works...
        9. Eye movement
          1. How to do it...
          2. How it works...
          3. There's more...
        10. Location-dependent animation – edge check
          1. Getting ready
          2. How to do it...
          3. How it works...
        11. Aligning feet with ground – inverse kinematics
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
      12. 5. Artificial Intelligence
        1. Introduction
        2. Creating a reusable AI control class
          1. How to do it...
          2. How it works…
          3. There's more…
          4. There's more…
        3. Sensing – vision
          1. How to do it...
          2. How it works...
          3. There's more…
        4. Sensing – hearing
          1. How to do it...
          2. How it works...
        5. Decision making – Finite State Machine
          1. How to do it...
          2. How it works...
        6. Creating the AI using cover
          1. How to do it...
          2. How it works...
        7. Generating NavMesh in SDK
          1. Getting ready
          2. How to do it...
          3. How it works...
        8. Pathfinding – using NavMesh
          1. Getting ready
          2. How to do it...
          3. How it works...
        9. Controlling groups of AI
          1. How to do it...
          2. How it works...
          3. There's more
        10. Pathfinding – our own A* pathfinder
          1. How to do it...
          2. How it works...
      13. 6. GUI with Nifty GUI
        1. Introduction
        2. Initializing Nifty and managing an options menu
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more…
        3. Loading the screen
          1. How to do it...
          2. How it works...
        4. Creating an RPG dialog screen
          1. How to do it...
          2. How it works...
        5. Implementing a game console
          1. How to do it...
          2. How it works...
        6. Handling a game message queue
          1. How to do it...
          2. How it works...
          3. There's more…
        7. Creating an inventory screen
          1. How to do it...
          2. How it works...
        8. Customizing the input and settings page
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
        9. Using offscreen rendering for a minimap
          1. How to do it...
          2. How it works...
          3. There's more…
      14. 7. Networking with SpiderMonkey
        1. Introduction
        2. Setting up a server and client
          1. How to do it...
          2. How it works...
        3. Handling basic messaging
          1. Getting ready
          2. How to do it...
          3. How it works...
        4. Making a networked game – Battleships
          1. Getting ready
          2. How to do it...
          3. How it works...
        5. Implementing a network code for FPS
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        6. Loading a level
          1. How to do it...
          2. How it works...
        7. Interpolating between player positions
          1. How to do it...
          2. How it works...
        8. Firing over a network
          1. How to do it...
          2. How it works...
        9. Optimizing the bandwidth and avoiding cheating
          1. How to do it...
          2. How it works...
          3. See also
      15. 8. Physics with Bullet
        1. Introduction
        2. Creating a pushable door
          1. Getting ready
          2. How to do it...
          3. How it works...
        3. Building a rocket engine
          1. Getting ready
          2. How to do it...
          3. How it works...
        4. Ballistic projectiles and arrows
          1. Getting ready
          2. How to do it...
          3. How it works...
        5. Handling multiple gravity sources
          1. How to do it...
          2. How it works...
        6. Self-balancing using RotationalLimitMotors
          1. How to do it...
          2. How it works...
        7. The principles of a bridge-building game
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more…
        8. Networked physics
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more…
      16. 9. Taking Our Game to the Next Level
        1. Introduction
        2. Creating a muzzle flash using ParticleEmitter
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
        3. Creating a trigger system
          1. Getting ready
          2. How to do it...
          3. How it works...
        4. Creating a timer trigger
          1. How to do it...
          2. How it works...
        5. Adding an interaction trigger
          1. How to do it...
          2. How it works...
        6. Controlling AI with triggers
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
        7. Creating a dynamic skybox with a moving sun
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
        8. Improving a scene with postprocessing filters
          1. How to do it...
          2. How it works...
        9. Performing complex movements with MotionPaths
          1. How to do it...
          2. How it works...
          3. There's more...
        10. Cutscenes using cinematics
          1. Getting ready
          2. How to do it...
          3. How it works...
        11. Using a positional audio and environmental effects
          1. How to do it...
          2. How it works...
          3. There's more
      17. A. Information Fragments
        1. Introduction
        2. Downloading the plugins
        3. Enabling nightly builds
        4. Adding Bullet physics to the application
        5. Jaime animation frames for phonemes
        6. The AnimationEvent patch
        7. The ImageGenerator class
        8. The CellUtil class
      18. Index