Tải bản đầy đủ (.pdf) (59 trang)

microsoft visual basic game programming with directx phần 10 pptx

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (3.97 MB, 59 trang )

.NET Game Programming with DirectX 9.0
by Alexandre Santos Lobão and Ellen
Hatton

ISBN:1590590511
Apress
© 2003
(696 pages)
The authors of this text show how easy it can be to produce
interesting multimedia games using Managed DirectX 9.0 and
programming with Visual Basic .NET on Everett, the latest
version of Microsoft's Visual Studio.

Table of Contents
.NET Game Programming with DirectX 9.0
Foreword
Preface
Introduction
Chapter 1
-
.Nettrix: GDI+ and Collision Detection
Chapter 2
-
.Netterpillars: Artificial Intelligence and Sprites
Chapter 3
-
Managed DirectX First Steps: Direct3D Basics and DirectX vs. GDI+
Chapter 4
-
River Pla.Net: Tiled Game Fields, Scrolling, and DirectAudio
Chapter 5


-
River Pla.Net II: DirectInput and Writing Text to Screen
Chapter 6
-
Magic KindergarteN.: Adventure Games, ADO.NET, and DirectShow
Chapter 7
-
Magic KindergarteN. II: Animation Techniques and Speech API
Chapter 8
-
.Netterpillars II: Multiplayer Games and Directplay
Chapter 9
-
D-iNfEcT: Multithreading, Nonrectangular Windows, and Access to
Nonmanaged Code
Bonus Chapter Porting .Nettrix to Pocket PC
Appendix A
-
The State of PC Gaming
Appendix B
-
Motivations in Games
Appendix C
-
How Do I Make Games?
Appendix D
-
Guidelines for Developing Successful Games
Index
List of Figures

List of Tables
comparison operators,
55
compatibility, devices and,
575
competition
market,
628–29
player,
614
compilation errors, porting games and,
583–86
complex user interfaces, player motivation and,
616
compromises, game development,
596–98
computer-controlled players,
73, 95,
488
.
See

also

nonplayer characters
(
NPCs
)
configurations
game, 87 (

see also

configuration screens
)
server,
504
service provider,
500–501
configuration screens
.Netterpillars,
87, 95, 99,
124–29
.Netterpillars II,
503–4
.Nettrix,
66
Connection objects,
356–57
connections
ADO.NET,
356–57
client-server,
479–80
peer-to-peer,
478–79
to remote sessions,
512–13
ring, network groups, and broadcasting,
481–82
types,

478–82
Connect method,
512
constants,
52
constant world games,
484–85
consumer content, facilitating,
633
consumer expectations,
597–601
.
See also
players
broad audiences and,
628
high-end,
599–600
low-end,
600–601
and unsuccessful movement of games to 3D environments,
598–99
value and gameplay,
598
context-based games,
484–85
contrast,
615
conversion
data type,

267
text to speech, 437–39 (
see also

Speech API
)
cooperation levels
DirectInput,
303
DirectSound,
237–38
CooperativeLevelFlags enumeration,
303
coordinate systems, 3-D,
152–59
camera position and,
158–59
projections,
152–55
matrix transformations,
156–58
costs
.NET Game Programming with DirectX 9.0
by Alexandre Santos Lobão and Ellen
Hatton

ISBN:1590590511
Apress
© 2003
(696 pages)

The authors of this text show how easy it can be to produce
interesting multimedia games using Managed DirectX 9.0 and
programming with Visual Basic .NET on Everett, the latest
version of Microsoft's Visual Studio.

Table of Contents
.NET Game Programming with DirectX 9.0
Foreword
Preface
Introduction
Chapter 1
-
.Nettrix: GDI+ and Collision Detection
Chapter 2
-
.Netterpillars: Artificial Intelligence and Sprites
Chapter 3
-
Managed DirectX First Steps: Direct3D Basics and DirectX vs. GDI+
Chapter 4
-
River Pla.Net: Tiled Game Fields, Scrolling, and DirectAudio
Chapter 5
-
River Pla.Net II: DirectInput and Writing Text to Screen
Chapter 6
-
Magic KindergarteN.: Adventure Games, ADO.NET, and DirectShow
Chapter 7
-

Magic KindergarteN. II: Animation Techniques and Speech API
Chapter 8
-
.Netterpillars II: Multiplayer Games and Directplay
Chapter 9
-
D-iNfEcT: Multithreading, Nonrectangular Windows, and Access to
Nonmanaged Code
Bonus Chapter Porting .Nettrix to Pocket PC
Appendix A
-
The State of PC Gaming
Appendix B
-
Motivations in Games
Appendix C
-
How Do I Make Games?
Appendix D
-
Guidelines for Developing Successful Games
Index
List of Figures
List of Tables
game development,
597
low-end games,
600–601
CreateFlags enumeration,
147–48

CreateGameField method,
533–35
CreateSoundBufferFromFile function,
238
critical sections,
550
culling,
163
,
199
curves
Bezier,
561
spline,
3
cut-scenes,
354
cyclic approach, object-oriented,
25
cycling, mouse pointer,
399
cycling movements, animation and,
424–26
.NET Game Programming with DirectX 9.0
by Alexandre Santos Lobão and Ellen
Hatton

ISBN:1590590511
Apress
© 2003

(696 pages)
The authors of this text show how easy it can be to produce
interesting multimedia games using Managed DirectX 9.0 and
programming with Visual Basic .NET on Everett, the latest
version of Microsoft's Visual Studio.

Table of Contents
.NET Game Programming with DirectX 9.0
Foreword
Preface
Introduction
Chapter 1
-
.Nettrix: GDI+ and Collision Detection
Chapter 2
-
.Netterpillars: Artificial Intelligence and Sprites
Chapter 3
-
Managed DirectX First Steps: Direct3D Basics and DirectX vs. GDI+
Chapter 4
-
River Pla.Net: Tiled Game Fields, Scrolling, and DirectAudio
Chapter 5
-
River Pla.Net II: DirectInput and Writing Text to Screen
Chapter 6
-
Magic KindergarteN.: Adventure Games, ADO.NET, and DirectShow
Chapter 7

-
Magic KindergarteN. II: Animation Techniques and Speech API
Chapter 8
-
.Netterpillars II: Multiplayer Games and Directplay
Chapter 9
-
D-iNfEcT: Multithreading, Nonrectangular Windows, and Access to
Nonmanaged Code
Bonus Chapter Porting .Nettrix to Pocket PC
Appendix A
-
The State of PC Gaming
Appendix B
-
Motivations in Games
Appendix C
-
How Do I Make Games?
Appendix D
-
Guidelines for Developing Successful Games
Index
List of Figures
List of Tables
Index
D
data
access (
see

ADO.NET data access
)
internal, and artificial intelligence,
73
models,
381–82
,
456
PC gaming market sales,
604–9
types (
see
data types
)
DataAdapter objects,
356–57
DataReader objects,
356–57
DataSet objects,
356–57
data types
multiplayer games and,
486–87
Visual Basic .NET,
34,
244
,
267
dead zone, joystick,
305

death match game,
520
debugging, porting games and,
585
decisions, commercial games and,
629–30
Declare statement,
557
Deer Hunter game,
600–601
,
605
demo games,
610
deploying programs to emulator,
577–80
depth buffers, DirectX,
148
designed content limit,
613
designing games by playing,
629
desktop PC programs and operating systems on mobile devices,
580–81
destroying sessions,
502–5
development, game.
See

game development

device contexts, creating Graphics objects from specified handles to,
6–7
devices
APIs and,
435
capabilities,
168
compatibility and,
575
DirectX,
146–51
,
158
,
168
,
171–72
,
234
input (
see
input devices
)
mobile (
see

mobile devices
)
writing text to,
291–95

,
337–39
Diablo games,
603–4
,
608
,
609
,
633
dialog boxes,
129
dialogs, Magic KindergarteN II
answer blocks and, dialog paths,
451–53
adding support for, to active objects,
457–59
coding,
462–73
finishing,
471–73
letting player choose character's speech,
465–69
mouse events and,
462–63
.NET Game Programming with DirectX 9.0
by Alexandre Santos Lobão and Ellen
Hatton

ISBN:1590590511

Apress
© 2003
(696 pages)
The authors of this text show how easy it can be to produce
interesting multimedia games using Managed DirectX 9.0 and
programming with Visual Basic .NET on Everett, the latest
version of Microsoft's Visual Studio.

