100% found this document useful (4 votes)
39 views

Instant ebooks textbook Windows Game Programming with Visual Basic and DirectX 1st Edition Freeze download all chapters

Programming

Uploaded by

rejehbalees
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (4 votes)
39 views

Instant ebooks textbook Windows Game Programming with Visual Basic and DirectX 1st Edition Freeze download all chapters

Programming

Uploaded by

rejehbalees
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 81

Download the full version of the ebook at

https://ebookultra.com

Windows Game Programming with Visual Basic


and DirectX 1st Edition Freeze

https://ebookultra.com/download/windows-game-
programming-with-visual-basic-and-directx-1st-
edition-freeze/

Explore and download more ebook at https://ebookultra.com


Recommended digital products (PDF, EPUB, MOBI) that
you can download immediately if you are interested.

Introduction to 3D Game Programming with DirectX 11 1st


Edition Frank Luna

https://ebookultra.com/download/introduction-to-3d-game-programming-
with-directx-11-1st-edition-frank-luna/

ebookultra.com

Advanced 3D Game Programming with DirectX 10 0 Wordware


Game and Graphics Library 1st Edition Peter Walsh

https://ebookultra.com/download/advanced-3d-game-programming-with-
directx-10-0-wordware-game-and-graphics-library-1st-edition-peter-
walsh/
ebookultra.com

Special Effects Game Programming with DirectX The Premier


Press Game Development Series 1st Edition Mason Mccuskey

https://ebookultra.com/download/special-effects-game-programming-with-
directx-the-premier-press-game-development-series-1st-edition-mason-
mccuskey/
ebookultra.com

DirectX 11 1 Game Programming 1st Edition Pooya Eimandar

https://ebookultra.com/download/directx-11-1-game-programming-1st-
edition-pooya-eimandar/

ebookultra.com
Programming Role Playing Games with DirectX Game
Development Series 2nd Edition Jim Adams

https://ebookultra.com/download/programming-role-playing-games-with-
directx-game-development-series-2nd-edition-jim-adams/

ebookultra.com

Programming with Microsoft Visual Basic 2012 6th Edition


Diane Zak

https://ebookultra.com/download/programming-with-microsoft-visual-
basic-2012-6th-edition-diane-zak/

ebookultra.com

Programming the Web with Visual Basic NET 1st Edition Lynn
Torkelson

https://ebookultra.com/download/programming-the-web-with-visual-basic-
net-1st-edition-lynn-torkelson/

ebookultra.com

An introduction to programming using Visual Basic 2008


with Visual Studio Expression edition DVD Schneider

https://ebookultra.com/download/an-introduction-to-programming-using-
visual-basic-2008-with-visual-studio-expression-edition-dvd-schneider/

ebookultra.com

Practical Database Programming with Visual Basic NET


Second Edition Ying Bai(Auth.)

https://ebookultra.com/download/practical-database-programming-with-
visual-basic-net-second-edition-ying-baiauth/

ebookultra.com
Windows Game Programming with Visual Basic and
DirectX 1st Edition Freeze Digital Instant Download
Author(s): Freeze, Wayne S
ISBN(s): 9780789725929, 0789725924
Edition: 1
File Details: PDF, 37.57 MB
Year: 2001
Language: english
00 0789725924 FM 11/21/01 12:54 PM Page i

Contents at a Glance
Introduction 1

I Diving into the Game 11


1 Developing an Idea into a Game 13
2 Introducing DirectX 23
3 Creating 3D Graphics 49

Windows
4 Turning 2D Graphics into 3D Graphics 71
®
5 Loading Mall Information 89
6 Displaying 3D Graphics 111

Game II Simulating Reality 133


7
8
Random Numbers Ain’t Random 135
Simulating Reality 153

Programming 9
10
11
Simulating the Mall 173
Simulating Customers 193
Simulating Stores and Money 211

with Visual III Making the Game Fun 227


12 Controlling the Mall with DirectInput 229

Basic and 13
14
15
Commanding the Game 247
Attention, Shoppers 271
A Map and Customers 293

DirectX 16 Walking Through the Mall 309

IV Finishing the Game 325


17 The Mall Strait Journal 327
Wayne S. Freeze 18 Running the Mall 345
19 The End of the Beginning 365

Index 383

201 W. 103rd Street


Indianapolis, Indiana 46290
00 0789725924 FM 11/21/01 12:54 PM Page ii

Windows® Game Programming with Visual Publisher


David Culverwell
Basic and DirectX
Executive Editor
Copyright © 2002 by Que Candace Hall
All rights reserved. No part of this book shall be repro- Acquisitions Editor
duced, stored in a retrieval system, or transmitted by any Michelle Newcomb
means, electronic, mechanical, photocopying, recording, Development Editor
or otherwise, without written permission from the pub- Howard Jones
lisher. No patent liability is assumed with respect to the Managing Editor
use of the information contained herein. Although every Thomas F. Hayes
precaution has been taken in the preparation of this book,
Senior Editor
the publisher and author assume no responsibility for Susan Ross Moore
errors or omissions. Nor is any liability assumed for dam-
Copy Editor
ages resulting from the use of the information contained
Kate O. Givens
herein.
Indexer
International Standard Book Number: 0-7897-2592-4 Angie Bess
Library of Congress Catalog Card Number: 2001096458 Proofreaders
Marcia Deboy
Printed in the United States of America Maribeth Echard
First Printing: December 2001 Technical Editor
Micheal McDonald
05 04 03 02 4 3 2 1
Team Coordinator
Trademarks Cindy Teeters
Media Developer
All terms mentioned in this book that are known to be
Michael Hunter
trademarks or service marks have been appropriately capi-
talized. Que cannot attest to the accuracy of this informa- Interior Designer
Ruth Harvey
tion. Use of a term in this book should not be regarded as
affecting the validity of any trademark or service mark. Cover Designers
Dan Armstrong
Warning and Disclaimer Ruth Harvey

Every effort has been made to make this book as complete Page Layout
Susan Geiselman
and as accurate as possible, but no warranty or fitness is
Brad Lenser
implied. The information provided is on an “as is” basis. Michelle Mitchell
The author and the publisher shall have neither liability
nor responsibility to any person or entity with respect to
any loss or damages arising from the information con-
tained in this book or from the use of the CD or programs
accompanying it.
00 0789725924 FM 11/21/01 12:54 PM Page iii

Table of Contents 2 Introducing DirectX 23

Understanding DirectX 24
Why DirectX? 24
I Diving into the Game DirectX Services 25

Introduction Introducing 3D Graphics 27


The 2D Coordinate System 27
Creating a Computer Game 2 The 3D Coordinate System 27
Types of Games 3 The World Is Made of Triangles 28
Visual Basic 3 Drawing Lots of Triangles 29
DirectX 4 Colors 30
Introducing Swim Mall 4 Lights and Viewpoints 30

Your Challenge 5 I’m a Little Teapot 31


Installing DirectX 32
Who Should Read This Book 5
Starting the Program 33
System Requirements 5 Initializing DirectX Objects 35
Initializing Direct3D 37
What This Book Covers 6 Setting Lights 41
Creating a 3D Object 43
What This Book doesn’t Cover 7
Displaying Graphics 43
Conventions Used in This Book 7 Rendering the Scene 44

Questions and Comments 8 Final Thoughts 47

Other Resources 8 3 Creating 3D Graphics 49

1 Developing an Idea into a Game 13 Introducing Caligari trueSpace 50

Designing the Game 14 Introducing Adobe Photoshop and


Illustrator 51
Game Design Document for Swim
Mall 15 Constructing 3D Graphics 51
Philosophy 15 Basic Concepts 51
Story 16 Using trueSpace 52
Technical Features 16 trueSpace Tools 53
Game Objects 17
Creating a Mall 55
User Interaction 18
Designing a Mall 55
Simulation Engine’s Control 20
Creating an Empty Mall 56
Game Variables 21
Cheat Codes 21 Final Thoughts 69
Easter Eggs 22

Final Thoughts 22
00 0789725924 FM 11/21/01 12:54 PM Page iv

iv Windows Game Programming with Visual Basic and DirectX

4 Turning 2D Graphics into 3D 6 Displaying 3D Graphics 111


Graphics 71
Initializing Graphics Information 112
Creating 2D Graphics 72
Loading Your Mall 113
Tweaking Images with Photoshop 72 Initializing DirectX 113
Introducing Photoshop 73 Loading a 3D Object into Memory 115
Editing Images 74
Using Layers 76 Displaying Graphic Information 118
Extracting Parts of an Image 78
Rendering Your Mall 119
Running Filters and More 79
The Main Loop 119
Creating a Store 81 Rendering Direct3D Graphics 119
Creating a Simple Texture with Displaying Text on the Screen 124
Photoshop 81
Selecting Objects Using the DXGraphics
Creating a Complex Texture with Class 127
Photoshop 84 Detecting a Mouse Click 127
Creating an Empty Store with Checking Each 3D Object 127
trueSpace 85 Checking a Particular Object 128
Final Thoughts 88 Running the Program 130

5 Loading Mall Information 89 Final Thoughts 131

Design Details 90
Disk-Based Structures 90 Part II Simulating Reality
Swim Mall File Format 92
Memory-Based Structures 94 7 Random Numbers Ain’t Random 135
Loading a Saved Game 94 Defining a Random Number 136
The Game Class 94
Using the Game Class 95 Random Numbers and Computers 136
Module Variables in the Game
Creating Random Numbers 138
Class 96
Inside the LoadGame Method 97 Random Numbers and Visual Basic 139
Extracting Data from the Saved Game Randomize and Rnd 139
File 98 Generating Random Numbers with
Reading Data Using the SwimFile Rnd 140
Class 101 Rolling Dice 141
Loading Mall and Store
Information 103 Ranges of Random Numbers 143
Creating Stores and other Mall Scaling Continuous Random
Items 105 Numbers 143
Anchor Properties 108 Creating Discrete Random
Managing Collections of Anchors 108 Numbers 145

Final Thoughts 110


00 0789725924 FM 11/21/01 12:54 PM Page v

Contents v

Distribution of Random Numbers 145 9 Simulating the Mall 173


Uniform Distribution 145
Non-Uniform Distribution 145 Understanding the Simulation 174
Creating Discrete Non-Uniform
Building the Simulation Framework 174
Random Numbers 146
Running the Simulation 175
Creating Continuous Non-Uniform
Stepping the Simulation 175
Random Numbers 148
Stepping Inside the Mall 177
Creating Non-Uniform Random
Controlling Simulation Speed 179
Numbers 149
Communities and Competitors 180
Final Thoughts 151
Building a Community 180
Fostering Competition 182
8 Simulating Reality 153
Initializing the Simulation 183
Introducing Simulations 154
Key Mall Indicators 184
Simulations and Models 154
Loading Mall Hours 184
Types of Simulations 155
Monitoring the Mall 185
Parts of a Simulation Model 155
Clients, Servers, and Queues 155 Final Thoughts 190
Wait and Service Times 156
Arrival Rates 156 10 Simulating Customers 193
Multiple Servers and Queues 157
Complex Simulations 158 The Customer Class 194
Other Variations on Queues 158 Customer Needs 195
Food Needs 196
The Master Clock 159 Counting Needs 197
Incremental Clock 159 When Do Customers Arrive? 198
Event-Driven Clock 160 Creating Customers 199

Simulation Statistics 161 Picking the Best Mall 201

Programming Simulations 161 Priority Queues 204


Random Number Generators 162 Restructuring the Queue 204
Queues 162 Adding Items to the Queue 205
People in the Mall 164
The Kelp-Fil-A Store 164 Simulating the Customer in the Mall 206
Running the Simulation 164 Designing a Finite State Machine 206
Initializing the Simulation 165 Implementing the Finite State
A Second in the Simulation 166 Machine 207
Creating a Customer 168
Final Thoughts 209
Updating the Master Clock 168
Displaying Final Statistics 169
Running the Simulation with a
Timer 169

Final Thoughts 171


00 0789725924 FM 11/21/01 12:54 PM Page vi

vi Windows Game Programming with Visual Basic and DirectX

11 Simulating Stores and Money 211 13 Commanding the Game 247

Stores and Needs 212 Running the Game 248


Moving Around the Mall 248
Storing Store Information 212 Controlling Speed 249
Customers and Stores 213 Selecting Stores 249
Finding a Store 213 Using Menu Commands 249
Arriving at a Store 216 Running Commands 249
Computing the Departure Time 216
Departing a Store 216 Managing Game State 251

Housekeeping for the Store 217 New Graphic Functions 251


Ending the Day 218
Ending the Month 218 Creating Commands 253

Displaying Information for a Store 218 Converting Keyboard Information into


Commands 254
Managing the Mall’s Money 221
Converting Mouse Information into
Collecting Rent 221
Commands 257
Ending the Month for the Mall 222
Ending the Store’s Year 224 Executing Commands 260
Ending the Mall’s Year 225 Modifying the Main Loop 260
Running Commands 260
Final Thoughts 226
Running Commands in the Okay
State 261
Part III: Making the Game Fun Running Commands in the Normal
State 261
12 Controlling the Mall with
DirectInput 229 Displaying 2D Information 263
Drawing a Cursor 264
Exploring DirectInput 230 Drawing a Pop-Up Message 266

Using DirectInput 230 Final Thoughts 269

Integrating DirectInput into Swim


14 Attention, Shoppers 271
Mall 231
Sounds in the Mall 272
Initializing DirectInput 231
Initializing DirectInput 232 Introducing DirectX Audio 272
Handing DirectInput Events 236 Integrating Sounds into Swim Mall 273
Collecting Keystrokes 236
Converting Scan Codes to ASCII 239 Initializing DXAudio 273
Tracking the Mouse 239
Playing Background Music 275
Mouse Recovery 244 Loading the Background Music
Files 275
Ending DirectInput 245 Starting the Background Music 276
Final Thoughts 245
00 0789725924 FM 11/21/01 12:54 PM Page vii

