You are previewing 3D Game Programming for Teens, Second Edition.
O'Reilly logo
3D Game Programming for Teens, Second Edition

Book Description

Do you love video games? Do you want to learn how to make them yourself? Welcome to 3D Game Programming for Teens, Second Edition, a how-to resource for anyone interested in creating a video game. Written specifically for beginners in an easy-to-follow way, the book teaches you basic programming, graphic design, and 3D modeling so that you can design and develop your very own games. You'll begin with an introduction to some simple programming concepts using the Blitz3D language. Then you'll learn about graphics creation for games using CorelDRAW and PHOTOPAINT. Finally you'll explore basic 3D modeling with Autodesk 3ds Max, and you'll learn how to enhance your games with sound effects, collisions, and more. 3D Game Programming for Teens, Second Edition walks you through the game programming process step-by-step, with each new technique building upon the previous ones. The final chapter of the book shows you how to put all your new knowledge together and build your own full game! All you need to get started are some basic computer skills and a love of games. No previous programming experience required!

Table of Contents

  1. Copyright
  2. Acknowledgments
  3. About the Author
  4. Introduction
  5. The Basics of BASIC
    1. Getting Started
      1. A Brief History of BASIC
      2. The First Program: Jumping Cone!
      3. The First Program: Jumping Cone
      4. Summary
    2. Getting to Know Basic
      1. Hello, World!
      2. Variables
      3. Input
      4. Conditionals
      5. Logical Operators
      6. The Goto Command
      7. A Text-Based Guessing Game
      8. Summary
    3. Loops, Functions, Arrays, and Types
      1. Understanding Loops
      2. Understanding Functions
      3. Understanding Arrays
      4. Using Types
      5. Putting It All Together: Textanoid!
      6. Summary
    4. The Style Factor
      1. Developing Style
      2. Comments
      3. Function and Variable Names
      4. Summary
  6. Getting into Graphics
    1. Shapes and Objects
      1. Understanding the 3D World
      2. Creating Basic Shapes
      3. Creating a Cone
      4. Creating Multiple Cones
      5. Creating Cubes, Cylinders, and Spheres
      6. Segments
      7. Resizing and Reshaping Objects
      8. Resizing or Scaling
      9. Reshaping
      10. Flipping an Object
      11. Coloring
      12. Wireframe
      13. Transparency
      14. Textures and Texture Mapping
      15. Applying Image Textures
      16. Scaling Textures
      17. Object Order
      18. Summary
    2. Controlling Objects
      1. Moving Objects
      2. Rotating Objects
      3. Rotating Objects on Their Own
      4. Orbiting (a.k.a. Pivoting)
      5. Summary
    3. Lights and Cameras
      1. Working with Cameras
      2. Creating and Positioning a Camera
      3. Rotating a Camera
      4. Using Two Cameras
      5. Switching Cameras Virtually
      6. Splitting Views
      7. Zooming
      8. Camera Movement
      9. Following an Object
      10. Light
      11. Types of Lights
      12. Light Range
      13. Summary
    4. Getting Graphic
      1. Heightmaps
      2. Creating Heightmaps with Textured Fills
      3. Creating Heightmaps with a Brush
      4. Creating Heightmaps with Effects
      5. Creating Textures
      6. Walls
      7. Terrains and Skies
      8. Creating Terrains with Texture Fills
      9. Wood
      10. Creating Terrains with Effects
      11. Information Screens
      12. Welcome Screen
      13. Pause Screen
      14. Summary
  7. Getting More Advanced
    1. Setting the Stage
      1. Creating a Terrain
      2. Positioning a Terrain
      3. Changing the Terrain Color
      4. Applying a Texture to a Terrain
      5. Changing the Size of a Terrain
      6. Creating a Plane
      7. Applying a Heightmap
      8. Shapes as Environments
      9. Going Inside Shapes
      10. Using Shapes with Terrains
      11. Summary
    2. 3D Modeling
      1. Creating a Bottle
      2. Creating the Outline
      3. Lathing the Bottle
      4. Exporting the Bottle
      5. Creating a Missile
      6. Creating the Missile Body
      7. Creating the Wings
      8. Exporting the Missile
      9. Importing Models into Blitz3D
      10. Summary
    3. Collisions
      1. Creating a Collision
      2. Collision Code
      3. Colliding Objects
      4. Collision Radius
      5. Shields Down!—Clear Collisions
      6. Collision Effects
      7. Poof! Now You See It, Now You Don’t
      8. Blowing Up Stuff
      9. Other Collision Commands
      10. Summary
    4. Sounds
      1. Sounds
      2. Loading and Playing Sounds
      3. Adjusting Volume
      4. Adjusting Pitch
      5. Adjusting Pan
      6. Summary
    5. Other 3D Game Components
      1. Gravity
      2. Simple Jumping
      3. Velocity
      4. Chase Camera
      5. Mirror
      6. Timing
      7. Text
      8. Adding and Positioning Text
      9. Adding Text Variables
      10. Setting Font Size and Appearance
      11. Freeing Fonts
      12. Math
      13. Random
      14. Guns and Bullets
      15. Positioning a First–Person Shooter Gun
      16. Bullets
      17. Pausing
      18. Welcome Screens
      19. Summary
    6. Putting It All Together
      1. Planning the Game—“3D Gallery”
      2. Files for the Game
      3. Creating the Water Texture
      4. Welcome Screen
      5. Setting Up the Graphic Elements and Camera
      6. Setting Up the Game Elements
      7. Creating the World
      8. Gallery Items
      9. Creating the Guns and Bullets
      10. Game Control and Gravity
      11. Moving Targets
      12. Firing Bullets
      13. Pausing the Game
      14. Creating Collisions
      15. Changing the Gallery
      16. Destroying Gallery Items
      17. Reloading Bullets
      18. Score
      19. Time Remaining
      20. Ending the Game
      21. Text
      22. Sounds
      23. Epilogue
  8. Appendix Scan Code Reference
  9. Index