Table of Contents
.NET Game Programming with DirectX 9.0
Foreword
Preface
Introduction
Chapter 1
-
.Nettrix: GDI+ and Collision Detection
Chapter 2
-
.Netterpillars: Artificial Intelligence and Sprites
Chapter 3
-
Managed DirectX First Steps: Direct3D Basics and DirectX vs. GDI+
Chapter 4
-
River Pla.Net: Tiled Game Fields, Scrolling, and DirectAudio
Chapter 5
-
River Pla.Net II: DirectInput and Writing Text to Screen
Chapter 6
-

Magic KindergarteN.: Adventure Games, ADO.NET, and DirectShow
Chapter 7
-
Magic KindergarteN. II: Animation Techniques and Speech API
Chapter 8
-
.Netterpillars II: Multiplayer Games and Directplay
Chapter 9
-
D-iNfEcT: Multithreading, Nonrectangular Windows, and Access to
Nonmanaged Code
Bonus Chapter Porting .Nettrix to Pocket PC
Appendix A
-
The State of PC Gaming
Appendix B
-
Motivations in Games
Appendix C
-
How Do I Make Games?
Appendix D
-
Guidelines for Developing Successful Games
Index
List of Figures
List of Tables
mouse pointer,
459–60
planning,

354
,
362
presenting dialog choices on screen,
463–65
reviewing,
469–71
user interface and,
454
diamond-shaped objects
calculating collisions for,
16
extending proximity algorithms for 3-D,
22
differentiation, commercial games and,
628–29
difficulty levels.
See

levels
Dim statement,
34
D-iNfEcT game,
547–74
accessing nonmanaged code,
556–58
,
571–72
child window movement,
569–70

coding phase,
561
game over conditions,
570–71
improving interface,
573
main window,
561–66
multithreading,
548–52
nonrectangular windows,
553–56
project,
559–61
proposal,
559
sounds,
569–72
suggestions for improvements,
573
threads,
566–69
DirectAudio
DirectMusic, DirectSound, and,
233–36
DirectX and, 145 (
see also

DirectX
)

River Pla.Net classes,
236–49
,
283–85
DirectDraw object,
144
,
145
DirectInput
basic routines,
297
classes for River Pla.Net II, 297–301 (
see also
River Pla.Net II game
)
DirectX and, 145 (
see also

DirectX
)
force-feed joysticks,
341–46
including support for joysticks and keyboards,
319–21
input devices,
295
mouse pointer and,
400–402
threading,
296

direction
force-feed joystick,
342
scrolling,
212
DirectMusic
DirectAudio, DirectSound, and,
233–36
DirectX and, 145 (
see also

DirectX
)
River Pla.Net class,
239–49
,
283–85
,
339
DirectMusic Producer,
233
DirectPlay,
491–93
.
See also

multiplayer games
;
.Netterpillars II game
broadcasting,

482
DirectX and, 145 (
see also

DirectX
)
hosts and clients,
491–92
,
493
for Pocket PC,
580
.NET Game Programming with DirectX 9.0
by Alexandre Santos Lobão and Ellen
Hatton

ISBN:1590590511
Apress
© 2003
(696 pages)
The authors of this text show how easy it can be to produce
interesting multimedia games using Managed DirectX 9.0 and
programming with Visual Basic .NET on Everett, the latest
version of Microsoft's Visual Studio.

Table of Contents
.NET Game Programming with DirectX 9.0
Foreword
Preface
Introduction

Chapter 1
-
.Nettrix: GDI+ and Collision Detection
Chapter 2
-
.Netterpillars: Artificial Intelligence and Sprites
Chapter 3
-
Managed DirectX First Steps: Direct3D Basics and DirectX vs. GDI+
Chapter 4
-
River Pla.Net: Tiled Game Fields, Scrolling, and DirectAudio
Chapter 5
-
River Pla.Net II: DirectInput and Writing Text to Screen
Chapter 6
-
Magic KindergarteN.: Adventure Games, ADO.NET, and DirectShow
Chapter 7
-
Magic KindergarteN. II: Animation Techniques and Speech API
Chapter 8
-
.Netterpillars II: Multiplayer Games and Directplay
Chapter 9
-
D-iNfEcT: Multithreading, Nonrectangular Windows, and Access to
Nonmanaged Code
Bonus Chapter Porting .Nettrix to Pocket PC
Appendix A

-
The State of PC Gaming
Appendix B
-
Motivations in Games
Appendix C
-
How Do I Make Games?
Appendix D
-
Guidelines for Developing Successful Games
Index
List of Figures
List of Tables
service providers,
492
sessions,
492–93
TCP protocol,
489
,
490–91
DirectSetup,
145
.
See also

DirectX
DirectShow
DirectX and, 145 (

see also

DirectX
)
Magic KindergarteN, 407–9 (
see also

Magic KindergarteN game
)
streaming media and,
347
,
358–61
DirectSound
DirectAudio, DirectMusic, and,
233–36
DirectX and, 145 (
see also

DirectX
)
River Pla.Net class,
236–39
,
283–85
Direct3D
application pattern,
218
application project,
167–69

application proposal,
167
coding phase,
168–69
colored lights,
193–97
coordinate systems and projections,
152–59
DirectX and, 143 (
see also

DirectX
)
drawing primitives and texture,
159–66
full-screen sample,
186–87
game engine class for River Pla.Net game,
218–25
GDI+ vs.,
207–8
initializing,
268
main window,
170–77
simple program,
151–52
smoothing animations with frame rates,
205–7
sprite class for River Pla.Net game,

225–33
testing matrix transformations,
197–205
transparent textures,
188–92
windowed sample,
177–85
Direct3DX,
145
DirectX,
143–50
adapters,
146
devices,
146–50
Direct3D and, 143 (
see also

Direct3D
)
display modes,
150
Font object,
292–95
,
337–39
GDI+ vs.,
207–8
SDK,
143

,
170
,
234
,
243
,
344
top-level objects,
144–45
Windows CE and,
580–81
disconnected data,
356
display modes, DirectX,
150
,
172–74
,
181
Dispose method,
86,
109
,
171
,
184–85
,
233
.

See

also

garbage collection
distance
hearing,
78
proximity between objects,
14–16
, 22
seeing,
76–77
DllImport,
557
,
572
DMUS_APATH enumeration,
242
.NET Game Programming with DirectX 9.0
by Alexandre Santos Lobão and Ellen
Hatton

ISBN:1590590511
Apress
© 2003
(696 pages)
The authors of this text show how easy it can be to produce
interesting multimedia games using Managed DirectX 9.0 and
programming with Visual Basic .NET on Everett, the latest

version of Microsoft's Visual Studio.

Table of Contents
.NET Game Programming with DirectX 9.0
Foreword
Preface
Introduction
Chapter 1
-
.Nettrix: GDI+ and Collision Detection
Chapter 2
-
.Netterpillars: Artificial Intelligence and Sprites
Chapter 3
-
Managed DirectX First Steps: Direct3D Basics and DirectX vs. GDI+
Chapter 4
-
River Pla.Net: Tiled Game Fields, Scrolling, and DirectAudio
Chapter 5
-
River Pla.Net II: DirectInput and Writing Text to Screen
Chapter 6
-
Magic KindergarteN.: Adventure Games, ADO.NET, and DirectShow
Chapter 7
-
Magic KindergarteN. II: Animation Techniques and Speech API
Chapter 8
-

.Netterpillars II: Multiplayer Games and Directplay
Chapter 9
-
D-iNfEcT: Multithreading, Nonrectangular Windows, and Access to
Nonmanaged Code
Bonus Chapter Porting .Nettrix to Pocket PC
Appendix A
-
The State of PC Gaming
Appendix B
-
Motivations in Games
Appendix C
-
How Do I Make Games?
Appendix D
-
Guidelines for Developing Successful Games
Index
List of Figures
List of Tables
DoEvents method,
60
Doom game,
596
,
604
Down method, Block class,
41–44
drafts, object-oriented analysis and multiple,

95
drawing
Branch class method,
105–6
Direct3D primitives,
159–63
DirectX sprites,
232
Font object method,
293
GameFont class method,
294–95
MagicKindergarteN characters,
369–71
,
410–17
Player class method,
275–77
RiverEngine class method,
269–71
sprites,
81, 82,
85–86
tiles,
289–90
drivers,
31, 35,
435
D3DX utility library,
158

