Introduction to Java Through Game Development: Learn Java Programming Skills by Working with Video Games
- Length: 263 pages
- Edition: 1
- Language: English
- Publisher: Apress
- Publication Date: 2022-12-08
- ISBN-10: 1484289501
- ISBN-13: 9781484289501
- Sales Rank: #2155746 (See Top 100 Books)
Interested in learning how to program with Java? Let’s face it, the best way to learn to program is by writing programs. This can be a daunting proposition with the specter of hours of simple command line example programs hanging over your head. Fear not! Now you can learn to program in Java in a fun way by working on video games.
With this book, you’ll get to work with three Java game projects and have access to the complete game code for each project, including a full Java game engine. After completing Introduction to Java through Game Development, you’ll be proficient in Java programming, having worked with the language’s fundamental aspects throughout the text, and will be ready to further your Java and game programming expertise with confidence.
What You’ll
- Master the fundamentals of the Java programming language
- Use different data structures like arrays, lists, stacks, and queues
- Understand game programming basics including the main game loop
- Gain experience working with three different game projects via the book’s coding challenges
- Work with the 2D game engine that powers the book’s included games and learn to create your own new game projects
- Understand advanced Java topics like classes, encapsulation, inheritance, and polymorphism
- Work with exceptions and how to use debugging techniques to trace through code
- Sharpen your skills with over a dozen coding challenges that test your abilities with a development task on a real game project
Who This Book Is For
This book requires little to no programming experience to understand and benefit from the text.
Table of Contents About the Author Introduction Chapter 1: Introduction About This Text Notes on Formatting Notes on Conventions Objectives Java Fundamental Topics Java Advanced Topics Game Development Topics Setting Up Your Environment Getting the Game Projects Setup Checking Out the Games Conclusion What We Covered Chapter 2: What Is Java Programming Computers and Programming Programming Computers Programming Languages Types of Programs/Programming The Java Programming Language The JRE The JDK Syntax and Semantics Basic Syntax Rules Keywords/Reserved Words Game Programming The Main Game Loop Program Structure Overview of Included Games Conclusion What We Covered Chapter 3: Variables Data Types Basic Data Types Using Basic Data Types Challenge: Basic Data Types Challenge Solution Advanced Data Types The var Keyword and Dynamic Typing Arrays Using Arrays Challenge: Arrays Challenge Solution Lists Using Lists Challenge: ArrayLists Challenge Solution Conclusion What We Covered Chapter 4: Expressions and Operators, Flow Control, and More on Variables Expressions and Operators Numeric Expressions Boolean Expressions Assignment Expressions Increment/Decrement Expressions Bitwise Expressions Bit-Shift Expressions Operators and Operator Precedence Flow Control If-Else Statements Switch Statements Try-Catch Statements Challenge: Flow Control Challenge Solution More on Variables Enumerations Very Basic Java Classes Casting and Conversion Challenge: Enumerations Challenge: Solution Conclusion What We Covered Chapter 5: More Data Structures Multidimensional Arrays Declaring Multidimensional Arrays Using Multidimensional Arrays Hashes Declaring Hashtables Using Hashtables Stacks Declaring Stacks Using Stacks Queues Parameterized Types and Data Structures Challenge: Stacks Challenge Solution Conclusion What We Covered Chapter 6: Looping and Iteration For Loops Basic For Loop For-Each Loop While Loops Basic While Loop Main Game Loop Do-While Loops Basic Do-While Loop Break and Continue Challenge: For-Each Loops Challenge Solution Conclusion What We Covered Chapter 7: Objects, Classes, and OOP Classes Fields Methods Static Members Constructors Challenge: The MmgBmp Class Challenge Solution Challenge: The ScreenGame Class Challenge Solution Advanced Class Topics Access Class Design Static Main Entry Point Challenge: Dungeon Trap’s Static Main Challenge Solution Conclusion What We Covered Chapter 8: Encapsulation, Inheritance, and Polymorphism Encapsulation Inheritance Challenge: Inheritance Challenge Solution Polymorphism Challenge: Polymorphism Challenge Solution Importing Class Libraries Video Game Project Structure Challenge: Create a New Game Project Challenge Solution Step 1: Create a New Project to Customize Step 2: Add the Default Project Libraries Step 3: Copy Over the Resource Folder Step 4: Copy Over the PongClone Java Classes Step 5: Configure Project Settings Step 6: Execute the Pong Clone Copy Conclusion What We Covered Chapter 9: Debugging Techniques Output Trace IDE Debugging Features Exceptions Handling Exceptions Defining Exceptions The Stack Trace Conclusion What We Covered Chapter 10: Conclusion Accomplishments Acknowledgments Where You Go from Here Saying Goodbye Index
Donate to keep this site alive
How to download source code?
1. Go to: https://github.com/Apress
2. In the Find a repository… box, search the book title: Introduction to Java Through Game Development: Learn Java Programming Skills by Working with Video Games
, sometime you may not get the results, please search the main title.
3. Click the book title in the search results.
3. Click Code to download.
1. Disable the AdBlock plugin. Otherwise, you may not get any links.
2. Solve the CAPTCHA.
3. Click download link.
4. Lead to download server to download.