Book description
Beginning Java 8 Games Development, written by Java expert and author Wallace Jackson, teaches you the fundamentals of building a highly illustrative game using the Java 8 programming language. In this book, you'll employ open source software as tools to help you quickly and efficiently build your Java game applications. You'll learn how to utilize vector and bit-wise graphics; create sprites and sprite animations; handle events; process inputs; create and insert multimedia and audio files; and more.
Furthermore, you'll learn about JavaFX 8, now integrated into Java 8 and which gives you additional APIs that will make your game application more fun and dynamic as well as give it a smaller foot-print; so, your game application can run on your PC, mobile and embedded devices.
After reading and using this tutorial, you'll come away with a cool Java-based 2D game application template that you can re-use and apply to your own game making ambitions or for fun.
Table of contents
- Cover
- Title
- Copyright
- Dedication
- Contents at a glance
- Contents
- About the Author
- About the Technical Reviewer
- Acknowledgments
- Introduction
-
Chapter 1: Setting Up a Java 8 Game Development Environment
- Prepare a Workstation for Java 8 Game Development
- Downloading Java JDK 8 and NetBeans 8.0
- Installing the Java 8 Software Development Environment
- Installing NetBeans IDE 8.0
- Installing New Media Content Production Software
- Other Open-Source Software Packages of Interest
- Organizing Quick Launch Icons in Your Taskbar Area
- Summary
-
Chapter 2: Setting Up Your Java 8 IDE: An Introduction to NetBeans 8.0
-
Primary Attributes of NetBeans 8.0: An Intelligent IDE
- NetBeans 8.0 Is Smart: Put Your Code Editing into Hyperdrive
- NetBeans 8.0 Is Extensible: Code Editing with Many Languages
- NetBeans 8.0 Is Efficient: Organized Project Management Tools
- NetBeans 8.0 Is User Interface Design Friendly: UI Design Tools
- NetBeans 8.0 Is not Bug Friendly: Squash Bugs with a Debugger
- NetBeans 8.0 Is a Speed Freak: Optimize the Code with a Profiler
- Creating Your Java 8 Game Project: The InvinciBagel
- Compiling Your Java 8 Game Project in NetBeans 8.0
- Running Your Java 8 Game Project in NetBeans 8.0
- Profiling Your Java 8 Game Project in NetBeans 8.0
- Summary
-
Primary Attributes of NetBeans 8.0: An Intelligent IDE
-
Chapter 3: A Java 8 Primer: An Introduction to Java 8 Concepts and Principles
- The Syntax of Java: Comments and Code Delimiters
- Java APIs: Using Packages to Organize by Function
- Java Classes: Logical Java Constructs to Build On
- Java Methods: Core Java Function Code Constructs
- Java Variables and Constants: Values in Data Fields
- Java Modifier Keywords: Access Control and More
- Java Data Types: Defining Data Type in Applications
- Java Operators: Manipulating Data in the Application
- Java Conditional Control: Decision Making or Loops
- Java Objects: Virtual Reality, Using Java Constructs
- Summary
- Chapter 4: An Introduction to JavaFX 8: Exploring the Capabilities of the Java 8 Multimedia Engine
-
Chapter 5: An Introduction to Game Design: Concepts, Multimedia, and Using Scene Builder
- High-Level Concept: Static vs. Dynamic
- Game Optimization: Balancing Static Elements with Dynamic
- Game Design Concepts: Sprites, Physics, Collision
- Types of Games: Puzzles, Board Games, Arcade Games, Hybrids
- Game Design Assets: New Media Content Concepts
- JavaFX Scene Builder: Using FXML for UI Design
- Summary
-
Chapter 6: The Foundation of Game Design: The JavaFX Scene Graph and the InvinciBagel Game Infrastructure
- Game Design Foundation: Primary Function Screens
- Java Class Structure Design: Game Engine Support
- JavaFX Scene Graph Design: Minimizing UI Nodes
-
JavaFX UI Classes: HBox, Pos, Insets, and ImageView
- The JavaFX Pos Class: Generalized Screen Position Constants
- The JavaFX Insets Class: Providing Padding Values for Your UI
- The JavaFX HBox Class: Using a Layout Container in a Design
- The JavaFX Image Class: Referencing Digital Images in a Design
- JavaFX ImageView Class: Displaying Digital Images in a Design
- The JavaFX TableView Class: Displaying Data Tables in a Design
- Scene Graph Nodes: .createSplashScreenNodes( )
- Testing the InvinciBagel Application: Pulse the Scene Graph
- Finishing an InvinciBagel UI Screen Design: Add Images
- Interactivity: Wiring the InvinciBagel Buttons for Use
- Summary
-
Chapter 7: The Foundation of Game Play Loop: The JavaFX Pulse System and the Game Processing Architecture
- Game Loop Processing: Harnessing a JavaFX Pulse
- Creating a New Java Class: GamePlayLoop.java
- Creating the GamePlayLoop Class Structure: Implementing Your .handle( ) Method
- Creating a GamePlayLoop Object: Adding Pulse Control
- Profiling the GamePlayLoop Object: Running NetBeans Profiler
- Controlling Your GamePlayLoop: .start( ) and .stop( )
- InvinciBagel Diagram: Package, Classes, and Objects
- Testing the GamePlayLoop: Animating the UI Container
- Profiling the GamePlayLoop: Pulse Engine
- Summary
- Chapter 8: Creating Your Actor Engine: Design the Characters for Your Game and Define Their Capabilities
-
Chapter 9: Controlling Your Action Figure: Implementing Java Event Handlers and Using Lambda Expressions
- Game Surface Design: Adding Resolution Flexibility
- Finishing the UI Design: Coding a Game Play Button
- Lambda Expression: A Powerful New Java 8 Feature
- Event Handling: Adding Interactivity to Your Games
- Java 8 and JavaFX Events: javafx.event and java.util
- Adding Keyboard Event Handling: Using KeyEvents
- Adding Alternate KeyEvent Mapping: Using A-S-D-W
- Updating Our Game Design: Adding Event Handling
- Summary
- Chapter 10: Directing the Cast of Actors: Creating a Casting Director Engine and Creating the Bagel Actor Class
-
Chapter 11: Moving Your Action Figure in 2D: Controlling the X and Y Display Screen Coordinates
-
InvinciBagel.java Redesign: Adding Logical Methods
- The Scene Event Handling Method: .createSceneEventHandling()
- Adding InvinciBagel: Declare Image, Bagel, and CastingDirector
- The Actor Image Assets Loading Method: .loadImageAssets()
- Creating Your InvinciBagel Bagel Object: .createGameActors()
- Adding Your iBagel to the Scene Graph: .addGameActorNodes()
- Creating and Managing Your Cast: .createCastingDirection()
- Create and Start Your GamePlayLoop: .createStartGameLoop
- Update Splashscreen Scene Graph: .createSplashScreenNodes()
- Powering the iBagel Actor: Using the GamePlayLoop
- Testing Our New Game Design: Moving InvinciBagel
- Summary
-
InvinciBagel.java Redesign: Adding Logical Methods
- Chapter 12: Setting Boundaries for Your Action Figure in 2D: Using the Node Class LocalToParent Attribute
-
Chapter 13: Animating Your Action Figure States: Setting the Image States Based on KeyEvent Processing
-
InvinciBagel Animation: The .setImageState( ) Method
- The InvinciBagel Wait State: If No Key Pressed Set imageState(0)
- The InvinciBagel Run State: If KeyPressed Set imageState(1 & 2)
- The InvinciBagel Fly State: If KeyPressed Set imageState(3 & 4)
- Mirroring Sprites: Quadrupling Your Image Assets from 9 to 36
- Animating Your Run Cycle: Creating a Nested If-Else Structure
- Coding Your Run Cycle Throttle: Triple Nested If-Else Structures
- Adding Event Handling: Giving ASDW Keys Function
- Last Minute Details: Setting the isFlipH Property
- Summary
-
InvinciBagel Animation: The .setImageState( ) Method
- Chapter 14: Setting Up the Game Environment: Creating Fixed Sprite Classes Using the Actor Superclass
- Chapter 15: Implementing Game Audio Assets: Using the JavaFX AudioClip Class Audio Sequencing Engine
-
Chapter 16: Collision Detection: Creating SVG Polygons for the Game Actors and Writing Code to Detect Collision
- The SVG Data Format: Hand Coding Vector Shapes
- Creating and Optimizing Collision Data: Using GIMP
- Creating and Optimizing Physics Data: Using PhysEd
- Replacing Dummy Collision Data: InvinciBagel.java
- Bagel Class Collision Detection: .checkCollision( )
- Locating a Node Object: Using the Bounds Object
- Using Shape Class Intersect: The .intersect( ) Method
- Overriding the Abstract Hero Class: .collide( ) Method
- Optimizing the Scene Graph: Using the Group Class
- Creating a Scoring Engine Method: .scoringEngine( )
- Summary
-
Chapter 17: Enhancing Game Play: Creating a Scoring Engine, Adding Treasure and an Enemy Auto-Attack Engine
- Creating the Score UI Design: Text and Font Objects
- Creating the Scoring Engine Logic: .scoringEngine( )
- Adding Bounty to the Game: The Treasure.java Class
- Adding Enemies: The Enemy and Projectile Classes
- Adding a Background Image: Using .toBack( ) Method
- Using Random Number Generators: java.util.Random
- Mounting the Attack: Coding the Enemy Onslaught
-
Weaponizing the Enemy: Shooting Projectile Objects
- Creating a Projectile Infrastructure: Adding Projectile Variables
- Invoking a .shootProjectile() Method: Setting shootBullet to True
- Shooting Projectiles: Coding the .shootProjectile( ) Method
- Making the Enemy Pause Before Firing: pauseCounter Variable
- Shoot the Bullet: Pulling the Trigger Using the launchIt Variable
- Update the .scoringEngine( ) Method: Using .equals( )
- Adding Bullets to a Clip: Updating .addCurrentCast( )
- Shooting Cream Cheese Balls: Different Bullet Types
- Tweaking a Game: Fine-Tuning the User Experience
- Adding Gravity to the Bullets: Intro to Game Physics
- Summary
- Index
Product information
- Title: Beginning Java 8 Games Development
- Author(s):
- Release date: December 2014
- Publisher(s): Apress
- ISBN: 9781484204153
You might also like
book
Java EE 8 Development with Eclipse
Develop and deploy fully functional applications and microservices utilising Tomcat, Glassfish servers, Cloud and docker in …
video
Debugging Java and Scala
For engineers, architects, and DevOps teams, distributed architectures and reactive applications make pinpointing and fixing production …
book
Beginning Java 8 APIs, Extensions and Libraries Swing, JavaFX, JavaScript, JDBC and Network Programming APIs
completes the Apress learning Java journey and is a comprehensive approach to learning the Java programming …
book
Java Game Development with LibGDX: From Beginner to Professional
Learn to design and create video games using the Java programming language and the LibGDX software …