3D Game Programming

(C. Jardin) #1

Contents • xii





    1. Project: Creating Simple Shapes Introduction. xv



    • 1.1 Programming with the ICE Code Editor

    • 1.2 Making Shapes with JavaScript

    • 1.3 Animating the Shapes

    • 1.4 The Code So Far

    • 1.5 What’s Next





    1. Playing with the Console and Finding What’s Broken.



    • 2.1 Getting Started

    • 2.2 Opening and Closing the JavaScript Console

    • 2.3 Debugging in ICE: The Red X

    • 2.4 Debugging in ICE: The Yellow Triangle

    • 2.5 Debugging in the Console

    • 2.6 Recovering When ICE Is Broken

    • 2.7 What’s Next





    1. Project: Making an Avatar



    • 3.1 Getting Started

    • 3.2 Making a Whole from Parts

    • 3.3 Breaking It Down

    • 3.4 Adding Feet for Walking

    • 3.5 Challenge: Make the Avatar Your Own

    • 3.6 Doing Cartwheels

    • 3.7 The Code So Far

    • 3.8 What’s Next





    1. Project: Moving Avatars



    • 4.1 Getting Started

    • 4.2 Building Interactive Systems with Keyboard Events

    • 4.3 Converting Keyboard Events into Avatar Movement

    • 4.4 Challenge: Start/Stop Animation

    • 4.5 Building a Forest with Functions

    • 4.6 Moving the Camera with the Avatar

    • 4.7 The Code So Far

    • 4.8 What’s Next





    1. Functions: Use and Use Again



    • 5.1 Getting Started

    • 5.2 Understanding Simple Functions

    • 5.3 When Things Go Wrong

    • 5.4 Weird Tricks with Functions

    • 5.5 The Code So Far

    • 5.6 What’s Next





    1. Project: Moving Hands and Feet



    • 6.1 Getting Started

    • 6.2 Moving a Hand

    • 6.3 Swinging Hands and Feet Together

    • 6.4 Walking When Moving

    • 6.5 The Code So Far

    • 6.6 What’s Next





    1. A Closer Look at JavaScript Fundamentals



    • 7.1 Getting Started

    • 7.2 Describing a Thing in JavaScript

    • 7.3 Changing Things

    • 7.4 Repeating and Skipping Code with while and if

    • 7.5 Listing Things

    • 7.6 What Makes JavaScript Different

    • 7.7 What’s Next





    1. Project: Turning Our Avatar



    • 8.1 Getting Started

    • 8.2 Facing the Proper Direction

    • 8.3 Breaking It Down

    • 8.4 Animating the Spin

    • 8.5 The Code So Far

    • 8.6 What’s Next





    1. What’s All That Other Code?.



    • 9.1 Getting Started

    • 9.2 A Quick Introduction to HTML

    • 9.3 Setting the Scene

    • 9.4 Using Cameras to Capture the Scene

    • 9.5 Using a Renderer to Project What the Camera Sees

    • 9.6 Exploring Different Cameras and Renderers

    • 9.7 What’s Next





    1. Project: Collisions



    • 10.1 Getting Started

    • 10.2 Rays and Intersections

    • 10.3 The Code So Far

    • 10.4 What’s Next





    1. Project: Fruit Hunt



    • 11.1 Getting Started

    • 11.2 Starting a Scoreboard at Zero

    • 11.3 Giving Trees a Little Wiggle

    • 11.4 Jumping for Points

    • 11.5 Making Our Games Even Better

    • 11.6 The Code So Far

    • 11.7 What’s Next





    1. Working with Lights and Materials



    • 12.1 Getting Started

    • 12.2 Changing Color

    • 12.3 Realism: Shininess

    • 12.4 Shadows

    • 12.5 Let’s Animate!

    • 12.6 The Code So Far

    • 12.7 What’s Next





    1. Project: Build Your Own Solar System



    • 13.1 Getting Started

    • 13.2 The Sun, Earth, and Mars

    • 13.3 Earth-Cam!

    • 13.4 The Code So Far

    • 13.5 What’s Next





    1. Project: Phases of the Moon



    • 14.1 Getting Started

    • 14.2 Change Mars into the Moon

    • 14.3 The Coolest Trick: Frame of Reference

    • 14.4 Challenge: Create an Earth Orbit Frame of Reference

    • 14.5 Pausing the Simulation

    • 14.6 Understanding the Phases

    • 14.7 The Code So Far

    • 14.8 What’s Next





    1. Project: The Purple Fruit Monster Game



    • 15.1 Getting Started

    • 15.2 Let’s Make Physics!

    • 15.3 Outline the Game

    • 15.4 The Code So Far

    • 15.5 What’s Next





    1. Project: Tilt-a-Board



    • 16.1 Getting Started

    • 16.2 Gravity and Other Setup

    • 16.3 Outline the Game

    • 16.4 The Code So Far

    • 16.5 What’s Next





    1. Project: Learning about JavaScript Objects



    • 17.1 Getting Started

    • 17.2 Simple Objects

    • 17.3 Copying Objects

    • 17.4 Constructing New Objects

    • 17.5 The Code So Far

    • 17.6 What’s Next





    1. Project: Cave Puzzle



    • 18.1 Getting Started

    • 18.2 Setting the Game’s Boundaries

    • 18.3 Building a Random, Unreachable Goal

    • 18.4 Building Draggable Ramps

    • 18.5 Winning the Game

    • 18.6 The Code So Far

    • 18.7 What’s Next





    1. Project: Multilevel Game



    • 19.1 Getting Started

    • 19.2 Building Levels

    • 19.3 Adding Finishing Touches to the Game

    • 19.4 The Code So Far

    • 19.5 What’s Next





    1. Project: River Rafting



    • 20.1 Getting Started

    • 20.2 Organizing Code

    • 20.3 Warping Shapes to Make Unique Things

    • 20.4 Build a Raft for Racing

    • 20.5 Setting the Finish Line

    • 20.6 The Code So Far

    • 20.7 What’s Next





    1. Getting Code on the Web



    • 21.1 The Mighty, Mighty Browser

    • 21.2 Free Websites

    • 21.3 Putting Your Code on Another Site

    • 21.4 What’s Next



  • A1. Project Code

    • A1.1 Code: Creating Simple Shapes

      • Broken A1.2 Code: Playing with the Console and Finding What’s



    • A1.3 Code: Making an Avatar

    • A1.4 Code: Moving Avatars

    • A1.5 Code: Functions: Use and Use Again

    • A1.6 Code: Moving Hands and Feet

    • A1.7 Code: A Closer Look at JavaScript Fundamentals

    • A1.8 Code: Turning Our Avatar

    • A1.9 Code: What’s All That Other Code?

    • A1.10Code: Collisions

    • A1.11Code: Fruit Hunt

    • A1.12Code: Working with Lights and Materials

    • A1.13Code: Build Your Own Solar System

    • A1.14Code: Phases of the Moon

    • A1.15Code: The Purple Fruit Monster Game

    • A1.16Code: Tilt-a-Board

    • A1.17Code: Learning about JavaScript Objects

    • A1.18Code: Cave Puzzle

    • A1.19Code: Multilevel Game

    • A1.20Code: River Rafting



  • A2. JavaScript Libraries Used in This Book.

    • A2.1 Three.js

    • A2.2 Physijs

    • A2.3 Tween.js

    • A2.4 Scoreboard.js

    • A2.5 Sounds.js

    • Index



Free download pdf