Contents vii

Stopping the Music 278 Walking Through the Mall 313


Pausing the Background Music 278 Managing Cells 313
Resuming the Background Music 279 Finding an Entrance 314
Setting the Background Music’s Finding an Open Cell 315
Volume 279 Finding a Nearby Cell 316
Guiding Customers 317
Foreground Sounds 280 Walking a Customer 320
Polling for Music 281 Walking to a Store 321
Walking in the Store 322
Creating Sounds 282 Leaving the Mall 323
Sound Formats 282 Rotating a Customer 323
Finding Sounds 283
Introducing Cool Edit 2000 283 Final Thoughts 324
Digitizing Sounds 284
Recording a Waveform 285
Part IV: Finishing the Game
Editing a Waveform 286
Managing Waveform Files 288
17 The Mall Strait Journal 327
Filtering Sounds 288
Reading the Mall Strait Journal 328
Final Thoughts 290
Saving News Articles 328
Writing News Articles 329
15 A Map and Customers 293
Getting the News 331
Mapping the Mall 294 Printing the Newspaper 332
Displaying the Newspaper 332
Building the Map 294 Flipping Through the Pages 334
Defining the Map 294
Loading Map Information 297 Borrowing Money from the Bank 334
Initializing the Map 299 Borrowing Money 335
Marking Areas 300 Inputting Strings 335
Debugging the Map 301 Displaying an Input Box 336
Controlling the Input Box 338
Creating Customers 302
Creating Skin and Bones 302 Raymond Speaks 339
Coloring the Eyes 306 Speech Synthesis 340
Saving Your Fish 307 Standard Speeches 340
Making Raymond Talk 341
Final Thoughts 308 Tracking Raymond’s Speech 342
Showing Raymond 342
16 Walking Through the Mall 309
Final Thoughts 344
Drawing Customers 310
Loading Customer Meshes 310
Customer Changes 311
Customer Queue Changes 311
Rendering Customers 312
00 0789725924 FM 11/21/01 12:54 PM Page viii

18 Running the Mall 345

Building a Command Framework 346


Designing the Finite State
Machine 346
Adding the Definitions 348
Receiving Input 349
Running Commands 351

Managing Stores 352


Listing Stores 352
Displaying Information About a
Store 354
Displaying a Store’s Needs 356

Terminating a Lease 360


Handling the Terminate
Command 360
Closing the Store 361

Final Thoughts 363

19 The End of the Beginning 365

Saving a Game 366


Getting the Filename 366
Writing the SwimFile 367
Saving Game Info 368
Changing SwimFile 368

Loading a Saved Game 369


Starting the Game 369
Choosing a Saved Game 371

Cheating in Swim Mall 374


Detecting the Cheat Command 374
Processing Cheat Commands 375

Hiding Easter Eggs 378


Searching for Easter Eggs 378
Displaying the Easter Egg 380

Final Thoughts 380

Index 383
00 0789725924 FM 11/21/01 12:54 PM Page ix

About the Author


Wayne S. Freeze started working with computers in 1975 and he hasn’t stopped yet.
Along the way, he’s held nearly every computer-related job available in a large computer
organization. Before he started writing full-time, he was the technical support manager at
the University of Maryland at College Park, where he was responsible for a large IBM
mainframe and a diverse collection of smaller computers.
This is his tenth computer book and his first for Que. Until now, he’s spent most of his
time writing about Visual Basic, databases, or some combination thereof. He also writes
magazine articles for several different magazines on topics ranging from how to create
Office macros to digging into the guts of the Common Runtime Library in Microsoft’s new
.NET framework.
Now, Wayne works out of his house in rural South Dakota with his lovely wife Jill (who
also writes computer books) and his two children, Christopher (age 8) and Samantha (age
6). Jill, whom Microsoft crowned an “Internet zealot,” is a prize-winning beta tester and
has worked extensively with products like Microsoft Office and Internet Explorer. Her
books are aimed at consumers and her Sams Teach Yourself Computer Basics in 24 Hours,
Third Edition (Sams, 2001, ISBN: 0-672-32301-X) has received rave reviews from her read-
ers. Chris is only eight years old, but is one of the sharpest game players Wayne knows. He
can easily beat kids twice his age with most computer games. Wayne rarely plays multi-
player computer action games with Chris anymore, simply because he consistently beats
him! Chris was the only person in the state of South Dakota to win a prize in Gateway and
Microsoft’s nationwide computer game contest, and he ranked in the top 200 players in his
age range in the country! When Wayne was looking for a beta tester for Swim Mall, Chris
was a natural choice, and made countless valuable suggestions for the game’s improvement.
Like Chris, Wayne’s daughter Sammy is also a whiz with computers, though given a choice
between playing with her computer and dancing, she’ll pick dancing every time.
00 0789725924 FM 11/21/01 12:54 PM Page x

x Windows Game Programming with Visual Basic and DirectX

Dedication
In memory of Deb Falkinburg.

Acknowledgments
I want to remember a special lady who is no longer with us. About a dozen years ago, she
was a major influence in my life, along with her husband Tim. Both of them helped me
through a very difficult time in my life. Time and distance has separated us recently, but she
has been in my thoughts a lot lately. I will really miss you, Deb.
There is a long story behind this book, but the short version is that I was supposed to write
it for a different publisher and after a long string of broken promises I decided it wasn’t
worth my sanity to write the book. Then one day while I was talking to Candace Hall at
Que, I described the book to her. Before I could think twice, I was digging the foundation
for Swim Mall. Thanks, Candy.
Along the way, I was able to work with some extraordinary people, such as Michelle
Newcomb, who was very patient when I missed deadline after deadline, and Howard Jones,
who seemed to fill several different roles in this book in addition to the one he was hired
for.
Without the help of a number of people at Caligari, Syntrillium, and Adobe, this book
would not have been possible. I want to thank Roman Ormandy and Kristine Gardner from
Caligari Corporation and Hart Shafer at Syntrillium Software Corporation for copies of
their software, plus permission to include copies of trueSpace and Cool Edit on the CD-
ROM. I also want to thank Will Saso from Adobe Systems Incorporated for his help with
getting copies of Photoshop and Illustrator for use with this book.
I want to acknowledge the support my agent Laura Belt has given me while this book
unfolded. She’s worth her weight in gold (or is that goldens). She helps to keep my friendly
neighborhood banker happy, which in turns helps me keep a roof over my head.
I also want to mention some of my friends: Rick, who believes there isn’t anything I can’t
program; Shaun, who has some misguided views of Java; Ian, for telling me about Cool
Edit; and Bob K., who I thought about when I was discussing the probability theory in this
book. I also want to mention Ariane, Elwyn, Dr. Bob, Veronica, Scott, Randy, and Vikki, all
of whom I miss now that I live in the middle of nowhere.
A big thank-you needs to go to Bucky and Goose for helping out with so many things.
I haven’t seen my Mom and Dad for over a year as I write this, and it makes me sad. Maybe
one of these days I’ll show up on your doorstep and surprise you. In the meantime, Mom,
please get better.
Samantha is my little girl who wants to be a dancing veterinarian, who performs at the
Olympics; I just want her to sit on my lap and be cute. I love you beans.
00 0789725924 FM 11/21/01 12:54 PM Page xi

xi

I want to say to my lovely wife Jill that I truly love you and I’m sorry about the Dummies
book. I know you’ll do well with your plan to create FP while you finish your great
American novel.
Finally, I want to say thank-you to my son and beta tester, Christopher. It was your sense of
humor that really made Swim Mall fun to write. It’s time for bed, CJ. Third grade awaits
you in the morning.
00 0789725924 FM 11/21/01 12:54 PM Page xii

Tell Us What You Think!


As the reader of this book, you are our most important critic and commentator. We value
your opinion and want to know what we’re doing right, what we could do better, what areas
you’d like to see us publish in, and any other words of wisdom you’re willing to pass our
way.
As an Executive Editor for Que, I welcome your comments. You can fax, email, or write me
directly to let me know what you did or didn’t like about this book—as well as what we can
do to make our books stronger.
Please note that I cannot help you with technical problems related to the topic of this book, and that
due to the high volume of mail I receive, I might not be able to reply to every message.
When you write, please be sure to include this book’s title and author as well as your name
and phone or fax number. I will carefully review your comments and share them with the
author and editors who worked on the book.
Fax: 317-581-4666
E-mail: [email protected]

Mail: Candace Hall


Executive Editor
Que Publishing
201 West 103rd Street
Indianapolis, IN 46290 USA
01 0789725924 Intro 11/21/01 12:58 PM Page 1

INTRODUCTION

In this introduction
Creating a Computer Game 2
Your Challenge 5
Who Should Read this Book 5
System Requirements 5
Who This Book Covers 6
What This Book Doesn’t Cover 7
Conventions Used in This Book 7
Questions and Comments 8
Other Resources 8
01 0789725924 Intro 11/21/01 12:58 PM Page 2

2 Introduction

I’ve been fascinated by computer games for years. Some of my first experiences date back to
the late 1960s when I was in junior high school. I was allowed to skip math class once a
week to use an old teletype terminal. I spent hours punching a tic-tac-toe game written in
BASIC onto paper tape so that I could play it when I connected to the mainframe.
In college, I was hooked on a Star Trek game written in BASIC that ran on a Hewlett
Packard 2000 timesharing computer. I spent many hours playing the game and discussing
strategy with my classmates. One summer, a few friends and I created a more advanced ver-
sion of the game based on a source code listing we found in Creative Computing, one of the
first hobbyist computer magazines ever created.
Later, I spent a lot of time playing Adventure (also known as The Colossal Cave), which
was created by a pair of MIT students, Willie Crowther and Don Woods, on a mainframe
computer. This game used phrases like “You are standing at the end of a road before a small
brick building” to create images in your mind. It was the first of an entire genre of comput-
er games now known as Interactive Fiction.
Back then, I didn’t care much for labels, I just wanted to beat the game. I created lots of
notes but wasn’t able to beat it. Fortunately, the source code for the game was readily avail-
able. I studied the source code and eventually defeated it with a perfect score.
The first time I saw SimCity, I thought the entire premise for the game seemed dumb. My
wife, on the other hand, thought it was an interesting concept, so she bought it anyway. She
asked me to install in on our computer early the next morning. Eight hours later she found
me still at the computer, playing the game. I hadn’t left my seat! Ever since then, I’ve always
been first in line each time a new version of SimCity came out.

Creating a Computer Game


By now you may have guessed that I’m hooked on computer games. I don’t really want to
know how much money I’ve spent on games over the years, not to mention computers and
other hardware to support the games I played.
However, playing computer games is a far cry from building computer games. It’s my belief
that the hardest type of computer program to write today is a game. Writing an operating
system is a close second. Fifteen years ago anyone could build a computer game in his or
her spare time. Today it takes teams of specialists many months or even years to build a
computer game.
Even though building a high-end commercial computer game is next to impossible for any-
one outside a handful of specialists, that doesn’t mean you can’t learn some of the funda-
mental principles and have a little fun at the same time.
If you want to create your own computer game, you need to make a few initial decisions,
such as the type of game you want to create, the programming language you want to use,
and the operating system API you want to use.
01 0789725924 Intro 11/21/01 12:58 PM Page 3

Creating a Computer Game 3

Types of Games
There are many different types of computer games. The key types are listed here:
• Action games were first made popular by such titles as Doom and Tomb Raider. The
premise is that you control the actions of a 3D character as you wander around trying
to solve a set of puzzles. A subset of these games are known as first person shooters,
where a major part of the action involves killing everything in sight.
• Adventure games are similar to the original Adventure game in that you guide one or
more characters on a quest. These games are sometimes known as role playing.
• Arcade games are generally simple 2D games that involve manipulating an object
trough a maze to avoid a series of traps or firing at objects to prevent being destroyed.
Classic examples of this type of game include PacMan, Centipede, and Space Invaders.
• Driving/flying games generally place you behind the wheel while you drive a car or fly
an airplane. The classic example of this type of game is the Microsoft Flight Simulator
series of games.
• Platform games are essentially 2D games where you guide a character through a maze
to solve a puzzle. Their name comes from the fact that in most of the games your char-
acter walks or jumps from platform to platform while solving the puzzle. Mario
Brothers for the Nintendo console is probably the most famous game of this type.
• Puzzle games exist solely to solve puzzles. Examples of these games include the
Solitaire game included with Windows and the Incredible Machine.
• Simulation games attempt to simulate a particular environment. You are not allowed
to directly control the game, rather you must indirectly control the game by modifying
various game parameters. These parameters in turn influence how the simulator con-
trols the details of the game. The defining example of this game type is the SimCity
series of games from Maxis.
• Sports games provide a way to play games such as football, baseball, or hockey on
your computer.
• Strategy games provide you with resources that you can directly control. These
resources can be devoted to creating other resources, expanding to reach a goal or
engaging in warfare. My favorite strategy game is Civilization.

It is often difficult to classify a game as a specific type, because it may have characteristics
that span multiple types.

Visual Basic
The first programs I ever wrote were in a computer language known as BASIC, and
although I have used many programming languages over the years, somehow I keep return-
ing to it. Microsoft’s Visual Basic is the most popular form of the language today and it is
used by more than 3,000,000 programmers, making it the most popular programming lan-
guage in the world.
01 0789725924 Intro 11/21/01 12:58 PM Page 4

4 Introduction

