## With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

No credit card required

## Book Description

Visual Basic Game Programming for Teens, Third Edition teaches teens and other beginners how to create their own 2D role-playing game (RPG) using the free to download and easy to use Visual Basic 2008 Express. The game is built step-by-step throughout the book as readers learn new skills and build upon them. This new edition features almost entirely new content from the previous edition and readers will also learn game tool creation, animation skills, and graphics programming.

## Table of Contents

1. Copyright
2. Acknowledgments
3. About the Author
4. Introduction
1. Pacing and Experience
2. Contacting the Author
3. Book Contents
4. Conventions Used in This Book
5. Companion Website Downloads
5. I. Building Blocks
1. 1. Getting Started
1. What Is Game Programming Really All About?
2. On Creativity, Talent, and Hard Work
3. Taking a Look at Celtic Crusader
4. Level Up!
2. 2. Visual Basic Primer
1. What Is Visual Basic?
2. Writing Your First Visual Basic Program
3. Variables of All Types
1. Using Variables
2. What’s So Special about Strings?
3. Telling Time
4. Branching/Conditional Statements
1. The If... Then Statement
2. The Select ... Case Statement
3. Guessing Game
5. Subroutines and Functions
6. Mathematical Operators
1. Converting Data
2. Addition and Subtraction
3. Multiplication and Division
4. Math Quiz
7. Relational Operators
8. Looping Statements
9. Arrays
10. Structures
11. Object-Oriented Programming
1. Encapsulation
2. Inheritance
3. Polymorphism
4. Properties
5. Classes
12. Level Up!
3. 3. Forms and Controls
1. Dice War
2. Block Buster
3. Tic-Tac-Toe
4. Level Up!
4. 4. Drawing with GDI+
1. Drawing Lines
2. Drawing Rectangles
3. Drawing Text
4. Level Up!
5. 5. Bitmaps: Our First Building Block
1. Dissecting Bitmaps
2. Creating a Game Class
3. Level Up!
6. 6. Sprites and Real-Time Animation
1. What Is a Sprite?
2. Animating a Sprite
3. Sprite Drawing Demo
4. Level Up!
7. 7. Collision Detection
1. Reacting to Solid Objects
2. Collision Demo Program
3. Level Up!
8. 8. Playing Sound Effects and Music
1. Programming Audio
2. Using the Media Player Control
3. Level Up!
6. II. Game World
1. 9. Designing the Game of Celtic Crusader
1. The Quest-Based Storyline
2. Designing the RPG World
1. Map of the World
2. Regions
3. The Player’s Character
1. Character Attributes (Stats)
2. Character Status
3. Character Classes
4. Non-Player Characters
5. Weapons and Armor
6. Magic
7. Communication
8. Combat
9. Level Up!
2. 10. Creating the Level Editor
1. Designing Our Own Level Editor
1. Building the Editor
2. Creating a New Tilemap Level
3. Loading and Saving Level Files
2. Level Up!
3. 11. Rendering a Game Level
1. Mapping the Game World
2. Introduction to Tiled Scrolling
3. Per-Tile Scrolling
4. Per-Pixel Scrolling
5. Level Up!
4. 12. Adding Objects to the World
1. Adding Scenery to the Game World
1. A New Game Loop
2. New Level Class
3. Adding Trees
2. Adding an Animated Character
3. Level Up!
5. 13. Using Portals to Expand the World
1. Updating the Level Editor
2. It’s a Data-Driven Game World
3. Adding Lua Scripting Support to the Game
4. Level Up!
7. III. Gameplay
1. 14. Creating the Character Editor
1. Character Classes and Attributes
1. Attributes
2. Gaining Experience and Leveling Up
3. The Base Character Classes
4. Peasants as Quest-Giving NPCs
5. The Enemy/Monster Classes
2. The Character Editor
3. Loading Character Files
4. Level Up!
2. 15. Dialogue: Talking with NPCs
1. Talking with NPCs
2. Creating the Dialogue System
1. Making Eye Contact
2. Dialogue GUI
3. Final Example
3. Level Up!
3. 16. Fighting, Getting XP, and Leveling Up
1. Preparing for Combat
2. Character Templates
1. Animations: Player Characters (PCs)
2. Animations: Hostile NPCs
3. Animations: Friendly NPCs
3. Creating the Combat System
1. Making Up Our Own Rules
2. Attack Rolls
3. Rolling for Damage
4. Attack Roll Example
5. Dealing with the Player’s Death
6. Combat Demo 2
4. Facing Your Enemies
5. State-Based Combat
6. Dealing Permanent Damage
7. Level Up!
4. 17. Creating the Item Editor
1. Item Editor Design
2. Level Up!
5. 18. Looting Treasure and Managing Inventory
1. Looting Treasure
2. Managing Inventory
3. Level Up!
6. 19. Creating the Quest Editor
1. Quests as Data
2. Quests as Story Driver
1. Quests Class
2. Quest Window
3. Completing a Quest
3. Level Up!
7. 20. So You Want to Be a Hero?
1. Rolling Your Player Character
2. Scripting
3. Loading and Saving the Game
4. Level Up!