Dungeons and Dragons game,
348
duration, force-feed joystick,
342
.NET Game Programming with DirectX 9.0
by Alexandre Santos Lobão and Ellen
Hatton

ISBN:1590590511
Apress
© 2003
(696 pages)
The authors of this text show how easy it can be to produce
interesting multimedia games using Managed DirectX 9.0 and
programming with Visual Basic .NET on Everett, the latest
version of Microsoft's Visual Studio.

Table of Contents
.NET Game Programming with DirectX 9.0
Foreword
Preface
Introduction
Chapter 1
-
.Nettrix: GDI+ and Collision Detection
Chapter 2
-
.Netterpillars: Artificial Intelligence and Sprites
Chapter 3
-

Managed DirectX First Steps: Direct3D Basics and DirectX vs. GDI+
Chapter 4
-
River Pla.Net: Tiled Game Fields, Scrolling, and DirectAudio
Chapter 5
-
River Pla.Net II: DirectInput and Writing Text to Screen
Chapter 6
-
Magic KindergarteN.: Adventure Games, ADO.NET, and DirectShow
Chapter 7
-
Magic KindergarteN. II: Animation Techniques and Speech API
Chapter 8
-
.Netterpillars II: Multiplayer Games and Directplay
Chapter 9
-
D-iNfEcT: Multithreading, Nonrectangular Windows, and Access to
Nonmanaged Code
Bonus Chapter Porting .Nettrix to Pocket PC
Appendix A
-
The State of PC Gaming
Appendix B
-
Motivations in Games
Appendix C
-
How Do I Make Games?

Appendix D
-
Guidelines for Developing Successful Games
Index
List of Figures
List of Tables
Index
E
Earthworm Jim game,
598
easter eggs,
354
education, gameplay vs.,
634
effects, flashy,
612
,
614
effects, sound.
See
sounds
Effect structure,
343–44
Electronic Arts,
596
emotions, animating posture to reveal,
429–30
empty map games,
627
.

See also

commercial games
emulator, deploying programs to,
577–80
EnableAutoDepthStencil structure,
148
encryption,
488
ending games
animated sequences for,
476
D-iNfEcT criteria,
570–71
game over screens (
see

game over screens
)
player motivation and,
616
proposals and criteria for,
24
side scroller games,
622
End method,
293
EndScene method,
151
EndsWith method,

244
engines, game.
See

game engines
Ensemble Studios,
627
,
629
enumerations,
52
environmental AI,
73
environmental variables,
74
environments, 3D,
598–99
e parameter, creating Graphics objects with,
5
epic games as franchise games,
631
erasing sprites,
85–86
errors
avoiding, in multithreaded programs,
550–52
Direct3D programs and,
152
multiplayer games and,
489

porting games and,
583–86
structured handling of,
58,
245
Esc key,
65–66
,
109
,
138
,
185
event handlers,
5
,
196
events
D-iNfEcT,
559–60
DirectPlay,
495
.NET Game Programming with DirectX 9.0
by Alexandre Santos Lobão and Ellen
Hatton

ISBN:1590590511
Apress
© 2003
(696 pages)

The authors of this text show how easy it can be to produce
interesting multimedia games using Managed DirectX 9.0 and
programming with Visual Basic .NET on Everett, the latest
version of Microsoft's Visual Studio.

Table of Contents
.NET Game Programming with DirectX 9.0
Foreword
Preface
Introduction
Chapter 1
-
.Nettrix: GDI+ and Collision Detection
Chapter 2
-
.Netterpillars: Artificial Intelligence and Sprites
Chapter 3
-
Managed DirectX First Steps: Direct3D Basics and DirectX vs. GDI+
Chapter 4
-
River Pla.Net: Tiled Game Fields, Scrolling, and DirectAudio
Chapter 5
-
River Pla.Net II: DirectInput and Writing Text to Screen
Chapter 6
-
Magic KindergarteN.: Adventure Games, ADO.NET, and DirectShow
Chapter 7
-

Magic KindergarteN. II: Animation Techniques and Speech API
Chapter 8
-
.Netterpillars II: Multiplayer Games and Directplay
Chapter 9
-
D-iNfEcT: Multithreading, Nonrectangular Windows, and Access to
Nonmanaged Code
Bonus Chapter Porting .Nettrix to Pocket PC
Appendix A
-
The State of PC Gaming
Appendix B
-
Motivations in Games
Appendix C
-
How Do I Make Games?
Appendix D
-
Guidelines for Developing Successful Games
Index
List of Figures
List of Tables
game engines and,
27
input devices and,
297
,
319–21

Paint,
5
Viseme,
446–47
Everquest game,
607
,
617
exclusive input device access,
303
expansion packs,
602
expectations.
See

commercial games
;
consumer expectations
;
industry expectations
.NET Game Programming with DirectX 9.0
by Alexandre Santos Lobão and Ellen
Hatton

ISBN:1590590511
Apress
© 2003
(696 pages)
The authors of this text show how easy it can be to produce
interesting multimedia games using Managed DirectX 9.0 and

programming with Visual Basic .NET on Everett, the latest
version of Microsoft's Visual Studio.

Table of Contents
.NET Game Programming with DirectX 9.0
Foreword
Preface
Introduction
Chapter 1
-
.Nettrix: GDI+ and Collision Detection
Chapter 2
-
.Netterpillars: Artificial Intelligence and Sprites
Chapter 3
-
Managed DirectX First Steps: Direct3D Basics and DirectX vs. GDI+
Chapter 4
-
River Pla.Net: Tiled Game Fields, Scrolling, and DirectAudio
Chapter 5
-
River Pla.Net II: DirectInput and Writing Text to Screen
Chapter 6
-
Magic KindergarteN.: Adventure Games, ADO.NET, and DirectShow
Chapter 7
-
Magic KindergarteN. II: Animation Techniques and Speech API
Chapter 8

-
.Netterpillars II: Multiplayer Games and Directplay
Chapter 9
-
D-iNfEcT: Multithreading, Nonrectangular Windows, and Access to
Nonmanaged Code
Bonus Chapter Porting .Nettrix to Pocket PC
Appendix A
-
The State of PC Gaming
Appendix B
-
Motivations in Games
Appendix C
-
How Do I Make Games?
Appendix D
-
Guidelines for Developing Successful Games
Index
List of Figures
List of Tables
Index
F
failure of artificial intelligence,
73–74
familiarity, consumer,
609
fast sprite drawing,
81–82

.
See also

performance
features, project.
See

proposals
feedback, player,
610
females,
628
fields, game.
See

game fields
files, music and sound,
234
fill modes,
555–56
FillRectangle method,
5
Finalize method, GameMusic class,
248–49
Finally keyword,
58
FindHosts method,
506–8
finishing games,
622–26

,
634
FireTeam game,
484
FiringSquad site,
595
fixed paths,
79
flashy effects,
612
,
614
flexible parts, animation and,
427
flexible vertex formats (FVF),
163–66
,
181–83
,
193–94
,
197–98
,
219
,
396–97
.
See also
vertex collections
Flight Simulator game,

608
Font object,
293
,
337
Force Editor,
341
force-feed joysticks,
317
,
341–46
foreground access to input devices,
303
forms.
See also

screens
;
windows
game engines in,
60–63
Visual Basic .NET and,
109
,
129
FPU_Preserve flag,
148
frame rates
Direct3D animation and,
179

,
205–7
multiplayer game start,
544–45
River Pla.Net,
272
,
275
frames, animation,
424–25
franchise games
building upon,
602–3
creating commercial, 631 (
see also

commercial games
)
industry expectations and,
601–4
realistic game development goals and,
617
sales data,
608–9
successful,
603–4
Frankenstein syndrome,
53
.NET Game Programming with DirectX 9.0
by Alexandre Santos Lobão and Ellen

Hatton

ISBN:1590590511
Apress
© 2003
(696 pages)
The authors of this text show how easy it can be to produce
interesting multimedia games using Managed DirectX 9.0 and
programming with Visual Basic .NET on Everett, the latest
version of Microsoft's Visual Studio.

Table of Contents
.NET Game Programming with DirectX 9.0
Foreword
Preface
Introduction
Chapter 1
-
.Nettrix: GDI+ and Collision Detection
Chapter 2
-
.Netterpillars: Artificial Intelligence and Sprites
Chapter 3
-
Managed DirectX First Steps: Direct3D Basics and DirectX vs. GDI+
Chapter 4
-
River Pla.Net: Tiled Game Fields, Scrolling, and DirectAudio
Chapter 5
-

