Intro to Programming Java with Games
March 2010, ©2010
1 Getting Started: What's in a Game?
1.1 Learning From Simple Computer Games.
1.2 What's In a Game?
1.3 Active and Passive: Rule Followers.
1.4 Running a Game.
1.5 Strategies: Winning a Game.
1.6 What Is in a Computer Program?
1.8 Chapter Review Exercises.
2 Designing Your First Program.
2.3 Creating Executable Programs.
2.4 Problem Solving.
2.6 Finishing Up BasketBall.
2.8 Chapter Review Exercises.
2.9 Programming Problems.
3 FANG: A Survey of Classes.
3.1 How Computers Work.
3.2 FANG Basics.
3.3 Examining a Public Protocol.
3.5 Chapter Review Exercises.
3.6 Programming Problems.
4 Deciding What Happens: if.
4.1 A Simplest Game.
4.2 Computer Program (Game) Design.
4.5 Finishing NewtonsApple.
4.7 Chapter Review Exercises.
4.8 Programming Problems.
5 Components: Names, Types, Expressions.
5.1 Chance in Games.
5.2 One More Sprite: CompositeSprite.
5.3 Java Types.
5.4 Calculating with the Computer.
5.5 Naming Things in Java.
5.6 Finishing EasyDice.
5.8 Chapter Review Exercises.
5.9 Programming Problems.
6 Rules: Methods, Parameters, and Design.
6.1 A Simple
6.2 Top-down Design.
6.3 Delegation: Methods.
6.4 Expressions Redux.
6.5 Finishing Up SoloPong.
6.7 Chapter Review Exercises.
6.8 Programming Problems.
7 Components Meet Rules: Classes.
7.1 Playing Together.
7.2 Abstraction: Defining New Types.
7.3 Finishing the Game.
7.5 Chapter Review Exercises.
7.6 Programming Problems.
8 Collections: ArrayList and Iteration.
8.1 Flu Pandemic Simulator.
8.2 Console I/O: The System Object.
8.4 Collections: One and Many.
8.5 ArrayList Is an Object.
8.6 Finishing the Flu Simulation.
8.8 Chapter Review Exercises.
8.9 Programming Problems.
9 Multidimensional Data Structures.
9.1 Rescue Mission.
9.3 Multidimensional Collections.
9.5 Finishing Rescue Mission.
9.7 Chapter Review Exercises.
9.8 Programming Problems.
10 Scanner and String: Character Input.
10.1 Designing Hangman.
10.2 Starting Programs.
10.3 Different Iteration.
10.4 String Manipulation.
10.5 Reading Files.
10.6 Finishing Hangman.
10.8 Chapter Review Exercises.
10.9 Programming Problems.
11 Console I/O: Games without FANG.
11.1 Another Dice Game: Pig.
11.2 Pure Console I/O.
11.3 Sorting a Collection.
11.4 Finishing Pig.
11.6 Chapter Review Exercises.
11.7 Programming Problems.
12 More Streams: Separating Programs and Data.
12.1 Outsmarting the Player: Twenty Questions.
12.2 Reading and Writing Files.
12.3 Data-driven Programs.
12.4 Encoding Objects to Read or Write Them.
12.5 Finishing the Game.
12.7 Chapter Review Exercises.
12.8 Programming Problems.
13 Lists of Lists and Collision Detection.
13.1 Designing BlockDrop.
13.2 Software Engineering: Managing Complexity.
13.3 When It's Safe to Move: Collision Detection.
13.4 Finishing BlockDrop.
13.6 Chapter Review Exercises.
13.7 Programming Problems.
14 String Processing: Interactive Fiction.
14.1 Back to the Future: Interactive Fiction.
14.2 Escape from T-Hall.
14.3 Reading the Data.
14.4 Attribute-Value Pairs.
14.5 Incremental Development.
14.6 Finding a Match.
14.7 Making It a Real Game.
14.9 Chapter Review Exercises.
14.10 Programming Problems.
A Java Language Keywords.
C Java Templates.
D FANG Color Names.
- The book teaches introductory computer science using computer games as the problem domain. The goal is to motivate students to experiment with code, to make changes just to see what happens.
- Each chapter develops a single computer game to motivate new concepts. Java constructs are introduced when needed.
- FANG – Freely Available Networked Game Engine is employed throughout the book. It was developed to support students in intro courses writing games from the first day of class.
- The current version of this open source platform is always available at www.fangengine.org, along with tutorials on integrating FANG in most modern integrated development environments.
- Delayed introduction of the “main” method: The FANG engine, using code based on the ACM’s Java Task Force’s “ACM Package” does not require students to have their own “main” method. Both applications and applets can be written without any “static” methods.
- Iteration deferred until the second half of the book. This is facilitated by FANG and the game loop. For more details, see the preface!
- Wiley E-Texts are powered by VitalSource technologies e-book software.
- With Wiley E-Texts you can access your e-book how and where you want to study: Online, Download and Mobile.
- Wiley e-texts are non-returnable and non-refundable.
- WileyPLUS registration codes are NOT included with the Wiley E-Text. For informationon WileyPLUS, click here .
- To learn more about Wiley e-texts, please refer to our FAQ.
- E-books are offered as e-Pubs or PDFs. To download and read them, users must install Adobe Digital Editions (ADE) on their PC.
- E-books have DRM protection on them, which means only the person who purchases and downloads the e-book can access it.
- E-books are non-returnable and non-refundable.
- To learn more about our e-books, please refer to our FAQ.