I like Visual Basic for many reasons, but the biggest reason is that it is the easiest language
to use when you want to write an application for Microsoft Windows. Visual Basic includes
excellent debugging tools and many of the problems that drive C++ programmers crazy are
automatically handled for you. Because I’m also known as “The Lazy Programmer,” the less
time I spend writing and debugging programs means that much more time to spend with
my family (or more time to play computer games).

DirectX
DirectX refers to a collection of objects you can incorporate in a program to build a game.
DirectX includes many separate components that address various aspects of game program-
ming. In its latest version, DirectX 8 has evolved to become the primary API for game
developers. Here are some of the key components of DirectX 8.
• DirectDraw is a high-performance interface that makes it practical for a programmer
to create 2D graphics. Although DirectDraw is still included in DirectX 8, it hasn’t
been enhanced since DirectX 7. It continues to exist for compatibility reasons.
• Direct3D is the 3D graphics interface. It uses the hardware assists found in many
video cards to create 3D displays that were impossible only a few short years ago.
• DirectInput provides a unified approach to handing input from the user. This means
your program need not know if the input is coming from a joystick, mouse, or key-
board.
• DirectMusic allows you to play many different music formats on your computer,
including MIDI and MP3.
• DirectSound allows you to create or play various types of sounds in your computer,
which are typically saved in .WAV files.
• DirectPlay makes it easier to coordinate communications between multiple computers
in a multiplayer game.

Introducing Swim Mall


I had been thinking about building a simulation game, but I didn’t want to duplicate any of
the games already in the marketplace. This ruled out any games based on city management,
airline/airport management, fast food restaurants, and many other things.
Then one day I happened to be walking through a shopping mall and was thinking how it
resembled a small city and the name Swim Mall popped into my head. From there, the rest
was easy.
Swim Mall is simply a simulation of an underwater shopping mall. Your job as the player is
to manage the mall’s growth from a shrimpy little shopping mall to a whale of a place to
shop. You’ll have to attract new stores to the mall and make it a nice place to visit. You’ll
also have to worry about various problems, ranging from cleaning the trash left on the floor
to crime to responding to major emergencies. Managing a shopping mall on the ocean floor
is a tough, thankless job!
01 0789725924 Intro 11/21/01 12:58 PM Page 5

System Requirements 5

My original intent for Swim Mall was to use 2D graphics along the lines of the original
SimCity game. However, when I started working with DirectX 8, I decided to abandon the
2D approach and go with 3D graphic images. I’m sure that the appearance of the game is
much better with 3D graphics. At the same time, using Direct3D simplified the code need-
ed to generate graphics.

Your Challenge
As you read this book, you may want to keep a running list of ideas of changes that you
would like to make to the game. These changes can range from minor code improvements
to additional game objects or brand new features not implemented in the original game.
When you’re finished with the book, your challenge is to implement these changes using
the source code provided on the CD-ROM and submit them to my Web site at
www.JustPC.com. I’ll collect the changes and post them so that other readers can download
them. Once each month, I’ll review the submissions with my panel of judges and select the
best one. That person will win a small prize. A complete set of rules and instructions will be
posted on the Web site, so stop by, take a look, and send me your code.

Who Should Read This Book


This book is aimed at someone who already has a working knowledge of Visual Basic. If
you have six months to a year experience, you should do fine. I use Class modules exten-
sively in the program, so you should be familiar with how they work, including how to
define properties, methods, and events.
Be warned, DirectX is not for the faint of heart. It is probably the most complex API in
Microsoft’s suite of application programming interfaces. I will lead you though enough of
the API to build the game, but I’ll try to avoid the features that aren’t absolutely necessary
to keep the complexity to a minimum.
You should also know a little bit about mathematics, particularly matrix operations. Some of
the 3D functions require computing things by adding and multiplying matrixes. I’ll try to
explain enough of the math so you’ll understand what I’m doing, but if you can’t follow the
math, don’t worry. You should be able to plug the numbers into the code to get the results
you want without the math.
I’ll also demonstrate how to create the 3D graphics using a reasonably priced, 3D design
tool called trueSpace. However, knowing a 2D graphics tool like Adobe Photoshop or
PaintShopPro may also prove useful in this book.

System Requirements
Creating a game using 3D graphics requires a relatively substantial computer system. If
your computer doesn’t have 3D accelerator video card, you may as well forget about trying
01 0789725924 Intro 11/21/01 12:58 PM Page 6

6 Introduction

to run it. Also, don’t try to run this game in anything less then a 500Mhz processor. I sug-
gest a minimum of 128MB of memory and recommend at least 256.
I developed this system on a 600MHz computer running Windows 2000 with 384MB of
memory. Windows 98 or Windows Me should also be acceptable, though be prepared to
reboot your computer frequently, as some mistakes will cause your computer to lock up.
Don’t assume that Windows 2000 is the perfect solution either; I managed to crash my sys-
tem several times while debugging parts of the game.
You’ll need a copy of Visual Basic 6 and the DirectX 8 software development kit (SDK).
You can use any edition of Visual Basic, including the Learning Edition, because the user
interface elements come from the DirectX SDK, not the ActiveX controls you would typi-
cally use.
In addition to the DirectX 8 SDK, you’ll need the Microsoft Speech SDK, version 5.1, to
add the text to speech facilities used in the game.
I suggested earlier knowledge of Photoshop or PaintShopPro would prove useful, which
means that it is only useful if you have access to the software. I’ve been using Photoshop for
a long time and highly recommend it to anyone who needs to create 2D graphics.
On the other hand, designing 3D graphics is a true art form and using a 3D design package
like trueSpace requires a lot of time and effort, but it can be done. You won’t absolutely
need trueSpace to run the game as it exists in this book. I’ve already created those images.
However, if you wish to design a new 3D image for the challenge, you’ll need a tool like
trueSpace.
Finally, you’ll need a tool such as Cool Edit to create and edit sound files used in the game.
Among other things, you can use it to create .WAV files from a microphone, copy music
CDs to .MP3 files, and edit and transform the contents of a sound file much like Photoshop
edits and transforms an image.
For your convenience, I’ve included the DirectX and Speech SDKs on the book’s CD-
ROM. Also, I’ve included demo copies of both trueSpace and Photoshop on the CD-ROM.

What This Book Covers


This book covers the design and implementation of a simulation computer game called
Swim Mall. The game relies on Direct3D to display the graphics and to DirectInput inter-
act with the user. I’ll cover enough about DirectSound and DirectMusic to create the
sounds and music the game needs.
All source code, graphics, and other support files are included on the CD-ROM that comes
with the book. This includes all of the configuration files, images, sound clips, and so on,
though I have omitted my favorite MP3 files for copyright reasons. Each chapter has a
directory containing the game or other sample files that were discussed in that chapter.
01 0789725924 Intro 11/21/01 12:58 PM Page 7

Conventions Used in This Book 7

What This Book Doesn’t Cover


As much as I wanted to cover how to build multiple types of games in this book, there sim-
ply wasn’t enough room. Where there are many similar aspects among the various types of
games, each type has its own unique aspects. For instance a driving or flying game needs far
more complex 3D scenery, and it also requires a complex physics model to determine how
the car or airplane will move.
Likewise, an adventure game requires a complex story behind the game to make it truly
interesting. Of course, having detailed animation for this type of game is just as important
and is probably even more difficult.
Also, this book doesn’t cover the fundamentals of Visual Basic. If you don’t understand the
difference between a class and an event, set this book aside and go read Sams Teach Yourself
Visual Basic 6 in 24 Hours, by Greg Perry (Sams, 1999, ISBN: 0-672-31533-5). It will be
worth your time and save you a lot of frustration in the long run.
Although this book spends a lot of time talking about DirectX and 3D graphics program-
ming, I barely scratch the surface on both topics. For more information about game pro-
gramming check out Tricks of the Windows Game Programming Gurus by Andre Lamothe
(Sams, 1999, ISBN: 0-672-31361-8). This book provides a lot of information about the the-
ory of game programming that is worth reading despite the fact that it relies on C++ for its
examples.
You can also learn more about DirectX by reading Sams Teach Yourself DirectX 7 in 24 Hours
by Robert Dunlop (Sams, 1999, ISBN: 0-672-31634-X). Although it does a fair job of cov-
ering DirectX, it doesn’t spend a lot of time working with Direct3D and most of the exam-
ples are written in C++.

Conventions Used in This Book


This book uses various stylistic and typographic conventions to make it easier to use.

When you see a note in this book, it indicates additional information that can help you
better understand a topic or avoid problems related to the subject at hand.

Tips introduce techniques applied by experienced developers to simplify a task or to


produce a better design. The goal of a tip is to help you apply standard practices that
lead to robust and maintainable applications.
01 0789725924 Intro 11/21/01 12:58 PM Page 8

8 Introduction

Cautions warn you of hazardous procedures (for example, actions that have the poten-
tial to compromise the security of a system).

Questions and Comments


You can visit my Web site at www.JustPC.com for the latest information about this book or
information about my other books. You should also find a version of the game that you can
download for your friends. Any reader submissions will also be posted to the Web site, so
you may want to check back periodically for any updates.
The Web site also contains a collection of articles and other information that you may find
useful. These are primarily articles I wrote for various magazines, plus a few articles I’ve
written just for the Web.
If you have questions about Visual Basic and DirectX, you can visit Microsoft’s news server
at msnews.microsoft.com and check out the microsoft.public.vb.directx newsgroup or
the other microsoft.public.vb newsgroups. There are a lot of friendly people there and I
try to stop by as often as I can.
You should also feel free to send me email at [email protected] if you have questions or
comments about the book. If you find any bugs in the game or any of the sample programs,
please let me know. Likewise if you have any ideas that you think would improve the game,
let me know.
Although I promise to read all of the e-mail I receive, it may take awhile for me to respond.
I try to answer short, simple questions quickly, while long and complex questions may sit
around for a couple of weeks or more. Please understand that I make my living from writ-
ing, so you may not get a prompt or complete answer to your question. But don’t let this
scare you from writing; I really enjoy hearing from my readers.

Other Resources
Fortunately, there are a lot of resources available for game programmers. Aside from the
Microsoft newsgroups listed previously, there are a number of other DirectX groups like
msnews.microsoft.com that provide more focused discussions on specific features of
DirectX like graphics, sound, input devices, and video. Look for the newsgroups beginning
with the microsoft.public.directx prefix. Be prepared, though, because nearly all of the
discussions in these groups use C++.
The DirectX SDK documentation files and sample programs contain a wealth of informa-
tion that shouldn’t be ignored. Examples are provided for both Visual Basic and C++ and
span the full range of topics from drawing a simple triangle to advanced topics like using
programmable shaders, which go far beyond the scope of this book.
01 0789725924 Intro 11/21/01 12:58 PM Page 9

Other Resources 9