River Pla.Net II: DirectInput and Writing Text to Screen
Chapter 6
-
Magic KindergarteN.: Adventure Games, ADO.NET, and DirectShow
Chapter 7
-
Magic KindergarteN. II: Animation Techniques and Speech API
Chapter 8
-
.Netterpillars II: Multiplayer Games and Directplay
Chapter 9
-
D-iNfEcT: Multithreading, Nonrectangular Windows, and Access to
Nonmanaged Code
Bonus Chapter Porting .Nettrix to Pocket PC
Appendix A
-
The State of PC Gaming
Appendix B
-
Motivations in Games
Appendix C
-
How Do I Make Games?
Appendix D
-
Guidelines for Developing Successful Games
Index
List of Figures
List of Tables

Frogger game,
599
,
605
FromARGB method,
166
,
194–95
FromHDC method,
6–7
FromHwnd method,
6
FromImage method,
6
full-screen mode,
167
,
168
,
186–87
full scrollers,
212
fun, player
commercial games and,
630–31
interesting decisions as,
629–30
low-end games and,
601
.NET Game Programming with DirectX 9.0

by Alexandre Santos Lobão and Ellen
Hatton

ISBN:1590590511
Apress
© 2003
(696 pages)
The authors of this text show how easy it can be to produce
interesting multimedia games using Managed DirectX 9.0 and
programming with Visual Basic .NET on Everett, the latest
version of Microsoft's Visual Studio.

Table of Contents
.NET Game Programming with DirectX 9.0
Foreword
Preface
Introduction
Chapter 1
-
.Nettrix: GDI+ and Collision Detection
Chapter 2
-
.Netterpillars: Artificial Intelligence and Sprites
Chapter 3
-
Managed DirectX First Steps: Direct3D Basics and DirectX vs. GDI+
Chapter 4
-
River Pla.Net: Tiled Game Fields, Scrolling, and DirectAudio
Chapter 5

-
River Pla.Net II: DirectInput and Writing Text to Screen
Chapter 6
-
Magic KindergarteN.: Adventure Games, ADO.NET, and DirectShow
Chapter 7
-
Magic KindergarteN. II: Animation Techniques and Speech API
Chapter 8
-
.Netterpillars II: Multiplayer Games and Directplay
Chapter 9
-
D-iNfEcT: Multithreading, Nonrectangular Windows, and Access to
Nonmanaged Code
Bonus Chapter Porting .Nettrix to Pocket PC
Appendix A
-
The State of PC Gaming
Appendix B
-
Motivations in Games
Appendix C
-
How Do I Make Games?
Appendix D
-
Guidelines for Developing Successful Games
Index
List of Figures

List of Tables
Index
G
Galaga game,
622
game development,
617-26
.
See also

.NET game programming
budgets and schedules vs. quality,
634
building understanding of,
623
compromises,
596-98
costs,
597
financial expectations,
624-25
first level Tetris-like games,
618-19
guidelines for commercial, 627-34 (
see also

commercial games
)
polishing games,
622-23

pride in finished games,
625
second level games,
619-22
starting small,
617-18
GameDev.Net site,
611
game engines
in forms,
61
Magic KindergarteN,
376-78
,
402-3
Magic KindergarteN II,
462-69
main program and,
97
.Netterpillars,
88-91
,
94-97
,
106-10
,
115-24
.Netterpillars II,
532-38
.Nettrix,

27-29
,
60-63
.Nettrix II,
586-87
River Pla.Net,
218-25
,
260
,
262-63
,
277
River Pla.Net II,
316
,
339-41
scrolling and,
213
game fields.
See also

screens
collision detection and,
17-21
Magic KindergarteN,
376
.Netterpillars,
86, 87,
100

,
131
.Netterpillars II,
533-38
.Nettrix,
29-30
,
53-60
, 66
.Nettrix II,
589-93
neverending,
289
River Pla.Net,
251-56
,
262-71
,
289
GameFont class, River Pla.Net II,
292-95
,
337-39
game limit,
613
GameMusic class, River Pla.Net,
239-49
,
283-85
,

339
game over screens.
See also

ending games
.Netterpillars,
131-32
,
138-40
.Netterpillars II,
542-43
game physics
artificial intelligence vs.,
72
game engines and, 95 (
see also

game engines
)
gameplay.
See also

playing
accessible, in first fifteen minutes,
630
Alice game,
596
basic,
623
.NET Game Programming with DirectX 9.0

by Alexandre Santos Lobão and Ellen
Hatton

ISBN:1590590511
Apress
© 2003
(696 pages)
The authors of this text show how easy it can be to produce
interesting multimedia games using Managed DirectX 9.0 and
programming with Visual Basic .NET on Everett, the latest
version of Microsoft's Visual Studio.

Table of Contents
.NET Game Programming with DirectX 9.0
Foreword
Preface
Introduction
Chapter 1
-
.Nettrix: GDI+ and Collision Detection
Chapter 2
-
.Netterpillars: Artificial Intelligence and Sprites
Chapter 3
-
Managed DirectX First Steps: Direct3D Basics and DirectX vs. GDI+
Chapter 4
-
River Pla.Net: Tiled Game Fields, Scrolling, and DirectAudio
Chapter 5

-
River Pla.Net II: DirectInput and Writing Text to Screen
Chapter 6
-
Magic KindergarteN.: Adventure Games, ADO.NET, and DirectShow
Chapter 7
-
Magic KindergarteN. II: Animation Techniques and Speech API
Chapter 8
-
.Netterpillars II: Multiplayer Games and Directplay
Chapter 9
-
D-iNfEcT: Multithreading, Nonrectangular Windows, and Access to
Nonmanaged Code
Bonus Chapter Porting .Nettrix to Pocket PC
Appendix A
-
The State of PC Gaming
Appendix B
-
Motivations in Games
Appendix C
-
How Do I Make Games?
Appendix D
-
Guidelines for Developing Successful Games
Index
List of Figures

List of Tables
consumer expectations,
598
design and,
629
fun (
see
fun, player
)
high-end games,
599-600
innovative,
628-29
realism or historical information vs.,
634
technology vs.,
602-4
testing,
629
3D environments vs.,
598-99
game programming.
See

.NET game programming
gamers.
See
players
GameSound class, River Pla.Net,
236-39

,
283-85
gaming market.
See

PC gaming market
garbage collection
Direct3D application,
171
,
184-85
Dispose method,
86,
109
,
171
,
184-85
,
233
.Netterpillars,
86,
140
sprite,
233
Gauntlet game,
623
GDI+
alpha blending,
2

,
188-89
antialiasing,
4
cardinal splines,
3
DirectX vs.,
207-8
gradients,
2
,
7-9
,
564
Graphics objects,
4-7
mobile devices and,
580
.Netterpillars game and, 70 (
see also

.Netterpillars game
)
.Nettrix game and, 1 (
see also

.Nettrix game
)
matrix transformations,
3

sprites (
see

sprites
)
genre, game,
24,
628
GetDeviceCaps method,
170
,
175-77
Get/End Get blocks,
126
GetHdc method,
6-7
GetMaster methods,
243
GetMotifCount method,
245
GetMotifName method,
248
GetStyle method,
245
ghost objects,
19
golden paths,
74,
490
GotFocus event,

584
gradients,
2
,
7-9
,
564
grammar, speech recognition,
437
grand endings,
616
.
See also

ending games
graphical adventure games,
350
.
See also

adventure games
graphics
antialiasing,
4
commercial games and,
631
.NET Game Programming with DirectX 9.0
by Alexandre Santos Lobão and Ellen
Hatton


ISBN:1590590511
Apress
© 2003
(696 pages)
The authors of this text show how easy it can be to produce
interesting multimedia games using Managed DirectX 9.0 and
programming with Visual Basic .NET on Everett, the latest
version of Microsoft's Visual Studio.

Table of Contents
.NET Game Programming with DirectX 9.0
Foreword
Preface
Introduction
Chapter 1
-
.Nettrix: GDI+ and Collision Detection
Chapter 2
-
.Netterpillars: Artificial Intelligence and Sprites
Chapter 3
-
Managed DirectX First Steps: Direct3D Basics and DirectX vs. GDI+
Chapter 4
-
River Pla.Net: Tiled Game Fields, Scrolling, and DirectAudio
Chapter 5
-
River Pla.Net II: DirectInput and Writing Text to Screen
Chapter 6

-
Magic KindergarteN.: Adventure Games, ADO.NET, and DirectShow
Chapter 7
-
Magic KindergarteN. II: Animation Techniques and Speech API
Chapter 8
-
.Netterpillars II: Multiplayer Games and Directplay
Chapter 9
-
D-iNfEcT: Multithreading, Nonrectangular Windows, and Access to
Nonmanaged Code
Bonus Chapter Porting .Nettrix to Pocket PC
Appendix A
-
The State of PC Gaming
Appendix B
-
Motivations in Games
Appendix C
-
How Do I Make Games?
Appendix D
-
Guidelines for Developing Successful Games
Index
List of Figures
List of Tables
libraries,
79

objects (
see

Graphics objects
)
3-D (
see

Direct3D
;
graphics, 3-D
)
2-D (
see

GDI+
)
Visual Basic .NET routines,
60
graphics, 3-D.
See also

Direct3D
collision detection algorithms,
21-22
coordinate systems,
152-59
gameplay vs.,
599-600
,

603
unsuccessful movement of games to 3D environments,
598-99
Graphics objects,
4-7
creating, from images,
6
creating, from specified handles to device contexts,
6-7
creating, with e parameter,
5
creating, with window handles,
6
drawing sprites, 81-82 (
see also

sprites
)
for Pocket PC,
584
releasing memory,
86
GraphicsPath objects,
8
,
553-56
greater rewards with known and unknown occurrence,
612-13
groups, network,
481-82

guides, compiling animation,
434-35
.NET Game Programming with DirectX 9.0
by Alexandre Santos Lobão and Ellen
Hatton

ISBN:1590590511
Apress
© 2003
(696 pages)
The authors of this text show how easy it can be to produce
interesting multimedia games using Managed DirectX 9.0 and
programming with Visual Basic .NET on Everett, the latest
version of Microsoft's Visual Studio.

Table of Contents
.NET Game Programming with DirectX 9.0
Foreword
Preface
Introduction
Chapter 1
-
.Nettrix: GDI+ and Collision Detection
Chapter 2
-
.Netterpillars: Artificial Intelligence and Sprites
Chapter 3
-
Managed DirectX First Steps: Direct3D Basics and DirectX vs. GDI+
Chapter 4

-
River Pla.Net: Tiled Game Fields, Scrolling, and DirectAudio
Chapter 5
-
River Pla.Net II: DirectInput and Writing Text to Screen
Chapter 6
-
Magic KindergarteN.: Adventure Games, ADO.NET, and DirectShow
Chapter 7
-
Magic KindergarteN. II: Animation Techniques and Speech API
Chapter 8
-
.Netterpillars II: Multiplayer Games and Directplay
Chapter 9
-
D-iNfEcT: Multithreading, Nonrectangular Windows, and Access to
Nonmanaged Code
Bonus Chapter Porting .Nettrix to Pocket PC
Appendix A
-
The State of PC Gaming
Appendix B
-
Motivations in Games
Appendix C
-
How Do I Make Games?
Appendix D
-

Guidelines for Developing Successful Games
Index
List of Figures
List of Tables
Index
H
hackers,
483–85
,
488–89
Half Life game,
606
half-to-half tiles,
216
handles
creating Graphics objects from specified, for device contexts,
6–7
creating Graphics objects from window,
6
DirectX window,
150
Handles keyword,
5
,
196
hardware abstraction layer (HAL),
147
hardware acceleration.
See


DirectX
HardwareVertexProcessing flag,
147
Hassanpour, Sarbasst,
611
head positions, mouth animation and,
433
hearing distance and player sounds,
78
help resources
ADO.NET,
357
animation guides,
434–35
artificial intelligence,
79
declarative attributes,
558
DirectX SDK,
143
,
170
,
234
,
243
,
344
forms,
109

Internet, 9 (
see also

Web sites
)
matrix transformations,
158
.NET Framework SDK,
4
,
9
object-oriented analysis,
30
Hide method
Block class,
50–51
Square class,
32–35
hiding latency from players,
487–88
high-end consumer expectations,
599–600
hints,
614
historical information, commercial games and,
634
horizontal scrollers,
212
,
620–21

hosts, DirectPlay,
491
,
493
Howland, Geoff,
617
hype, promotional,
595–96
.
See also

advertisements
.NET Game Programming with DirectX 9.0
by Alexandre Santos Lobão and Ellen
Hatton

ISBN:1590590511
Apress
© 2003
(696 pages)
The authors of this text show how easy it can be to produce
interesting multimedia games using Managed DirectX 9.0 and
programming with Visual Basic .NET on Everett, the latest
version of Microsoft's Visual Studio.

Table of Contents
.NET Game Programming with DirectX 9.0
Foreword
Preface
Introduction

Chapter 1
-
.Nettrix: GDI+ and Collision Detection
Chapter 2
-
.Netterpillars: Artificial Intelligence and Sprites
Chapter 3
-
Managed DirectX First Steps: Direct3D Basics and DirectX vs. GDI+
Chapter 4
-
River Pla.Net: Tiled Game Fields, Scrolling, and DirectAudio
Chapter 5
-
River Pla.Net II: DirectInput and Writing Text to Screen
Chapter 6
-
Magic KindergarteN.: Adventure Games, ADO.NET, and DirectShow
Chapter 7
-
Magic KindergarteN. II: Animation Techniques and Speech API
Chapter 8
-
.Netterpillars II: Multiplayer Games and Directplay
Chapter 9
-
D-iNfEcT: Multithreading, Nonrectangular Windows, and Access to
Nonmanaged Code
Bonus Chapter Porting .Nettrix to Pocket PC
Appendix A

-
The State of PC Gaming
Appendix B
-
Motivations in Games
Appendix C
-
How Do I Make Games?
Appendix D
-
Guidelines for Developing Successful Games
Index
List of Figures
List of Tables
Index
I
icons,
352
,
394–401
id software,
596
,
599
,
610
IIF commands,
139
images.
See also


GDI+
animating parts of, 430–32 (
see also

animation
)
blitting,
82,
144
,
145
creating Graphics objects from,
6
loading, for scrolling,
214
point-and-click adventure games,
352
sprites (
see

sprites
)
imitation, commercial games and,
628–29
Imports clause,
222
industry expectations,
597
,

601–3
Inherits keyword,
102
,
230
initialization.
See also

New method
Direct3D and game map,
268
Direct3D application,
179–80
,
198–99
joystick,
304–5
Magic KindergarteN,
383–85
music class,
240–43
mouse and keyboard,
301–4
player objects,
277
innovation, commercial games and,
628–29
input classes, DirectInput,
297–301
.

See also
River Pla.Net II game
input devices.
See also

joystick
;
keyboard
;
mouse
class interfaces,
299–301
DirectInput and,
145
,
291
,
295
handling data from,
330–32
polling,
306–8
processing input from,
308–15
instruments, DirectMusic,
245
interesting decisions, commercial games and,
629–30
interface classes,
97

interfaces.
See

class interfaces
;
user interfaces
international audience,
355
Internet.
See also

Web sites
collision detection algorithms,
9
never trusting,
490–91
introduction screens
finishing games with,
621
Magic KindergarteN,
386
main program and,
97
.Netterpillars,
98–99
,
129–31
.Netterpillars II,
524–27
River Pla.Net,

261
,
270
.NET Game Programming with DirectX 9.0
by Alexandre Santos Lobão and Ellen
Hatton

ISBN:1590590511
Apress
© 2003
(696 pages)
The authors of this text show how easy it can be to produce
interesting multimedia games using Managed DirectX 9.0 and
programming with Visual Basic .NET on Everett, the latest
version of Microsoft's Visual Studio.

Table of Contents
.NET Game Programming with DirectX 9.0
Foreword
Preface
Introduction
Chapter 1
-
.Nettrix: GDI+ and Collision Detection
Chapter 2
-
.Netterpillars: Artificial Intelligence and Sprites
Chapter 3
-
Managed DirectX First Steps: Direct3D Basics and DirectX vs. GDI+