Don’t forget the DirectX Web site on MSDN (http://msdn.Microsoft.com/directx).


There are a number of articles and tips that are freely available for you to browse. This is
also the place to look for updates and fixes to DirectX.
There are some Web sites that focus on Visual Basic game development. My favorite is
DirectX 4 VB (http://64.23.12.52/), which has a large number of tutorials. You can also
visit the VB Game Programming Web Ring at http://vbgamersring.com/, which contains
likes to other game programming Web sites.
When browsing through Web sites, be careful. Many of them focus on DirectX 7, which is
incompatible with DirectX 8. DirectX 7 is primarily a 2D graphics interface with some 3D
features, while DirectX 8 is strictly a 3D graphics tool. Also note that some of these Web
sites sell game engines for Visual Basic, which hide some of the complexity behind DirectX.
Although these engines can simplify your game programming, they lock you into a particu-
lar technology which may or may not be around in a few years. I suggest learning DirectX
first and then deciding whether you really want to use a different approach.
01 0789725924 Intro 11/21/01 12:58 PM Page 10
02 0789725924 PT1 11/21/01 12:57 PM Page 11

PART
I
Part I: Diving into the Game

1 Developing an Idea into a Game 13

2 Introducing DirectX 23

3 Creating 3D Graphics 49

4 Turning 2D Graphics into 3D Graphics 71

5 Loading Mall Information 89

6 Displaying 3D Graphics 111


02 0789725924 PT1 11/21/01 12:57 PM Page 12
03 0789725924 CH01 11/21/01 12:59 PM Page 13

CHAPTER
1
Developing an Idea into a Game

In this chapter
Designing the Game 14
Game Design Document for Swim Mall 15
Chris’s Thoughts 22
Final Thoughts 22
03 0789725924 CH01 11/21/01 12:59 PM Page 14

14 Chapter 1 Developing an Idea into a Game

At one time or another, most computer gamers have wished they could change the way a
game worked. Making the game easier to beat is probably the number one change on most
people’s lists. The second most popular change would be to make the game more challeng-
ing, and third is probably to customize the game by inserting information about people and
places they know.
Changing a game is much easier than developing a game from scratch. For a new game, you
have many details to resolve, such as the story behind the game, the conflict within the
game, and which features should be included, not to mention something so basic as picking
the type of game.
The goal of this chapter is to produce a simple blueprint, or game design document, for imple-
menting Swim Mall. To get a feel for information that will go into the document, you need
to get a feel for Swim Mall. Because the easiest way to get a feel of a piece of software is to
play around with it a bit, I’m going to show you how to install the game and then walk you
though some of the game’s key features. Once you’ve done that, I’ll present the design docu-
ment I used to build this game.

Designing the Game


Before you build a computer game you need to identify how it will work. It’s not sufficient
to say, “I’m going to build a game like SimCity, but base it underwater and use fish instead
of people.” You need to think through the game and identify all kinds of information—from
the game’s basic philosophy down to the details of the individual choices and actions the
player can make during the game.
The game design document should focus on functional issues such as how the game will
interact with the player and how the computer will respond. It should avoid implementation
details, which will be resolved as the game is developed.
The game design document is in no way a substitute for the game’s documentation. The
information in the game design document is intended to guide the developer while he or she
creates the game. Normally you wouldn’t want the game players to have access to the docu-
ment because it might allow them to work around some of the challenges presented by the
game. It’s far more fun for the player to determine how the game works by playing the game
itself.
As you read through this document, any comments in italics are not part of the Game
Design Document, but rather my thoughts and comments about what this section is sup-
posed to accomplish.
03 0789725924 CH01 11/21/01 12:59 PM Page 15

Game Design Document for Swim Mall 15

Part

Game Design Document for Swim Mall I


Swim Mall is a simulation game where the player manages an underwater shop- Ch
ping mall. While many aspects of the game are similar to games such as SimCity
and Roller Coaster Tycoon, humor is an important element of the game.
1
At the start of a game design document, all you really need is a short paragraph that
introduces the basic concept behind the game. Making a comparison to existing games
allows anyone reading the document to get a fast understanding of the type of game
you’re building.

Philosophy
The primary purpose of Swim Mall is to teach someone the concepts of game
programming; therefore many aspects of the game need to be simplified to
ensure that the basic concepts are easily understood.
Swim Mall also must be easily expandable to anyone with access to the source
code. This provides the capability for someone to test his or her knowledge of
the game by adding extensions—a new shopper, a new store, a unique emer-
gency, and so on.
Performance is not a primary issue with this game. While this doesn’t mean that
performance will be ignored, it does imply that the game will not deliver the
same level of performance that a commercial game of similar complexity would
have. This is a direct result of keeping the game simple and understandable.
Optimizing a game is a black art that involves a lot of experience and often
makes the final product difficult to maintain.
As a side effect of focusing on technique rather than performance, all of the files
used by the game will be unencrypted and uncompressed. This may waste some
disk space, but it will make the inner workings of the game easier to understand.
A game need not be complex to be fun to play. Many classic games such as
Solitaire, Asteroids, and SimCity are based on a relatively simple set of rules.
Humor such as puns, jokes, and funny visual elements are used throughout the
game to help compensate for lack of complexity.
The philosophy section is important, because it establishes a set of rules that govern how
the game will work. You will have to make many decisions not spelled out in the game
design document while building the game. By stating the game’s philosophy up front, you
make the choice that best fits with the game’s philosophy.
03 0789725924 CH01 11/21/01 12:59 PM Page 16

16 Chapter 1 Developing an Idea into a Game

Story
Swim Mall is a tale of the Oceanic Mall. Your job as the mall manager is to
transform this small shopping center into the most successful undersea mall in
existence. To increase your customer satisfaction, you must make your mall
attractive to the customers in your neighborhood. Success often brings new
competition, so if you are too successful, you can expect that the other mall
managers will try to steal your customers.
Advertising is important when you need to attract customers to your mall. You
need to worry about where to target your advertisements so they do the most
good.
You also need to worry about which stores you have in the mall to make it as
attractive as possible to your customers. You don’t want a situation where your
mall has five pet stores and six banks.
Each store has a lease agreement with the mall, however, if you set the rent too
high you may drive the store out of business. Likewise if you set the rent to low,
you may not make enough money to survive. Of course, you’d better remember
to renew the leases before they expire or the store will be forced to leave the
mall before the lease is up.
Every game has a story that sets the stage for the game. The storyline for a game like
Duke Nukem is “Kill all of the aliens before they kill us.” Most storylines are more
complex than this because they need to introduce the game’s characters and setting.
The story should also identify the major sources of conflict and competition in the game.
In the end, all games revolve around conflict and competition, no matter if it’s saving
the Earth from invading space aliens or beating the rest of the cars in the race. Without
conflict and competition, you don’t have a game.
Like the game’s philosophy, the story will provide a basis to decide many of the game’s
details. In this case, I couldn’t include an invasion of rats as a disaster simply because the
rats couldn’t survive underwater. However, you can use a crusty crab to get the same
results.

Technical Features
To be appealing to the game player, the game contains these technical features.
These features communicate why the game is technically advanced. Think of them as
advertising that would appear on the game’s box under the heading Technical Features.
■ Real-time simulation engine—Models the economics of the shopping
mall based on the criteria outlined in this document.
03 0789725924 CH01 11/21/01 12:59 PM Page 17

Game Design Document for Swim Mall 17

Part
3D graphics engine—Displays the mall as a 3D image (based on Direct3D

as implemented in DirectX 8). The graphics engine enables you to view the
I
mall from several different directions as well as control the level of detail Ch
the player can see. 1
■ 3D animation engine—Displays the customers in the mall in real-time.
■ MP3 music player—Provides background music for the game.
■ Speech Synthesizer—Translates text messages into speech.
■ Extendibility—Allows other game developers to modify the game’s source
code and objects to add new features and scenarios.

Game Objects
The game revolves around two main objects, customers and stores, plus a hand-
ful of other objects.
These objects are listed here mostly to help define words and concepts used when describ-
ing how the user controls the game and how the computer will respond.

Customers
Each customer in the game has these characteristics.
■ Name—A value that can be modified by the game’s player.
■ Image—An index into a table of images that will be displayed on the screen
when the customer is present in the mall. Like names, images can be modi-
fied by the player.
■ Needs—A list of needs that are satisfied by the stores in the mall.
■ Location—The zone where the customer is located.
■ Satisfaction—An index for each store in the mall that is a factor in choos-
ing where to shop.
■ Type—Specifies the general type of the customer.
■ Position—Identifies the customer’s position in the mall only when the cus-
tomer is actually in the mall.

Stores
Like customers, each store has a set of characteristics that describe how they are
used within the mall.
■ Name—A value that uniquely identifies the store.
■ Image—A 3D image of the store that will be displayed in the mall.
03 0789725924 CH01 11/21/01 12:59 PM Page 18

18 Chapter 1 Developing an Idea into a Game

■ Needs—A list of needs that satisfies customer needs.


■ Rent—A method that determines the minimum and maximum rent values
that the store is willing to pay.
■ Profit—A method that determines how much profit the store will generate
from each customer visit.
■ Service—A method to determine the minimum and maximum number of
customers that the store can service at any point in time.

Other Objects
The other important objects included in the game are listed below.
■ Bank—Holds money in the checking account for the mall. Also loans
money to the mall based on the total value of the mall.
■ Neighborhood—A high-level view of the area surrounding the mall. This
is used primarily to direct advertising to a particular location and to spot
the location of the other shopping malls with which you are competing.
Note that characteristics of a neighborhood will change over time, which
implies that the customers that shop at the player’s mall will have different
needs over time.
■ Raymond—The assistant mall manager, who provides information and
advice about how to play the game.
■ Mall Strait Journal—The industry standard newspaper for catching the
latest shopping news. It is also the best location to place ads to attract new
stores to your mall.

User Interaction
The user interacts with the game through a well-defined set of controls. There
are three main areas of controls; the pre-game setup where the user selects the
initial conditions for the game, the gameplay activities where the user is actively
playing the game and the game options, where the player can tweak the way the
game works.

Pre-game Setup
In the pregame setup, the user can specify the following items. Note that in
most cases the player doesn’t have complete control over the item, but can
merely select one item from a list of items.
03 0789725924 CH01 11/21/01 12:59 PM Page 19

Game Design Document for Swim Mall 19

Part
Initial type of mall—Choose from a predefined list of empty malls. Some

variations include a strip mall where the stores are all arranged on one side,
I
a single-story mall and a two-story mall. Note that the initial type of the Ch
mall will also determine the number of stores available. 1
■ Initial funding—Choose the amount of cash and/or initial loan amount,
plus the untapped credit limit. This determines the amount of money with
which the player will start the game.
■ Size and type of neighborhood—Choose from a predefined list of neigh-
borhoods.
■ Number and type of competitors—Choose the maximum number of
other malls in the same neighborhood.
■ Winning condition—Determine the criteria for winning.

Gameplay Activities
The user directly controls the following aspects of the game while the game is
active.
This list should be fairly complete before you start building your game. Adding major
features later could have a negative impact on the overall vision of the game.
■ Location of mall services—Initial placement of mall managed facilities
such as the entrances, food court, bathrooms, stairs, elevators, security
offices, utility plant, benches, telephones, information desk, vending
machines, trashcans, plants and the mall office.
■ Expansion and renovation—Choose when and how to expand the mall to
accommodate new stores and mall services. Also renovate various parts of
the mall as they wear out.
■ Attract stores—Place ads informing potential store owners that the mall is
looking for particular types of stores.
■ Select stores—From the set of stores that respond to the ad, select the
appropriate mix of stores for the mall, negotiate contracts with the stores
(fixed rent, percentage of profit, or a combination of the two), and choose
the appropriate store size plus their store’s placement in the mall. Also con-
trol carts in the hallways.
■ Attract customers by advertising—Place advertising in local and regional
newspapers, TV, and radio.
03 0789725924 CH01 11/21/01 12:59 PM Page 20

20 Chapter 1 Developing an Idea into a Game

■ Attract customers by special promotions—These are special events that


the mall can hold to attract customers. Typically these are holiday themed
events such as having Santa Claus available during December.
■ Manage mall employees—Hire and fire janitors, security, and administra-
tive workers, and set their priorities to help them perform their job more
effectively.
■ Manage money—Collect rents from stores, borrow and pay back money to
the bank, pay bills including taxes, utilities, salaries, insurance, advertising,
and promotions.
■ Respond to emergencies—Determine the appropriate response to an
emergency.
■ Reports from Raymond—Displays information about how the mall is
doing internally, including reports of emergencies, and other problems.
■ Read the Mall Strait Journal—Displays the newspaper containing infor-
mation about how the player’s mall stacks up against the competition,
enables you to place ads to attract stores, and provides other business tips.

Game Options
The player can specify options that permit them to control these items.
■ Game speed—Affects how fast the master clock runs relative to real time.
The player can choose from several speed options and a pause mode that
suspends the game’s activity.
■ Save and restore games—Gives the player a choice to save a currently
running game or to restore a previously saved game.
■ Control sound and music—A general switch that instructs the program to
enable or disable sound effects and background music. Also contains a vol-
ume control to adjust the relative sound levels.
■ Location of music files—Because no MP3 files will be distributed with the
game, it will be the player’s responsibility to supply the name of a directory
where these files may be found.

Simulation Engine’s Control


The computer will control most of the activities during the game in it’s real-time
simulation engine.
■ Master clock—Controls the date and time of the simulation. Many calcula-
tions use date and time value.
03 0789725924 CH01 11/21/01 12:59 PM Page 21

Game Design Document for Swim Mall 21

Part
Neighborhood—Sets the number of the customers available in the neigh-

borhood and their average distance from the mall. The neighborhood is
I
broken into zones by average income. Ch

■ Customers—Determines how frequently customers will arrive at the mall. 1


Each customer will be selected from a location in the neighborhood and
then their needs and satisfaction will be evaluated to see if they will go to
your mall or one of the competitors.
■ Disasters—There are a number of possible disasters, such as an invasion of
crusty crabs and shark attacks. Also watch out for fires, explosions, and
invading aliens.
■ Raymond—Shows up whenever there is good news or bad news.
■ Mall Strait Journal—Periodically appears and announces various trends in
shopping malls. Also it will announce prizes and awards.

Game Variables
Game variables track how well the player is doing in the game. These variables,
along with the master clock, can be used to determine the winning conditions.
■ Customer satisfaction—Describes the overall success of the shopping
mall. A high level of customer satisfaction will attract customers to the mall,
while a low level will drive customers away.
■ Cash—Contains the amount of money you have to spend in improvements.
In general more money is better than less, though may make negotiating
rents with stores difficult.
■ Loans—Contains the total amount of money that the player has borrowed
from the bank. There is an upper limit on the amount of money that the
bank is willing to lend the mall, based on the total value of the mall.
■ Value—Contains the current value of the mall. Note that the individual
stores aren’t counted as part of the mall, because they represent individual
businesses. However, their leases add value to the mall.
■ Interest rate—Contains the current short-term interest rate. This affects
the interest payment the player must make to the bank.

Cheat Codes
No computer game will be complete without the capability to enter cheat codes.
A list of cheat codes follows.
03 0789725924 CH01 11/21/01 12:59 PM Page 22

22 Chapter 1 Developing an Idea into a Game

Cheat codes are really just another term for debugging aids. They provide shortcuts to
allow someone testing the game to reach a certain stage in the game more quickly,
where they can test a particular feature.
■ Congressperson—Gives you lots of money.
■ Alan Greenspan—Makes interest rates low.
■ Beach Boys Music—Improves the mall’s customer satisfaction level.
■ Income Taxes—Reduces the mall’s customer satisfaction level.
■ Mall Of America—Attracts all of the stores in the game to the player’s
mall.
■ Porsche 944—Displays frame rate, plus camera and viewpoint information
on the screen.

Easter Eggs
These are items hidden in the mall that the player might find while playing the
game. These items can only be found after entering a cheat code.
■ Who is Chris?—Displays a picture of Chris.
■ Electric Wayne—Displays a funny picture of Wayne.

Final Thoughts
The game design document is a way to outline how the game will work. It defines the
things the user will control and how the computer will respond. It’s important to recognize
that the game design document is not a complete design document—it merely outlines the
major pieces of the game from a functional perspective. If the design starts to look like code,
you’ve gone too far.
04 0789725924 CH02 11/21/01 12:55 PM Page 23

CHAPTER
2
Introducing DirectX

In this chapter
Understanding DirectX 24
Introducing 3D Graphics 27
I’m a Little Teapot 31
Final Thoughts 47
04 0789725924 CH02 11/21/01 12:55 PM Page 24

24 Chapter 2 Introducing DirectX

If you want to build a game in Visual Basic you have only one real option, which is to use
DirectX. Without DirectX, you might create a game using a combination of controls and
clever code, but you’d have a difficult time doing animations, and even drawing simple pic-
tures would take a lot of time and resources. Although DirectX can be complicated to use, it
has the advantage of displaying graphical information much faster than the native VB tools
and allows you deal with more complicated graphics than you might believe.
This chapter focuses on how to set up DirectX and draw some simple 3D graphics. The
code in this chapter assumes that you’ve installed the DirectX SDK on your computer.
Although in theory you need only install the DirectX runtime components, it is worthwhile
to install the entire SDK, or at least the Visual Basic components if you’re tight on disk
space. There are many sample programs and other utilities that you’ll find useful, especially
the DirectX Documentation library.

Bumpy road ahead


When I say DirectX can be difficult to use, believe it! While debugging the code in this
chapter, you can expect your computer to crash, even if you’re running Windows 2000.
I recommend saving your changes frequently and not running any other applications
while you’re debugging. After this block of code is stable, you shouldn’t have nearly as
many problems.

Understanding DirectX
DirectX is an application programming interface (API) that provides low-level access to the
computer’s hardware to create games and other multimedia applications. In addition to pro-
viding support for 2D and 3D graphics, it also provides a standard way to access input
devices, play music and sounds, and coordinate play between multiple players over a net-
work.

Why DirectX?
DirectX was developed as a low-level, high performance replacement for using Win32 APIs
to display information on a screen. Although Win32 APIs in Windows have a lot of capabil-
ity, they are very slow when displaying graphics on the screen. Thus for many years, most
game developers chose to stick with DOS because DOS allowed them to access video cards
directly to give their games the best possible performance.
The downside to using DOS was that the game developer needed a different set of video
drivers for each video card on the market. This meant that some games might not run on a
particular video card because the card wasn’t sufficiently popular enough for the game
developer to develop a video driver or the video card was released after the game.
04 0789725924 CH02 11/21/01 12:55 PM Page 25

Understanding DirectX 25

Because Microsoft wanted to encourage game developers to switch from DOS to Windows,
it needed to provide an alternate way to display graphics that met the needs of game devel-
opers. They came up with an approach that provided a low-level, no frills access to develop-
ers, called DirectX.
DirectX eliminated the need for game developers to write drivers for each video card.
Instead, video card manufacturers were required to supply drivers to standards developed by
Microsoft. Then calls to DirectX would be translated into calls to the video card driver. Part
Although DirectX offered many advantages for the game developer, the early versions I
weren’t well accepted by game developers. However, Microsoft persisted and after awhile
Ch
most game developers began to use DirectX. DirectX version 5 was the first version of
DirectX that was really popular with the game developer community and most games after 2
that point were developed for DirectX.
Even though each new version of DirectX added new capabilities that didn’t exist in previ-
ous versions, Microsoft was careful to preserve the functionality from previous releases. This
ensures that if your game ran properly on DirectX 5, it will run properly on DirectX 6, 7, 8,
and beyond.
Until DirectX version 7, it wasn’t practical for Visual Basic programmers to use DirectX.
Prior to DirectX 7, only a C-style interface was provided. If you wanted to access DirectX
from Visual Basic, you needed a special program that acted as a COM wrapper. It provided a
way to translate COM calls into DirectX calls. In DirectX version 7, Microsoft added a
COM interface to DirectX that allowed Visual Basic direct access to DirectX.
Microsoft made major changes to DirectX 8, including merging the 2D graphics support
into the 3D graphics support. This really means that if you want to develop 2D graphics,
you should stick with the DirectX 7 interfaces. However, Microsoft added many new
functions in DirectX 8 that make it a lot easier to create 3D graphics, as you’ll see in this
chapter.

DirectX Services
DirectX is a collection of COM components organized into four main functional services:
graphics, input management, audio programming, and networking support (see Figure 2.1).
Graphics services are further broken into DirectDraw and Direct3D, whereas DirectX
Audio is broken into DirectMusic and DirectSound.
■ DirectX is the root of all of the DirectX components. It provides the environment in
which the rest of the services operate.
■ DirectDraw displays 2D graphics. Although this service has been stabilized with
DirectX 7 and is no longer enhanced, you can continue to use it in DirectX 8 without
change.
■ Direct3D displays 3D graphics. To use Direct3D, you need a 3D accelerator video card
to ensure adequate performance. Version 8 of Direct3D includes a rich collection of
tools that make 3D programming much easier than it was in the past.
04 0789725924 CH02 11/21/01 12:55 PM Page 26

26 Chapter 2 Introducing DirectX

■ DirectInput provides a unified collection of objects for managing input devices. It


allows your program to treat the input as coming from a single device-independent
source rather than discrete devices such as the keyboard, mouse, or joystick.
■ DirectMusic allows you to create and play music on your computer using a variety of
formats including, MIDI, WAVE, and MP3. It is capable of playing both music and
sound files through a unified architecture.
■ DirectSound allows you to play complex sounds on the computer. It is an older inter-
face that has been partially replaced by the DirectMusic interface, however
DirectSound is still the preferred service when you want to capture complex sounds.
■ DirectPlay contains the interfaces that allow two or more computers running the same
game to exchange both game information and messages between the players, including
both text messages and voice messages.

Figure 2.1
DirectX
The DirectX object
model provides four
main services. DirectX Graphics

DirectDraw

Direct3D

DirectInput

DirectAudio

DirectMusic

DirectSound

DirectPlay

COM-municating with Windows


COM stands for Component Object Model. This is a technique used by Microsoft to
provide Windows programmer with a reusable object model. COM components typi-
cally reside in a .DLL file, which can be shared by many different applications. Many
operating system functions, including DirectX are made available to Visual Basic pro-
grammers using COM.
04 0789725924 CH02 11/21/01 12:55 PM Page 27

Introducing 3D Graphics 27

Introducing 3D Graphics
Swim Mall makes extensive use of Direct3D graphics. Believe it or not, this simplifies much
of the programming required to display the graphics. If you try to present a 3D appearance
using 2D graphics, you have to develop complex algorithms to determine which object is in
front of another and then hide the parts of the objects that aren’t visible. With Direct3D,
you simply draw your graphics using a 3D coordinate system and Direct3D does the rest.
Part
The 2D Coordinate System I
Visualizing 2D graphics is pretty easy because everything is placed according to two axes Ch
(see Figure 2.2). A coordinate of (3,2) means that this point is located 3 units down the
X-axis, and 2 units down the Y-axis. 2
Figure 2.2 Y
The location (3,2) is
easy to visualize in a
2D coordinate system.
(3,2)
2

X
3

The values of a coordinate increase as you move to the right on the X-axis and up on the
Y-axis. The location where the X- and Y-axes touch is known as the origin and has the coor-
dinate value (0,0). Values to the left of the origin along the X-axis or down from the origin
along the Y-axis are negative.
You can define a 2D shape such as a rectangle by specifying the coordinates for each corner
of the rectangle. For instance, in Figure 2.2 you can see a rectangle formed by using the fol-
lowing coordinates: (3,2), (3,0), (0,0), and (0,2).

The 3D Coordinate System


The 3D coordinate system introduces a new axis, called the Z-axis. This axis represents
depth (see Figure 2.3). As you move away from the origin, values along the Z-axis increase.
Thus, the coordinate (3,2,1) can be located by counting 3 units to the right on the X-axis, 2
units up on the Y-axis and 1 unit back on the Z-axis. This system is known as the left-hand
coordinate system. It is also called the 3D space.
04 0789725924 CH02 11/21/01 12:55 PM Page 28

28 Chapter 2 Introducing DirectX

Figure 2.3 Y Z
The location (3,2,1) is
harder to visualize in (3,2,1)
a 2D coordinate
system. 2

X
3

Like the 2D coordinate system, values below and to the left of the origin use negative num-
bers. Likewise, values along the Z-axis mean that the coordinate is closer to you than the
origin.

On the other hand


Because I’m taking a practical approach to this book, I’m going to sidestep a lot of the
math wherever practical. You should know that there is a right-hand coordinate system
where values along the Z-axis increase as they come toward you and decrease as they
go away from you. The right-hand coordinate system is typically used in mathematics
and other sciences, but makes graphics programming more difficult.

To define a 3D shape such as a box, you need to define the coordinates for each corner of
the box. Because a box has eight corners you need to define eight coordinates. Using the
box shown in Figure 2.3, you have the following coordinates: (3,2,1), (3,2,0), (3,0,0), (3,0,1),
(0,2,0), (0,2,1), (0,0,1), and (0,0,0).
If you select any four coordinates, you basically have the four corners of a square. For
instance the coordinates (3,2,0), (3,0,0), (0,0,0), and (0,2,0) define the side of the box that is
facing you. In fact, if you look at the coordinates you should notice that they are essentially
the same as the square shown in Figure 2.1, except that they include a Z-axis value of 0. So
another way of looking at the box is that it’s merely composed of six rectangles.

The World Is Made of Triangles


As you might expect, 3D objects in Direct3D are created by drawing smaller objects and
connecting them together. The fundamental object in Direct3D is the triangle. Any 3D
object can be approximated by using a series of triangles, including objects with curved sur-
faces like spheres, cylinders, and cones.
A simple object with flat surfaces can be represented exactly by using triangles. Consider
the box shown in Figure 2.4. Each of the three sides you can see is represented by two tri-
angles. Thus, the entire box could be represented by 12 triangles.
04 0789725924 CH02 11/21/01 12:55 PM Page 29

Introducing 3D Graphics 29

Figure 2.4 (0,2,1) (3,2,1)


You can draw a three-
dimensional box using (0,2,0)
(3,2,0)
12 triangles.

(3,0,1)

(0,0,0) (3,0,0)

Part
More complex objects can be drawn with triangles. For instance, in Figure 2.5 you can see I
how a circle can be approximated by using a collection of triangles. In the first example, six
Ch
triangles are arranged with their points together in the center of the circle. In the second
example, eight triangles are used. Finally in the third example, 16 triangles are used, giving 2
a fairly close approximation of a circle. If 16 triangles don’t yield a smooth enough circle,
you can always add more until you get the circle you want.

Figure 2.5
The more triangles
you add, the rounder
your circle will look.

6 Triangles 8 Triangles 16 Triangles

The same technique can be applied to nearly any shape. If you use enough triangles you can
approximate anything from a sphere to a fish or even a human.

Drawing Lots of Triangles


Because each corner of a triangle is known as a vertex, you can specify any triangle by speci-
fying the coordinates of each vertex. In turn, if you provide DirectX with a list of vertexes,
you can display a lot of triangles with a single call. The list of vertexes is known as a vertex
buffer.

Vertices and vertexes


You can use either vertices or vertexes when referring to more than one vertex.

One of the biggest limitations of graphics is moving data around. Let’s assume that your 3D
object contains 2,000 triangles (which isn’t a lot for some objects). If you use three single
values to store the coordinates of each vertex, you have 72,000 bytes of information to move
(2,000 triangles×3 vertexes per triangle×3 coordinate values for each vertex×4 bytes for each
single value in the coordinate). This is a lot of data, especially if you store other information
for each vertex.
04 0789725924 CH02 11/21/01 12:55 PM Page 30

30 Chapter 2 Introducing DirectX

However, when you’re drawing shapes, nearly all of the triangles share at least one vertex
with another triangle. This is very obvious if you look at Figure 2.5 again. Rather than stor-
ing each triangle explicitly, DirectX allows you to store triangles as either strips or fans (see
Figure 2.6).

Figure 2.6 0,3 4 0 2 0 1

Using triangle strips


and fans can save a
lot of resources.

1 2,5 1 3 3 2
Discrete Triangle Triangle
Triangles Strip Fan

To draw a regular square with discrete triangles requires six vertexes. However, with a tri-
angle strip, you need only four. The key behind a triangle strip is that after the first trian-
gle, each new vertex uses the last two vertexes to draw a triangle. In theory, this means that
you need only n+2 vertexes to draw a sequence of n triangles. Of course you can’t use trian-
gle strips everywhere, but even they can make a big difference.
Triangle fans are very useful for drawing curved shapes. The first vertex value is the center
of the shape. The next two vertexes define a triangle using the center vertex. The fourth
vertex defines another triangle by using the previous vertex and the center vertex. Like tri-
angle strips, triangle fans are very efficient.

Colors
If you are familiar with Web programming, you may have seen how to specify a color value
using a combination of red, blue, and green values. You can specify a value for each of the
colors in the range of 0 to 255, where 0 means that none of the color is included and 255 is
the maximum.
Colors in DirectX have four components. Like Web colors, you have red, blue, and green
components. However in DirectX, the possible values for the colors range between 0.00
and 1.00, where 0.00 means no color and 1.00 means maximum color.
The fourth component of a DirectX color controls the transparency of an object. This
value is known as alpha. Like red, blue, and green, this value ranges from 0.00 (totally
transparent) to 1.00 (totally opaque).

Lights and Viewpoints


A 3D object only appears to be a 3D object because there is a light to create shadows. This
is a very important concept. Without lights and shadows a sphere would appear as a simple
circle. Likewise you need a light to know where you are looking to determine what you’re
going to see. The front and back of a 3D object depends on the viewpoint.
04 0789725924 CH02 11/21/01 12:55 PM Page 31

I’m a Little Teapot 31

There are two main kinds of lights in DirectX: direct and ambient. An ambient light illumi-
nates everything equally whereas a direct light is used to cast shadows on your 3D objects.
Ambient lighting doesn’t have a direction and shows up uniformly on your object. Through
the use of ambient lighting, you can see all sides of your 3D objects. Keep in mind that rely-
ing totally on ambient lighting means that your objects won’t have a light side and a dark
side, so some 3D effects are lost.
The location of a direct light is specified as a 3D coordinate value. A simple direct light is Part
unidirectional, meaning that it will shine on the surfaces that are directly in line with the I
light. One problem with using triangles to represent an object is determining which side of
Ch
the triangle is up. A triangle has two sides; a front and a back. The back of the triangle
shouldn’t be visible, whereas the front is supposed to reflect light. 2
To address this problem, DirectX computes a normal vector that describes which way the
face is pointing. It does this by using the three vertexes of the triangle to determine the vec-
tor, which is at right angles to the surface of the triangle. The amount of direct light that
will appear on the object is determined by the angle between the normal vector and the vec-
tor that points from the surface in the direction of the light. The smaller the angle, the
more light will fall onto the surface. If angle is greater than 90 degrees, the surface will not
receive any light.
A viewpoint requires two 3D coordinate values. The first one marks the location of the
viewer, whereas the second marks the location of where the viewer is looking. This estab-
lishes the direction of view. You will see any 3D objects that are in the direction of view.
In addition to the viewpoint vector, you also need to specify the field of view. The field of
view can range from wide angle to telephoto just like a zoom lens on a camera. If you
choose to use a wide angle or telephoto field of view, you may get some distortion so it is a
good idea to leave the field of view alone and simply move the location of the viewer to see
an object up close.

I’m a Little Teapot


To demonstrate how to use Direct3D to display graphics, I’ve created a simple program that
displays a 3D image on your screen that you can play with. Don’t worry if some of the con-
cepts discussed in this program seem a little strange, you will understand them before long.
Playing around with this program will give you a better context with which to understand
them.
This program consists of four modules; the Form1 module containing the main form, a
Global module that contains global constants and definitions and two class modules,
Debugger, and DXGraphics. Most of the work by this program is done by the two class mod-
ules Debugger and DXGraphics. The Debugger class provides a convenient way to capture
debugging information. I’ll use this class throughout the book to record various pieces of
information while the program is running. This information will prove invaluable when
attempting to debug the program.
04 0789725924 CH02 11/21/01 12:55 PM Page 32

32 Chapter 2 Introducing DirectX

The DXGraphics class (see Table 2.1) deals with the DirectX graphics routines and does most
of the work in this program. The main form merely collects commands that set various
DXGraphics properties or call the appropriate DXGraphics method.

Table 2.1 DXGraphics Properties and Methods


Name Description
CreateTeapotMesh Method that creates a teapot mesh that can be displayed by the
Render method.

DebugObject Property containing an object reference to a valid Debugger object.


hWnd Property containing a handle to the window to be displayed.
InitDX Method that initializes the class so that it may display 3D graphics.
ResetView Method to restore the viewpoint and the camera to the default
location.
Render Method to display the 3D objects on the screen.
ShowFrameRate Property that, when True, causes the frame rate and other useful
information to be displayed on the graphics screen.
View Method to shift the camera and viewpoint locations by the specified
amount.
Zoom Method to move the camera closer or further from the viewpoint
location.

It’s up to you
The entire source code for this program is found on the CD-ROM in
VBGame\Chapter02. You should take some time to load the program into Visual Basic
and run it. Also, please take the time to examine all of the code in this program.

Installing DirectX
Before you develop programs with DirectX 8, you need to install the DirectX 8 Software
Development Kit (SDK) on your computer. A copy of the SDK is on the book’s CD-ROM
in the \Microsoft\DirectX8 directory. Simply run the program dx8a_sdk.exe to install the
SDK. As you follow the steps in the Installation Wizard, make sure that you install the doc-
umentation, the utilities, and the sample programs for Visual Basic. These will prove
extremely helpful for writing your own DirectX programs.
Exploring the Variety of Random
Documents with Different Content
R. of Rs. 35: 256. F. ’07. 40w.

Whitlock, Brand. Turn of the balance. † $1.50.


Bobbs.
7–10046.

An arraignment of the law as it is administered in our


commonwealth to-day. Pitted against the big machine of the law
is human justice which attempts to overthrow the merciless
momentum of legal incompetence, and fails. The force of the
story lies along the line of a plea for human sympathy and
improved conditions.

“The book is as strong and purposeful as ‘The jungle,’ and as


literature it is a more finished creation. It is a distinctly great
novel, presenting a vivid and effective picture of the miserables
of our social order.”
+ Arena. 86: 664. Je. ’07. 2870w.
+
“From beginning to end there is not one scene that is forced
or unnatural or out of place or out of proportion or improbable or
inadequate; there is not one sentence or phrase that is overdone
or written for effect; of all the characters there is not one that
fails to be convincing.” Charles Edward Russell.
+ Arena. 38: 209. Ag. ’07. 1450w.
+
“It is a particularly sordid story of criminal life, unredeemed by
any special skill in the telling, and lacking the breadth of
treatment which alone can make such a subject impressive.”
− Ath. 1907, 2: 400. O. 5. 130w.
+
“Grim as his story is, it must claim attention both for its
passionate devotion to an idea of mercy and charity, and for its
profound recognition of the organic and indestructible unity of
human life.” Harry James Smith.
+ Atlan. 100: 130. Jl. ’07. 750w.
“Is chiefly remarkable as an exhibit of the criminal under-
world, its viewpoint, its customs, and its speech.” Wm. M. Payne.
− Dial. 42: 314. My. 16, ’07. 200w.
“A serious book this, convincing even while one looks for the
other side of the picture—one of the most striking of the many
indictments of society of recent years.”
+ Ind. 62: 1031. My. 2, ’07. 340w.
“The author has an eye for details that give many passages of
description a distinctive virtue; but all the virtues are overborne
by the pulpit utterance, and swamped in a crowd of people who
are all very good or very bad as the illustration of the thesis
demands.”
− Lond. Times. 6: 366. N. 29, ’07. 430w.
+
“Contains many revelations of our own city life. It is
fascinating to read and—worth reading.”
+ N. Y. Times. 12: 170. Mr. 23, ’07. 640w.

N. Y. Times. 12: 386. Je. 15, ’07. 120w.


“Profoundly depressing is the effect of this story, yet the
author surely must have been moved by the desire to better the
conditions he describes with great power.”
+ Outlook. 85: 812. Ap. 6, ’07. 180w.

Whitlock, William Wallace. When kings go forth


to battle. †$1.50. Lippincott.
7–28962.

A small German principality is the seat of exciting warfare. An


unscrupulous king and a conniving “minister of interior
improvements” find their match in two invincible Americans who
keep the secret of a young prince’s hiding place, and with
characteristic American energy join in a revolutionary plot to
unseat the reigning monarch and place the prince upon the
throne.

N. Y. Times. 12: 619. O. 12, ’07. 160w.

Whitmore, C. S. Harmony flats: the gifts of a


tenement-house fairy. 85c. Benziger.
7–22914.

All about some little neglected children whose squalor and


suffering in a New York tenement house are relieved by a kind
benefactor, who turns out to be the very irascible old gentleman
whom the children had greatly feared.

* Whitney, Helen Hay. Bed-time book; with


pictures by Jessie Willcox Smith. †$1.50. Duffield.
7–25151.

A bed-time book for children even to the little nightgown-clad


people surrounding the text on every page marching off with
their candles to bed.
+ Nation. 85: 520. D. 5, ’07. 40w.

+ N. Y. Times. 12: 703. N. 2, ’07. 200w.


“The most attractive picture-book of the year. There is a strain
of seriousness, we might almost say sadness, underlying the
expression of Miss Smith’s characters, that the young folks may
not find attractive, though they may not penetrate deep enough
into the philosophy of art to know the cause. But artistically
these pictures would be hard to equal.”
+ R. of Rs. 36: 766. D. ’07. 100w.

Whitney, Rev. James Pounder. Reformation:


being an outline of the history of the church from
A. D. 1503 to A. D. 1648. (Church universal ser., v.
6.) *$1.50. Macmillan.
7–37538.

A complete handbook of the reformation belonging to the


series known as “The church universal” which deals with the
history of the Christian church as a historic body.

“His effort ‘to be fair to all schools of thought and to all men to
the time’ has, in the opinion of the reviewer, met with indifferent
success. Chapters 7–9 (141 pages) are devoted to the Council of
Trent. Here we at once become aware that the author is treading
on firmer ground. He no longer deals in vague generalities or
manifests the ‘possession’ on his part of vast supplies of
ignorance and misinformation, but he shows interest in the
minutest details and the possession of a creditable amount of
authentic knowledge. These chapters constitute the only really
valuable part of the work and justify its publication.” Albert Henry
Newman.
+ Am. Hist. R. 12: 876. Jl. ’07. 820w.

“The treatment of the very large subject is brief and summary,
the point of view is Anglican, and the spirit non-partisan.”
+ Ind. 63: 763. S. 26, ’07. 50w.
“He has to do his work his own way, and he has done it
admirably. But we are sorry to say that he has sometimes been
hasty, and has allowed ill-shapen sentences and sometimes
errors of fact to escape his notice.”
+ Sat. R. 104: 244. Ag. 24, ’07. 440w.
+

Whitson, John Harvey. Castle of doubt. † $1.50.


Little.
7–16940.

A novel in which a young man tells his own strange story.


While enjoying a spring-time stroll in Central Park he is suddenly
confronted by an up-to-date carriage containing two pretty
women, one of whom declares she is his wife. Despite his
remonstrance he is thrust into the carriage by the foot-man,
embraced, welcomed and carried off to a luxurious house where
he is told that he is Julian Randolph, a young millionaire whose
sudden disappearance was a matter of national comment two
years before. So far the story differs little from other novels of
mistaken identity, but the concluding chapters, which establish
the right of the hero to the love and the position he has come to
covet, are unusual, unexpected, and well handled.
“Belongs [to] the class of books written for that optimistic age
that still can believe, if only for twenty-four hours, that the book
last read is the best book ever written.” Frederic Taber Cooper.
+ Bookm. 25: 600. Ag. ’07. 550w.
“Is an interesting story, not without many instances in real life
to prove its plausibility.”
+ Ind. 63: 574. S. 5, ’07. 230w.
“The tale is as puzzling as a detective story, and the
denouement is as much a surprise to the hero as to the reader.”
+ N. Y. Times. 12: 386. Je. 15, ’07. 140w.
“The story is well told, and modern New York is graphically
pictured.”
+ Outlook. 86: 477. Je. 29, ’07. 100w.

* Whittier, John Greenleaf. John Greenleaf


Whittier: a sketch of his life, by Bliss Perry, with
selected poems. **75c. Houghton.
7–36386.

A short sketch of Whittier which leaves out the non-essentials


and presents the chief formative influences which made the
character and career of the poet. The poems chosen illustrate
the trend of his boyhood imagination, the political and social
struggle of his mature years, and the peace of the resting and
waiting in which his life was brought to a close.

Whys and wherefores of the automobile. il. 50c.


Automobile Institute, Cleveland, O.
A simple explanation of the elements of the gasoline motor
car, prepared for the non-technical reader.
Whyte, Christina Gowans. Adventures of
Merrywink. $2. Crowell.
A fresh, wholesome fairy tale which won the prize of £100
which the Bookman of London offered for the best story
submitted in a recent competition.

“The illustrations are unequal, and though some are very


feeble, others are exceptionally good.”
+ Acad. 71: 584. D. 8, ’06. 50w.

+ N. Y. Times. 12: 618. O. 12, ’07. 140w.


“The story is delightful, merry, and well written, certain to
please children.”
+ Outlook. 87: 310. O. 12, ’07. 50w.
“A very fair specimen of the modern fairy tale.”
+ Sat. R. 102: sup. 8. D. 8, ’06. 60w.

Whyte, Christina Gowans. Nina’s career. † $1.50.


Macmillan.
7–32567.

The doings of a group of wholesome English young folk are


chronicled in this story. The girl who was granddaughter to a
Liberal peer, the once-a-year friend who had to have an artistic
career, a delightful family of brothers and sisters, all help to
make a pleasing tale of youth, its amusements, ambitions, and
achievements.

“A cheerful story, full of life and movement, and by no means


lacking in humour.”
+ Ath. 1907, 2: 652. N. 23. 110w.

Whyte, Christina Gowans. Story book girls.


†$1.50. Macmillan.
6–41715.

“A group of English girls attempt to conduct their lives


according to story-book ideals. The difficulties in the way are
innumerable, but the faith is great, the rewards are many.”—
Outlook.

+ Acad. 71: 643. D. 22, ’06. 90w.

N. Y. Times. 11: 895. D. 22, ’06. 50w.


“A very interestingly planned and well-executed book, with a
delightfully fresh plot.”
+ Outlook. 85: 238. Ja. 26, ’07. 120w.

Widney, Joseph Pomeroy. Race-life of the Aryan


peoples. 2v. **$4. Funk.
7–23307.

v. 1. The old world. Beginning with the Asiatic period in the


race life of the Aryan people, their various emigrations are here
traced chronologically into India and South and West Europe.
The whole is an unfolding of “The race epic which the Aryan
peoples have lived.”
v. 2. The new world. In this volume the author carries his
“race epic” over seas and follows the westward march of the
Aryan people from ocean to ocean in America, discussing also
present day conditions and problems.

“It is what would be called in its own language a ‘live’ book,


and for that we are thankful. It is not to be expected that we
should sympathise wholly with American ideals and aspirations,
or even those of the best Americans, but we can pay Dr. Widney
no higher compliment than to wish that he had been born an
Englishman, so that he might have written this book from an
English point of view.”
+ Acad. 73: 161. N. 23, ’07. 990w.

“It is a pity that Mr. Widney, many of whose observations are
extremely shrewd, should have allowed a book that has evidently
cost him much labour to degenerate into a political pamphlet.”
+ Ath. 1907, 2: 484. O. 19. 970w.

“The best that can be said of the work is that it has swing and
style and may afford material for patriotic addresses. As for the
scientific value, it has none.”
− Ind. 63: 1375. D. 5, ’07. 410w.
“His book is not a compilation, nor is it a new statement of a
theme already set forth at length by other writers, but an
original conception worked out through fine research, carefully
coordinated and written in a clear and attractive style.”
+ Lit. D. 35: 208 Ag. 10, ’07. 420w.
+
“Though Widney’s book is instructive when read aright, that is,
with a clear conception of who the Aryan is and whence he
came, yet it is misleading, and very much so, if the reader
ignores scientific ethnology and anthropology as much as does
the author.” Charles E. Woodruff.
+ N. Y. Times. 12: 497. Ag. 17, ’07. 2380w.

“His style is animated and energetic; he is philosophic,
discursive, poetic; he is quick to trace analogies and mark
contrasts, fond of generalization and prone to turn history into
prophecy. The total impression of his work is realistic and
picturesque. His national and international forecasts, with one
prominent exception are the least satisfactory portion of his
work.”
+ Outlook. 86: 973. Ag. 31, ’07. 400w.

“Not only the latest result of scholarship in ethnology, but an
unusually absorbing narrative.”
+ R. of Rs. 36: 382. S. ’07. 270w.
+
“A highly interesting and suggestive book.”
+ Spec. 99: sup. 645. N. 2, ’07. 330w.

Wieland, George Reber. American fossil cycads.


$6.25. Carnegie inst.
6–34020.

“This contribution to American paleo-botany is richly illustrated


with fifty plates and 138 text figures. It is an account of the
American collections of fossil cycads—plants allied to the fern—
so far as they have been studied, and the results of the author’s
investigations on the vegetative anatomy and reproductive
organs, followed by a comparison of these with similar structures
in living cycads, and a discussion of relationships.”—Nation.

“The monograph is creditable to American botany and the


presswork of the Carnegie institution.”
+ Nation. 83: 471. N. 29, ’06. 220w.
“A flood of light has been thrown on the morphology of an
extinct group of Mesozoic gymnosperms, which it is possible to
study with a precision and thoroughness hardly to be surpassed
in the case of recent plants.”
+ Nature. 75: 329. Ja. 31, ’07. 1760w.
“Marks a very important forward step in our knowledge of the
cycadales, while it also throws a great deal of light upon the
general problem of the phylogeny of the gymnosperms and their
supposed relation to filicinean ancestors.” D. P. Penhallow.
+ Science, n. s. 25: 856. My. 31, ’07. 1530w.
+

Wiggin, Kate Douglas (Smith) (Mrs. George C.


Riggs). New chronicles of Rebecca. † $1.25.
Houghton.
7–11587.

Eleven more quaintly amusing chronicles which carry Rebecca


thru various stages of girlhood and bring her to her eighteenth
birthday. They are entitled: Jack o’lantern. Daughters of Zion,
Rebecca’s thought-book, A tragedy in millinery, The saving of the
colors, The state o’ Maine girl, The little prophet, Abner
Simpson’s new leaf, The green isle, Rebecca’s reminiscences,
Abijah the brave and fair Emmajane.

“Written with the quiet humour which is her characteristic.”


+ Acad. 73: 848. Ag. 31, ’07. 160w.

+ A. L. A. Bkl. 3: 138. My. ’07. ✠


“The pathos is kept commendably in check, however, and
there is plenty of humour in the chronicle.”
+ Ath. 1907, 2: 179. Ag. 17. 210w.
“The stories are brimming with mirth and kindly sentiment.”
Harry James Smith.
+ Atlan. 100: 133. Jl. ’07. 80w.
Reviewed by Mary K. Ford.
Bookm. 25: 304. My. ’07. 800w.
“The story, abounding in touches of genuine humor and
pathos, comes as a delightful treat to both the older and
younger reader.”
+ Cath. World. 85: 693. Ag. ’07. 120w.
“Conscious invention has taken the place of intuition. It is
inferior to its predecessor.”
+ Ind. 63: 574. S. 5, ’07. 240w.

“There are here the same quaintness, pathos, and humor
found in her former books, the same understanding of the
abysses of childhood, the same realism and fidelity to nature.
The pictures by F. C. Yohn are in perfect tune with the story and
a model of what novel illustrations should be.”
+ Lit. D. 34: 640. Ap. 20, ’07. 290w.
Nation. 84: 362. Ap. 18, ’07. 200w.
“This volume is not quite up to the level of its predecessor.”
+ N. Y. Times. 12: 233. Ap. 13, ’07. 940w.

+ N. Y. Times. 12: 387. Je. 15, ’07. 130w.


“‘New chronicles of Rebecca’ have ... freshness of sentiment
and humor.”
+ Outlook. 86: 115. My. 18, ’07. 190w.
“Those who did not make the acquaintance of Rebecca at
Sunnybrook farm are recommended not to miss the present
opportunity.”
+ Sat. R. 104: 86. Jl. 20, ’07. 200w.
“Worthily maintain the reputation of a writer who has done for
the present generation of American and English readers much
what Miss Alcott did for its predecessor.”
+ Spec. 98: 1037. Je. 29. ’07. 990w.

Wiggin, Kate Douglas (Smith) (Mrs. George C.


Riggs). Old Peabody pew; a Christmas romance
of a country church. il. †$1.50. Houghton.
7–32837.

A Christmas story of a “certain handful of dear New England


women of names unknown, dwelling in a certain quiet village,
alike unknown.” A new carpet, pews washed in lieu of paint, and
cushions mended with care told on Christmas eve the story of
days of hard work by the Dorcas society. Among the number had
been Nancy Wentworth who, quiet and apart from the rest, had
lavished her strength on the Peabody pew, sacred to her early
romance, where Christmas eve finds her alone taking the last
stitch in the worn-out cushion. To this spot comes Justin
Peabody the wanderer lover who, weary as the prodigal son,
seeks the comfort and love of Nancy.

“One of the prettiest novelettes of this season, as well as one


of the most delightful from a literary point of view.”
+ Dial. 43: 380. D. 1, ’07. 200w.
“It is withal so sweet and wholesome that we wish more books
like it might be written to take the place of the so-called
‘problem novels’ of the day.”
+ Lit. D. 35: 920. D. 14, ’07. 100w.
“Many pathetic and humorous touches.”
+ N. Y. Times. 12: 654. O. 19, ’07. 10w.
“Notwithstanding the slightness of the plot, there are all the
elements of humor and pathos and love that go to make up a
story of much sweetness, the kind one feels better for reading.”
+ N. Y. Times. 12: 716. N. 9, ’07. 100w.
“A characteristically bright tale of a New England life full of
sentiment and humor.”
+ Outlook. 87: 622. N. 23, ’07. 30w.

Wiggin, Kate Douglas (Smith) (Mrs. G. C.


Riggs), and Smith, Nora Archibald. Fairy ring.
**$1.50. McClure.
6–42427.

Sixty-five fairy tales gathered from every nation. They include


some well known stories and some recently discovered ones.

“A choice collection.”
+ A. L. A. Bkl. 3: 23. Ja. ’07. ✠
“Less hackneyed than those of the Cinderella kind. For that
reason they will read strangely, yet entertainingly to modern
ears.”
+ Ind. 61: 1407. D. 13, ’06. 40w.

N. Y. Times. 11: 784. N. 24, ’06. 170w.


“Most readable fairy tales.”
+ Outlook. 85: 93. Ja. 12, ’07. 70w.

* Wiggin, Mrs. Kate Douglas, and Smith, Nora


Archibald, eds. Pinafore and palace. † $1.50.
McClure.
7–30444.

“This volume of jingles is judiciously divided, somewhat like


Charles Welsh’s edition of ‘Mother Goose,’ to accord with the
physical activities and dawning mental appreciation of small folk.
There is a diversity of selection, ranging from ‘Pussy-cat, pussy-
cat, where have you been?’ to Tennyson’s least childlike and
most stilted poem, ‘Minnie and Winnie.’”—Nation.

+ A. L. A. Bkl. 3: 211. N. ’07. ✠


“Taken in a set, these three volumes of verse represent an
agreeable progress from classic jingle to rarest poetry.”
+ Nation. 85: 495. N. 28, ’07. 130w.

+ N. Y. Times. 12: 703. N. 2, ’07. 90w.


Wigram, Edgar T. A. Northern Spain; painted and
described by Edgar T. A. Wigram. *$6. Macmillan.
“The kind of description which lies halfway between the guide-
book and the book of atmosphere.” (Outlook.) “The author made
his tour as a bicyclist. He journeyed with observing eyes, and
very little in Spain that was really worth while escaped him.”
(Ind.) “Besides ‘hamlets’ and small towns, the traveler stopped
at the larger cities, including Covadonga and Asturias, Leon,
Galicia, Benavente, Zamora, Toro, Salamanca, Bejar, Avila,
Toledo, Segovia, Burgos, Navarre, and others.” (N. Y. Times.)

“One cannot open these pages anywhere without being struck


by our author’s capacity for presenting a scene in words at once
fit and few.”
+ Ath. 1907, 1: 9. Ja. 5. 1360w.
+
“As we read what he has written we see Spanish types with a
new significance, and we lay down the volume with a better and
a clearer understanding of Spain and the Spaniards.”
+ Ind. 61: 1398. D. 22, ’06. 150w.
“It is greatly to be regretted that Mr. Wigram ... was not
accompanied on his journey through Northern Spain by a
professional painter who would have been able to supplement
his eloquent descriptions of the scenes he visited by aesthetic
presentments of them in colour. Gifted, moreover, with a vivid
imagination and a keen sense of humor, Mr. Wigram manages to
hit off in a few telling sentences the idiosyncrasies not only of
the men and women, but of the animals he met.”
+ Int. Studio. 35: 167. Ap. ’07. 340w.

“Mr. Wigram has well caught in his pictures the varied colors of
Spain, which seem at first glance so inharmonious when viewed
by essentially Occidental eyes. But they are true, and the artist is
to be congratulated that he has dared to depict the truth and to
account for it so entertainingly in a most attractively written
text.”
+ N. Y. Times. 11: 770. N. 24, ’06. 620w.
+
“The author not only describes the country through which he
rode or walked, but also tells anecdotes, gives bits of the history
of certain places, and provides other interesting information.”
+ N. Y. Times. 11: 830. D. 1, ’06. 360w.
+
“An altogether unworthy successor to Ford and Borrow is Mr.
Wigram who possesses one faculty denied to those worthies—
namely, the facility of describing by picture as well as by pen.”
+ Outlook. 84: 703. N. 24, ’06. 100w.
“As a writer he harps too much upon merely pictorial effects,
which were doubtless attractive to an artist but suffer through
vain repetition. Though we may not claim him as guide or
philosopher, he is certainly well met as a soothing friend.”
+ Sat. R. 103:372. Mr. 23, ’07. 230w.

Wilberforce, Wilfrid, and Gilbert, Mrs. A. R. Her


faith against the world. *$l. Benziger.
A young barrister asks the aristocratic Sir Richard Forrester for
the hand of his daughter, Gertrude and is refused because he
lacks position. Later he gets into Parliament on assuring his
constituents that he is not a Roman Catholic. Sir Richard then
welcomes him, but Gertrude, who has joined the Roman church,
refuses to marry a Protestant, and is turned out of her father’s
house. The solution of this complication is the burden of this
political-religious novel.
“The book is written from the point of view of a Roman
Catholic, but without bitterness and intolerance.”
+ Acad. 71: 553. D. 1, ’06. 140w.
“An entertaining novel, although it is somewhat sketchy in
both action and character, and although it does carry a moral
instruction.”
+ Cath. World. 84: 701. F. ’07. 260w.

Wilcox, Earley Vernon. Farm animals: horses,


cows, sheep, swine, goats, poultry, etc. **$2.
Doubleday.
6–35959.

A practical book giving general information about the breeding


and care of farm animals.

“A good, popular guide.”


+ A. L. A. Bkl. 3: 106. Ap. 16, ’07.
“It is rather an excellent compend of general information. The
chapter on dairy stock is the best in the book, but every chapter
is good. The illustrations have the advantage of being well
related to the subject.”
+ Nation. 83: 402. N. 8, ’06. 140w.

Wilde, Oscar. Decorative art in America: a lecture,


together with letters, reviews, and interviews; ed.
with an introd. by Richard B. Glaenzer. **$1.50.
Brentano’s.
6–39452.

Mr. Glaenzer in his introduction sets forth the characteristics


chiefly as they pertain to art, of “the most pitiful dreamer, the
wittiest cynic and the most brilliant wit of his century.” The
nineteen essays or groups of letters which this volume includes
strike the dominant art notes of Oscar Wilde’s nature. Among the
personalities touched up by the “verbal colourist” are Mrs.
Langtry, Sarah Bernhardt, Whistler, Keats, and Kipling.

Wilde, Oscar Fingall O’Flahertie Wills. Ballad of


Reading gaol; drawings by Latimer J. Wilson. *$1.
Buckles.
7–16474.

In this new edition of the well-known ballad the spirit of the


gruesome revelation of a soul in torment is marred by the
illustrations which, lacking any subtle suggestion of the horrors
of the hangman and the terrors of death, are commonplace and
repellant.

Wiley, Harvey Washington. Foods and their


adulteration. Il. *$4. Blakiston.
7–19428.

This book, descriptive in character, reaches a large audience,


including the consumer, the manufacturer and the scientific as
well as the general reader. It treats of the origin, manufacture
and composition of food products; the description of common
adulterations, food standards and national food laws and
regulations. The information contained in this manual appeals
especially to the intelligent and scientific cook.
“The book is invaluable to the manufacturer and the consumer,
to the scientist and the layman; it is indispensable to even a
small collection on this subject of wide, present-day interest.”
+ A. L. A. Bkl. 3: 199. N. ’07.
“This is the most authoritative and comprehensive book that
has appeared on this important subject, and there is no other
man in America who is better fitted to handle it from both the
scientific and the legislative sides than the author.”
+ Ind. 63: 834. O. 3, ’07. 360w.
+
“This is not the book of a crank, and Dr. Wiley’s views
regarding the future of the American food-supply are in general
optimistic.”
+ Nation. 85: 213. S. 5, ’07. 750w.
+
“The information furnished by Dr. Wiley arms the public with
knowledge—knowledge of the conditions and of its own rights.”
+ N. Y. Times. 12: 404. Je. 22, ’07. 1370w.
+

+ R. of Rs. 36: 384. S. ’07. 120w.


“Amid a large mass of confusing and often exaggerated
newspaper articles dealing with the subject, it is a comfort to
find a book covering the field so completely, so sanely and withal
in so interesting a way.”
+ Science, n.s. 26: 714. N. 22, ’07. 880w.
+

Wiley, Sara King. Alcestis and other poems. **75c.


Macmillan.
5–32655.

Descriptive note in December, 1905.


+ Outlook. 85: 573. Mr. 9, ’07. 380w.

Wiley, Sara King. Coming of Philibert. **$1.25.


Macmillan.
7–18078.

A tragic poem-drama of three acts in which Prince Philibert,


who has been reared in the forest and kept unconscious of his
heritage, according to the wish of his dead father, is brought to
the court of Artacia by his twin brother, the young king who feels
that he has been unjustly dealt with. Here the world is opened to
him, all his latent emotions awake, and unwittingly, he usurps his
brother’s place in the hearts of his people, and comes to wear
his crown and marry his Clementia.

“It will bear reading. But, in the acting, it would appear


lamentably monotonous and wanting in almost every essential of
a play, notably characterization, contrast and ‘suspense.’”
+ Ind. 63: 571. S. 5, ’07. 330w.

“Is an interesting bit of dramatic blank verse which just misses
distinction.”
+ Nation. 85: 35. Jl. 11, ’07. 210w.
“As a play there is much good exposition but little vital action.
The verse is always correct, and occasionally there are flashes of
fine poetry.” Christian Gauss.
+ N. Y. Times. 12: 492. Ag. 10, ’07. 100w.

“Mrs. Drummond is an essentially feminine poet of fine insight
and delicate sensibility. The chief gain in ‘The coming of Philibert’
is the dramatic action and force.” Louise Collier Willcox.
+ No. Am. 186: 97. S. ’07. 270w.

Wilkinson, Florence. Silent door. †$1.50. McClure.


7–10292.

A village story ... “which revolves about Justinian Penrith,


incarnate genius of austerity, and a little child left ... upon his
doorstep. Given a beautiful daughter who had fled from home
some years previous for an affaire d’amour and whose
whereabouts had baffled all search—and you have the key to
‘The silent door.’” (N. Y. Times.)

“In Miss Wilkinson’s novel ... one recognizes the promise


rather than the achievement. The story taken as a whole is
unimpressive. The plot is mildly preposterous, and none of the
characters, not even little Rue herself, seems ever quite
detachable from the printed page. But the details of Miss
Wilkinson’s work are a constant delight.” Harry James Smith.
+ Atlan. 100: 132. Jl. ’07. 450w.

“The chief charm about Miss Wilkinson’s style is its absolute
lack of hurry. It is seldom that one encounters such genuine
charm in a volume constructed upon a plan so simple.”
+ Bookm. 25: 284. My. ’07. 480w.
+
“There are some fine pages of description. The humor is
abundant and genuine.”
+ Lit. D. 35: 98. Jl. 20, ’07. 330w.
“It has a pervasive, though not obtrusive, spiritual quality, and
leaves upon one an impression of sweetness and light.”
+ N. Y. Times. 12: 170. Mr. 23, ’07. 970w.

“In her first novel, she has accomplished something also rare,
and certainly thoroughly delightful.”
+ Outlook. 86: 254. Je. 1, ’07. 210w.

Wilkinson, Rt. Rev. Thomas Edward. Twenty


years of continental work and travel. *$3 50.
Longmans.
“The record of an Anglican bishop’s experience in north and
central Europe among British colonies, factories, and
communities, comprising an area eight times the size of Great
Britain.”—Lit. D.

“Bishop Wilkinson has great power of observation and much


skill in expressing that observation in words. There is in the
volume a good deal of padding which, should have been
omitted.”
+ Ath. 1906, 2: 580. N. 10. 1360w.

“An interesting panorama of Europe, with a fine historic
perspective.”
+ Lit. D. 34: 264. F. 16, ’07. 190w.

+ Spec. 98: 121. Ja. 26, ’07. 380w.


Willcocks, M. P. Wingless victory. $1.50. Lane.


7–35625.

Devonshire furnishes the setting of this story. “The plot


centres about the winning of an unloving and pretty nearly
unfaithful wife by her husband.... The husband is a physician, a
curious mixture of strength and weakness, heroism and failure,
and altogether a very human and lovable person. The wife is not
so comprehensible a type, but still real enough in her feminine
perversity and unreasonableness.... Johanna is of another type,
and she, too, makes one see deep down into the reality of
things. The whole book is alive with human passion, powerfully
portrayed, and with the vigor and freshness of the open air.” (N.
Y. Times.)

“Talent such as hers was not and never could be acquired in


any of the ready-made schools of fiction. It bears the stamp of
originality.”
+ Acad. 72: 319. Mr. 30, ’07. 550w.
+
“The author has certainly produced a notable as well as a
good story. It seems to us somewhat clogged by over
elaboration of style and metaphor.”
+ Ath. 1907, 1: 659. Je. 1. 250w.

“The book is the work of one who has thought much.
Scattered through it are gnomic sayings that stick in the
memory. These and an intimate sense of natural forces, are
perhaps the striking external features of the book.” Ward Clark.
+ Bookm. 25: 523. Jl. ’07. 450w.
“The book has strength ... although not in this plot with its
dubious ethical implications. It is the strength of keen analysis,
vivid descriptive power, and a characterization of the rustic
population of Devon and Dartmoor fairly comparable with the
work of Mr. Phillpotts and other disciples of the school of Thomas
Hardy.” Wm. M. Payne.
+ Dial. 43: 62. Ag. 1, ’07. 340w.
+

“An Ibsen plot set in a Thomas Hardy environment. The
combination is, on the whole, an effective one, for the author
has undoubted talent.”
+ Ind. 63: 1312. N. 28, ’07. 400w.
“In the case of Miss Willcock’s book ... we have need of some
emphatic word that shall signify a book that is not a season’s
masterpiece or a giant among pigmies, but, as we conceive, one
that takes its place, if not among the highest, still among books
where rules of measurement seem a little out of place.”
+ Lond. Times. 6: 110. Ap. 5, ’07. 540w.
“Rises high above the level of common day fiction. In Miss
Willcock’s elaborate descriptions we discern a certain scraping of
stage scenery being shifted. In the same way there is
unnecessary harping on such indefinable elements as ‘race-
processes’ and ‘electric forces of the ages’ unnecessary
reductions of action and feeling to terms of biology and
prehistoric anthropology.”
+ Nation. 85: 79. Jl. 25, ’07. 570w.
+

“A helpful and heartening story, not because any of its
characters are particularly high or heroic in their
accomplishment, but because it conveys that life itself in its
simple, homely, everyday guise is a thing worth while.”
+ N. Y. Times. 12: 365. Je. 8, ’07. 990w.
“A very remarkable piece of work, and not less interesting than
remarkable.”
+ N. Y. Times. 12: 387. Je. 15, ’07. 190w.
Sat. R. 103: 433. Ap. 6, ’07. 210w.
“No one except the serious-minded reader who loves a
problem novel should embark upon ‘The wingless victory.’”
+ Spec. 98: 679. Ap. 27, ’07. 210w.

Williams, Archibald. How it works: dealing in


simple language with steam, electricity, light,
heat, sound, hydraulics, optics, etc., and their
application to apparatus in common use. $1.25.
Nelson.
7–29122.

“Here the reader will find explained in a concise,


straightforward manner the working of everything from a
locomotive or a motorcar to a Bunsen burner or a Westinghouse
brake. The book is profusely illustrated with helpful diagrams,
and we are glad to note that an index has been provided.”—
Acad.

+ Acad. 71: 607. D. 15, ’06. 100w.


“Hardly any other volume will answer as many of the
questions that a bright boy asks and ought to ask about the
things he sees and uses. It should head the list of books to be
bought for school libraries.”
+ Ind. 62: 737. Mr. 28, ’07. 150w.
+
“The volume furnishes much that is practical and lucid.”
+ Outlook. 85: 813. Ap. 6, ’07. 80w.
Williams, Archibald. Romance of early exploration,
with descriptions of interesting discoveries,
thrilling adventures, and wonderful bravery of the
early explorers. *$1.50. Lippincott.
6–39449.

“The present book brings exploration down to A. D. 1600


beginning with its infancy 200 years before Herodotus. Pictures
and maps add desirabilty to the book.”—Nation.

“The writer’s own manner is one of manly straightforwardness,


as free from dulness as from misplaced embellishment.”
+ Nation. 83: 513. D. 13, ’06. 70w.
Reviewed by Cyrus C. Adams.
N. Y. Times. 11: 846. D. 8, ’06. 120w.
“An intelligent boy could hardly have a book which would give
him more entertainment and more instruction.”
+ Spec. 97: sup. 760. N. 17, ’06. 300w.

Williams, Egerton Ryerson, jr. Ridolfo, the


coming of the dawn, a tale of the Renaissance.
†$1.50. McClurg.
6–36880.

Descriptive note in Annual, 1906.


− Ind. 62: 673. Mr. 21, ’07. 100w.

+ Outlook. 85: 575. Mr. 9, ’07. 280w.


“One thing is certain about Mr. Williams’ first attempt to write
a novel; he has succeeded.”
R. of Rs. 36: 126. Jl. ’07. 40w.

Williams, Elizabeth Otis. Sojourning, shopping


and studying in Paris, a handbook particularly for
women. **$1. McClurg.
7–18307.

An excellent little book into which has been compressed a


wealth of valuable information for the woman who is traveling
alone in France. It contains the addresses of suitable hotels,
boarding houses, schools of art, places of amusement, and
shops in Paris, it tells what charges, fees, etc. are just, it
explains customs and conventions, tells where one may go
without an escort, what one may bring home without duty, how
to arrange one’s finances, and appends a classified vocabulary
which contains all the words and phrases essential to a shopping
tour or an excursion.

“A suggestive, helpful little handbook.”


+ A. L. A. Bkl. 3: 175. O. ’07.

+ Dial. 42: 381. Je. 16, ’07. 40w.


“Just the sort of information needed by American ladies in
Paris. And, altho written for women, we fancy that men will find
it almost as valuable.”
+ Ind. 62: 1357. Je. 6, ’07. 70w.

R. of Rs. 36: 126. Jl. ’07. 40w.


Williams, Henry Llewellyn, jr., comp. Lincoln
story book. **$1.50. Dillingham.
7–8232.

It is the story-telling Lincoln shorn of platform oratory who is


revealed in this generous collection of anecdotes. There are over
four hundred of them and in the retelling nothing of the humor,
or of the tone of the classics has been sacrificed.

Williams, Hugh Noel. Madame Recamier and her


friends. *$2. Scribner.
The details of the long salon-reign of Mme. Récamier are
carefully set forth here. “With no commanding ability such as in
itself might draw a group about her, yet, in wealth and in
poverty, in court favor and banishment, in youth and in age,
Mme. Récamier was ever the center of a great circle, and ever
herself simple, contented, generous, unspoiled by attention from
all the famous people of her time.” (Ind.)

“Granting the ‘raison d’etre’ of the biography, it may be said


that the author has conscientiously studied the life of his
heroine, together with those of her friends as they affected hers,
and presents the results in a pleasant, easy manner, which
makes the book an entertaining one.”
+ Dial. 43: 44. Jl. 16, ’07. 260w.
“A most satisfactory story of an extraordinary career.”
+ Ind. 63: 342. Ag. 8, ’07. 170w.
Reviewed by Hildegarde Hawthorne.
Putnam’s. 2: 475. Jl. ’07. 150w.
Williams, Hugh Noel. Queen Margot, wife of
Henry IV. of France. *$7.50. Scribner.
7–25144.

Daughter of Catherine de Medici, wife of Henry of Navarre, the


brilliant La Reine Margot is revealed in both an attractive and
forbidding light. She figures thruout the sketch as a being
mightily swayed by emotions yet capable of detaching herself
from them as in the case of her “debonair equanimity of mind”
when divorced from her husband, and called upon to mingle with
his new queen and their children.

“On the whole, the author has succeeded in his endeavour to


give a full and impartial account of her life, and has acquitted
himself satisfactorily of his secondary aim—that of sketching the
historical events ‘in which she was more or less directly
concerned.’”
+ Ath. 1907, 1. 68. Ja. 19. 2090w.

“Despite this special diligence and an adequate knowledge of
sixteenth century memoirs, we have found this book enriched by
little illuminating criticism.”
+ Nation. 84: 17. Jl. 4, ’07. 430w.

+ N. Y. Times. 12: 83. F. 2, ’07. 720w.

Williams, James Mickel. An American town: a


sociological study. Priv. ptd.
6–46255.

You might also like