Chapter 4
-
River Pla.Net: Tiled Game Fields, Scrolling, and DirectAudio
Chapter 5
-
River Pla.Net II: DirectInput and Writing Text to Screen
Chapter 6
-
Magic KindergarteN.: Adventure Games, ADO.NET, and DirectShow
Chapter 7
-
Magic KindergarteN. II: Animation Techniques and Speech API
Chapter 8
-
.Netterpillars II: Multiplayer Games and Directplay
Chapter 9
-
D-iNfEcT: Multithreading, Nonrectangular Windows, and Access to
Nonmanaged Code
Bonus Chapter Porting .Nettrix to Pocket PC
Appendix A
-
The State of PC Gaming
Appendix B
-
Motivations in Games
Appendix C
-
How Do I Make Games?
Appendix D

-
Guidelines for Developing Successful Games
Index
List of Figures
List of Tables
Invalidate method,
60
inventory
Magic KindergarteN,
361
,
410–17
point-and-click adventure game,
351
investments, player,
633
IsEmpty method,
42, 51,
54–56
.NET Game Programming with DirectX 9.0
by Alexandre Santos Lobão and Ellen
Hatton

ISBN:1590590511
Apress
© 2003
(696 pages)
The authors of this text show how easy it can be to produce
interesting multimedia games using Managed DirectX 9.0 and
programming with Visual Basic .NET on Everett, the latest

version of Microsoft's Visual Studio.

Table of Contents
.NET Game Programming with DirectX 9.0
Foreword
Preface
Introduction
Chapter 1
-
.Nettrix: GDI+ and Collision Detection
Chapter 2
-
.Netterpillars: Artificial Intelligence and Sprites
Chapter 3
-
Managed DirectX First Steps: Direct3D Basics and DirectX vs. GDI+
Chapter 4
-
River Pla.Net: Tiled Game Fields, Scrolling, and DirectAudio
Chapter 5
-
River Pla.Net II: DirectInput and Writing Text to Screen
Chapter 6
-
Magic KindergarteN.: Adventure Games, ADO.NET, and DirectShow
Chapter 7
-
Magic KindergarteN. II: Animation Techniques and Speech API
Chapter 8
-

.Netterpillars II: Multiplayer Games and Directplay
Chapter 9
-
D-iNfEcT: Multithreading, Nonrectangular Windows, and Access to
Nonmanaged Code
Bonus Chapter Porting .Nettrix to Pocket PC
Appendix A
-
The State of PC Gaming
Appendix B
-
Motivations in Games
Appendix C
-
How Do I Make Games?
Appendix D
-
Guidelines for Developing Successful Games
Index
List of Figures
List of Tables
Index
J
Join method,
552
joystick
adding support for force-feed,
317
,
341–46

class interface,
301
controlling plane with,
316
DirectInput and,
295
,
297
,
319–21
initialization code,
304–5
polling,
306–8
processing input,
313–15
jumping animations,
426–29
.NET Game Programming with DirectX 9.0
by Alexandre Santos Lobão and Ellen
Hatton

ISBN:1590590511
Apress
© 2003
(696 pages)
The authors of this text show how easy it can be to produce
interesting multimedia games using Managed DirectX 9.0 and
programming with Visual Basic .NET on Everett, the latest
version of Microsoft's Visual Studio.


Table of Contents
.NET Game Programming with DirectX 9.0
Foreword
Preface
Introduction
Chapter 1
-
.Nettrix: GDI+ and Collision Detection
Chapter 2
-
.Netterpillars: Artificial Intelligence and Sprites
Chapter 3
-
Managed DirectX First Steps: Direct3D Basics and DirectX vs. GDI+
Chapter 4
-
River Pla.Net: Tiled Game Fields, Scrolling, and DirectAudio
Chapter 5
-
River Pla.Net II: DirectInput and Writing Text to Screen
Chapter 6
-
Magic KindergarteN.: Adventure Games, ADO.NET, and DirectShow
Chapter 7
-
Magic KindergarteN. II: Animation Techniques and Speech API
Chapter 8
-
.Netterpillars II: Multiplayer Games and Directplay

Chapter 9
-
D-iNfEcT: Multithreading, Nonrectangular Windows, and Access to
Nonmanaged Code
Bonus Chapter Porting .Nettrix to Pocket PC
Appendix A
-
The State of PC Gaming
Appendix B
-
Motivations in Games
Appendix C
-
How Do I Make Games?
Appendix D
-
Guidelines for Developing Successful Games
Index
List of Figures
List of Tables
Index
K
keyboard adventure games and,
348–50
class interface,
300
DirectInput and,
295
,
297

,
319–21
Esc key,
65–66
,
109
,
138
,
185
events,
297
initialization code,
301–4
KeyDown event,
63,
65–66
,
109
,
278
KeyPress event,
27,
319
Keys enumeration,
52,
308
logo key, 303 .Netterpillars,
117–18
,

138
.Nettrix,
27, 52, 63,
65–66
.Nettrix II,
592–93
polling,
306–8
processing input,
308–11
River Pla.Net,
278–79
key frames, animation,
424
known occurrence, greater rewards with,
612
.NET Game Programming with DirectX 9.0
by Alexandre Santos Lobão and Ellen
Hatton

ISBN:1590590511
Apress
© 2003
(696 pages)
The authors of this text show how easy it can be to produce
interesting multimedia games using Managed DirectX 9.0 and
programming with Visual Basic .NET on Everett, the latest
version of Microsoft's Visual Studio.

Table of Contents

.NET Game Programming with DirectX 9.0
Foreword
Preface
Introduction
Chapter 1
-
.Nettrix: GDI+ and Collision Detection
Chapter 2
-
.Netterpillars: Artificial Intelligence and Sprites
Chapter 3
-
Managed DirectX First Steps: Direct3D Basics and DirectX vs. GDI+
Chapter 4
-
River Pla.Net: Tiled Game Fields, Scrolling, and DirectAudio
Chapter 5
-
River Pla.Net II: DirectInput and Writing Text to Screen
Chapter 6
-
Magic KindergarteN.: Adventure Games, ADO.NET, and DirectShow
Chapter 7
-
Magic KindergarteN. II: Animation Techniques and Speech API
Chapter 8
-
.Netterpillars II: Multiplayer Games and Directplay
Chapter 9
-

D-iNfEcT: Multithreading, Nonrectangular Windows, and Access to
Nonmanaged Code
Bonus Chapter Porting .Nettrix to Pocket PC
Appendix A
-
The State of PC Gaming
Appendix B
-
Motivations in Games
Appendix C
-
How Do I Make Games?
Appendix D
-
Guidelines for Developing Successful Games
Index
List of Figures
List of Tables
Index
L
latency
hiding, from players,
487-88
turn-based game,
483
left-handed coordinate systems,
153
Left method, Block class,
41-44
Lego Island game,

605
,
609
Leisure Suit Larry games,
350
Lemmings game,
598
letters to developers,
609-10
levels
artificial intelligence and,
73
balanced games and,
490
Breakout,
620
multiple gaming experiences and,
632
.Nettrix feature,
65-66
rewards and,
613
,
616
River Pla.Net game map and,
289
side scroller games,
621
libraries
animation guides,

434-35
artificial intelligence,
79
D3DX,
158
lights, Direct3D colored,
167-69
,
193-97
linear games,
627
linear gradients,
7-8
LineList type, Direct3D,
161
line of sight algorithms,
76-78
, 79
LineStrip type, Direct3D,
161
list box items,
500
listing existing sessions on remote computers,
505-12
ListVoiceNames method,
444-45
Loader objects,
235
loading
active objects,

321-24
forms,
63
game map,
264-68
list of adapters,
171
mouth images,
443-44
sound files,
235
,
238
,
243-45
transparent textures,
231-32
Lobby object,
493
local area networks (LANs),
479
Lode Runner game,
598
loops, game,
619
.NET Game Programming with DirectX 9.0
by Alexandre Santos Lobão and Ellen
Hatton

ISBN:1590590511

Apress
© 2003
(696 pages)
The authors of this text show how easy it can be to produce
interesting multimedia games using Managed DirectX 9.0 and
programming with Visual Basic .NET on Everett, the latest
version of Microsoft's Visual Studio.

Table of Contents
.NET Game Programming with DirectX 9.0
Foreword
Preface
Introduction
Chapter 1
-
.Nettrix: GDI+ and Collision Detection
Chapter 2
-
.Netterpillars: Artificial Intelligence and Sprites
Chapter 3
-
Managed DirectX First Steps: Direct3D Basics and DirectX vs. GDI+
Chapter 4
-
River Pla.Net: Tiled Game Fields, Scrolling, and DirectAudio
Chapter 5
-
River Pla.Net II: DirectInput and Writing Text to Screen
Chapter 6
-

Magic KindergarteN.: Adventure Games, ADO.NET, and DirectShow
Chapter 7
-
Magic KindergarteN. II: Animation Techniques and Speech API
Chapter 8
-
.Netterpillars II: Multiplayer Games and Directplay
Chapter 9
-
D-iNfEcT: Multithreading, Nonrectangular Windows, and Access to
Nonmanaged Code
Bonus Chapter Porting .Nettrix to Pocket PC
Appendix A
-
The State of PC Gaming
Appendix B
-
Motivations in Games
Appendix C
-
How Do I Make Games?
Appendix D
-
Guidelines for Developing Successful Games
Index
List of Figures
List of Tables
low-end consumer expectations,
600-601
Lupine Games,

617
.NET Game Programming with DirectX 9.0
by Alexandre Santos Lobão and Ellen
Hatton

ISBN:1590590511
Apress
© 2003
(696 pages)
The authors of this text show how easy it can be to produce
interesting multimedia games using Managed DirectX 9.0 and
programming with Visual Basic .NET on Everett, the latest
version of Microsoft's Visual Studio.

Table of Contents
.NET Game Programming with DirectX 9.0
Foreword
Preface
Introduction
Chapter 1
-
.Nettrix: GDI+ and Collision Detection
Chapter 2
-
.Netterpillars: Artificial Intelligence and Sprites
Chapter 3
-
Managed DirectX First Steps: Direct3D Basics and DirectX vs. GDI+
Chapter 4
-

River Pla.Net: Tiled Game Fields, Scrolling, and DirectAudio
Chapter 5
-
River Pla.Net II: DirectInput and Writing Text to Screen
Chapter 6
-
Magic KindergarteN.: Adventure Games, ADO.NET, and DirectShow
Chapter 7
-
Magic KindergarteN. II: Animation Techniques and Speech API
Chapter 8
-
.Netterpillars II: Multiplayer Games and Directplay
Chapter 9
-
D-iNfEcT: Multithreading, Nonrectangular Windows, and Access to
Nonmanaged Code
Bonus Chapter Porting .Nettrix to Pocket PC
Appendix A
-
The State of PC Gaming
Appendix B
-
Motivations in Games
Appendix C
-
How Do I Make Games?
Appendix D
-
Guidelines for Developing Successful Games

Index
List of Figures
List of Tables
Index
M
McGee, American,
595-96
Magic KindergarteN game,
347-421
.
See

also
Magic KindergarteN II game
active objects,
371-74
,
378-79
ADO.NET and data access,
355-58
,
383-94
adventure games and,
347-55
class diagram,
376-80
coding phase,
382-83
data model,
381-82

DirectShow and,
358-61
,
407-9
drawing characters,
369-71
extended storyline suggestion,
417-20
game engine,
376-78
mouse pointer,
394-401
mouse pointer actions,
402-9
planning main program flow,
382
player,
379-80
,
410
player and inventory,
410-17
project,
362-82
proposal,
361-62
screens,
363-69
user interface elements,
374-75

Magic KindergarteN II game,
423-76
.
See also
Magic KindergarteN game
active objects,
450-51
,
457-59
character animation,
423-35
characters,
449-50
cheese puzzle,
460-62
class diagram,
454-55
coding phase,
457
compiling animation guides,
434-35
data model,
456
dialogs,
451-53
,
457-59
,
462-73
letting player choose character's speech,

465-69
mouse pointer for talk action,
459-60
mouth animation,
473-75
presenting dialog choices on screen,
463-65
project,
449-56
proposal,
448
reviewing code,
469-71
screens,
449
Speech API,
435-39
speech generation,
439-48
,
473-75
suggested improvements,
475-76
technical tips,
430-34
user interface elements,
454
magnitude, force-feed joystick,
342
main programs

artificial intelligence and,
136
Magic KindergarteN,
382
.Netterpillars,
97-98
,
106-10
,
115-19
,
136-37
.Netterpillars II,
522-27
.NET Game Programming with DirectX 9.0
by Alexandre Santos Lobão and Ellen
Hatton

ISBN:1590590511
Apress
© 2003
(696 pages)
The authors of this text show how easy it can be to produce
interesting multimedia games using Managed DirectX 9.0 and
programming with Visual Basic .NET on Everett, the latest
version of Microsoft's Visual Studio.

Table of Contents
.NET Game Programming with DirectX 9.0
Foreword

Preface
Introduction
Chapter 1
-
.Nettrix: GDI+ and Collision Detection
Chapter 2
-
.Netterpillars: Artificial Intelligence and Sprites
Chapter 3
-
Managed DirectX First Steps: Direct3D Basics and DirectX vs. GDI+
Chapter 4
-
River Pla.Net: Tiled Game Fields, Scrolling, and DirectAudio
Chapter 5
-
River Pla.Net II: DirectInput and Writing Text to Screen
Chapter 6
-
Magic KindergarteN.: Adventure Games, ADO.NET, and DirectShow
Chapter 7
-
Magic KindergarteN. II: Animation Techniques and Speech API
Chapter 8
-
.Netterpillars II: Multiplayer Games and Directplay
Chapter 9
-
D-iNfEcT: Multithreading, Nonrectangular Windows, and Access to
Nonmanaged Code

Bonus Chapter Porting .Nettrix to Pocket PC
Appendix A
-
The State of PC Gaming
Appendix B
-
Motivations in Games
Appendix C
-
How Do I Make Games?
Appendix D
-
Guidelines for Developing Successful Games
Index
List of Figures
List of Tables
River Pla.Net,
261
,
270-71
main windows
Direct3D application,
168
,
170-78
D-iNfEcT,
559-66
,
573
point-and-click adventure game,

351
MakeTransparent,
82
males,
628
managed DirectX.
See

DirectX
Manager object,
146
,
170
maps, game.
See also

game fields
empty map games, 627 (
see also

commercial games
)
neverending,
289
text file and,
256
,
262-71
market.
See


PC gaming market
Math object,
60
matrix transformations
Direct3D,
155-58
,
169
mouse pointer icons,
398-99
scrolling and,
256-57
,
271-73
,
277-78
testing,
197-205
types of,
3
Mech Commander game,
608
media, streaming.
See also

DirectShow
Meier, Sid,
627
memory

garbage collection (
see

garbage collection
)
multithreading (
see

multithreading
)
scrolling and,
214
tiles and,
215
menus,
621
,
632
.
See also

user interfaces
messages
checking delivery,
489
defining types and sizes,
486-87
formats,
527-29
handling,

514-16
,
538-41
methods that receive,
530-32
methods that send,
529-30
.Netterpillar II,
520-21
,
527-32
methods.
See also

class interfaces
base class,
102
,
222
conversion,
267
overloading,
85,
102
scope modifiers,
222-23
Shadows keyword and,
103
shared,
35

speech generation,
445-46
sprite,
80
Visual Basic .NET,
60
Microsoft Access database,
381-82
,
387-94
Microsoft Visual Basic .NET.
See

Visual Basic .NET
.NET Game Programming with DirectX 9.0
by Alexandre Santos Lobão and Ellen
Hatton

ISBN:1590590511
Apress
© 2003
(696 pages)
The authors of this text show how easy it can be to produce
interesting multimedia games using Managed DirectX 9.0 and
programming with Visual Basic .NET on Everett, the latest
version of Microsoft's Visual Studio.

Table of Contents
.NET Game Programming with DirectX 9.0
Foreword

Preface
Introduction
Chapter 1
-
.Nettrix: GDI+ and Collision Detection
Chapter 2
-
.Netterpillars: Artificial Intelligence and Sprites
Chapter 3
-
Managed DirectX First Steps: Direct3D Basics and DirectX vs. GDI+
Chapter 4
-
River Pla.Net: Tiled Game Fields, Scrolling, and DirectAudio
Chapter 5
-
River Pla.Net II: DirectInput and Writing Text to Screen
Chapter 6
-
Magic KindergarteN.: Adventure Games, ADO.NET, and DirectShow
Chapter 7
-
Magic KindergarteN. II: Animation Techniques and Speech API
Chapter 8
-
.Netterpillars II: Multiplayer Games and Directplay
Chapter 9
-
D-iNfEcT: Multithreading, Nonrectangular Windows, and Access to
Nonmanaged Code

Bonus Chapter Porting .Nettrix to Pocket PC
Appendix A
-
The State of PC Gaming
Appendix B
-
Motivations in Games
Appendix C
-
How Do I Make Games?
Appendix D
-
Guidelines for Developing Successful Games
Index
List of Figures
List of Tables
Microsoft Visual Studio .NET.
See

Visual Studio .NET
Microsoft Windows.
See

Windows
MIDI files,
234
migration, program.
See

mobile devices

;
.Nettrix II game
milestones,
78
MindArk,
611
MixedVertexProcessing,
147
mobile devices,
575-80
choosing platform and project type,
577
creating Smart Device Applications,
576
deploying programs to emulator,
577-80
.Net Framework and,
575
porting .Nettrix to (
see

.Nettrix II game
)
running desktop PC programs and operating systems on,
580-81
modal and modeless forms,
129
modem providers,
492
monitor refresh rates,

173
Monopoly game,
609
motifs, music,
245-48
motivations, player,
611-16
anticipation,
614
competition and comparison,
614
complex user interfaces and,
616
elements,
611
grand endings,
616
participant-ship,
615
rewards,
612-13
tempo,
615
mouse
class interface,
300
DirectInput and,
295
,
297

initialization code,
301-4
MouseMove event,
192
point-and-click adventures,
351-52
pointer (
see

mouse pointer
)
polling,
306-8
processing input,
311-13
mouse pointer.
See also

mouse
actions,
361
,
402-9
coding,
394-401
icons,
375
for talk action,
459-60
mouth animation

mouth positions and sounds,
432-34
speech generation and,
438-48
,
473-75
movie tie-in games,
605
,
606
moving objects
bullets,
333-35
collision detection, 327-29 (
see also
collision detection
)
child windows,
569-70
.NET Game Programming with DirectX 9.0
by Alexandre Santos Lobão and Ellen
Hatton

ISBN:1590590511
Apress
© 2003
(696 pages)
The authors of this text show how easy it can be to produce
interesting multimedia games using Managed DirectX 9.0 and
programming with Visual Basic .NET on Everett, the latest

version of Microsoft's Visual Studio.

Table of Contents
.NET Game Programming with DirectX 9.0
Foreword
Preface
Introduction
Chapter 1
-
.Nettrix: GDI+ and Collision Detection
Chapter 2
-
.Netterpillars: Artificial Intelligence and Sprites
Chapter 3
-
Managed DirectX First Steps: Direct3D Basics and DirectX vs. GDI+
Chapter 4
-
River Pla.Net: Tiled Game Fields, Scrolling, and DirectAudio
Chapter 5
-
River Pla.Net II: DirectInput and Writing Text to Screen
Chapter 6
-
Magic KindergarteN.: Adventure Games, ADO.NET, and DirectShow
Chapter 7
-
Magic KindergarteN. II: Animation Techniques and Speech API
Chapter 8
-

.Netterpillars II: Multiplayer Games and Directplay
Chapter 9
-
D-iNfEcT: Multithreading, Nonrectangular Windows, and Access to
Nonmanaged Code
Bonus Chapter Porting .Nettrix to Pocket PC
Appendix A
-
The State of PC Gaming
Appendix B
-
Motivations in Games
Appendix C
-
How Do I Make Games?
Appendix D
-
Guidelines for Developing Successful Games
Index
List of Figures
List of Tables
enemies,
321-29
player characters,
277-80
ships and planes,
316-17
,
324-26
MPEG video files,

347
MP3 sound files,
347
multimedia.
See

DirectShow
multiplayer games,
477-82
artificial intelligence and,
488
balanced,
490
client-server connections,
479-80
coding, from ground up,
486
communities for,
488
connection types,
478-82
constant world vs. context-based,
484-85
DirectPlay and,
145
,
482
,
491-93
hiding latency from players,

487-88
message types and sizes,
486-87
multithreading and,
489-90
.Netterpillars II features, 532-41 (
see

also
.Netterpillars II game
)
never trusting the Internet,
490-91
peer-to-peer connections,
478-79
planning,
482-85
,
485-91
preventing cheating,
488-89
ring topology, network groups, broadcasting,
481-82
screen freeze problem,
477-78
testing,
489
turn-based vs. real-time,
483-84
multiple gaming experiences within games,

632
MultiThreaded flag,
148
multithreading,
548-52
avoiding errors,
550-52
creating multiple threads,
549-50
D-iNfEcT, 566-69 (
see also

D-iNfEcT game
)
DirectInput and,
296
DirectSound and,
237-38
DirectX and,
148
multiplayer games,
489-90
polling input devices,
306-8
processes, threads, and,
548-49
Mushroom class,
92,
102
music, commercial games and,

631
.
See

also
DirectMusic
;
DirectShow
MyBase keyword,
102
Myst game,
603-4
,
605
,
608
.NET Game Programming with DirectX 9.0
by Alexandre Santos Lobão and Ellen
Hatton

ISBN:1590590511
Apress
© 2003
(696 pages)
The authors of this text show how easy it can be to produce
interesting multimedia games using Managed DirectX 9.0 and
programming with Visual Basic .NET on Everett, the latest
version of Microsoft's Visual Studio.

Table of Contents

.NET Game Programming with DirectX 9.0
Foreword
Preface
Introduction
Chapter 1
-
.Nettrix: GDI+ and Collision Detection
Chapter 2
-
.Netterpillars: Artificial Intelligence and Sprites
Chapter 3
-
Managed DirectX First Steps: Direct3D Basics and DirectX vs. GDI+
Chapter 4
-
River Pla.Net: Tiled Game Fields, Scrolling, and DirectAudio
Chapter 5
-
River Pla.Net II: DirectInput and Writing Text to Screen
Chapter 6
-
Magic KindergarteN.: Adventure Games, ADO.NET, and DirectShow
Chapter 7
-
Magic KindergarteN. II: Animation Techniques and Speech API
Chapter 8
-
.Netterpillars II: Multiplayer Games and Directplay
Chapter 9
-

D-iNfEcT: Multithreading, Nonrectangular Windows, and Access to
Nonmanaged Code
Bonus Chapter Porting .Nettrix to Pocket PC
Appendix A
-
The State of PC Gaming
Appendix B
-
Motivations in Games
Appendix C
-
How Do I Make Games?
Appendix D
-
Guidelines for Developing Successful Games
Index
List of Figures
List of Tables
Index
N
namespaces,
5
,
222
naming conventions,
105
,
111
narrative.
See


storyline
navigation
Magic KindergarteN,
404-6
.Nettrix II,
592-93
.NET Compact Framework,
576
,
579
.NET Framework.
See also

.NET game programming
;
Visual Basic .NET
;
Visual Studio .NET
COM objects and,
233
constants and enumerations,
52
garbage collection,
140
mobile devices and,
575
new features,
5
nonmanaged code and,

556
SDK,
4
,
9
.NET game programming
ADO.NET data access, 355-58 (
see also
ADO.NET data access
)
adventure games,
347-55
animation, 423-35 (
see also

animation
)
artificial intelligence,
69,
72-79
collision detection,
9-22
D-iNfEcT game (
see

D-iNfEcT game
)
DirectAudio, 233-36 (
see also
DirectAudio

;
DirectMusic
;
DirectSound
)
DirectInput, 295-315 (
see also
DirectInput
)
DirectPlay,
491-93
DirectShow,
358-61
Direct3D and DirectX (
see

Direct3D
;
DirectX
)
game development,
617-26
GDI+,
1-9
, 70
guidelines for commercial games, 627-34 (
see also

commercial games
)

Magic KindergarteN game (
see

Magic KindergarteN game
;
Magic KindergarteN II game
)
for mobile devices,
575-81
multiplayer games,
477-91
multithreading,
547-52
.Netterpillars game (
see

.Netterpillars game
; .
.Netterpillars II game
)
.Nettrix game (
see

.Nettrix game
;
.Nettrix II game
)
nonmanaged code access,
556-58
nonrectangular windows,

553-56
object-oriented programming,
70-72
PC gaming market, 595-610 (
see also

PC gaming market
)
player motivations,
611-16
River Pla.Net game (
see

River Pla.Net game
;
River Pla.Net II game
)
scrolling games,
211-14
sprites, 80-86 (
see also

sprites
)
Speech API, 435-48 (
see also

Speech API
)
tile-based games,

214-17
writing text to screen,
291-95
Netterpillar class,
91-92
,
110-15
.Netterpillars game,
69-141
.
See also
.Netterpillars II game

×