Beginning .NET Game Programming in VB.NET.pdf

(7963 KB) Pobierz
129002635 UNPDF
Beginning .NET
Game Programming
in VB.NET
DAVID WELLER, ALEXANDRE SANTOS LOBÃO,
AND ELLEN HATTON
129002635.003.png 129002635.004.png
Beginning .NET Game Programming in VB.NET
Copyright © 2004 by David Weller, Alexandre Santos Lobão, and Ellen Hatton
All rights reserved. No part of this work may be reproduced or transmitted in any form or by any
means, electronic or mechanical, including photocopying, recording, or by any information storage
or retrieval system, without the prior written permission of the copyright owner and the publisher.
ISBN (pbk): 1-59059-401-1
Printed and bound in the United States of America 9 8 7 6 5 4 3 2 1
Trademarked names may appear in this book. Rather than use a trademark symbol with every
occurrence of a trademarked name, we use the names only in an editorial fashion and to the
benefit of the trademark owner, with no intention of infringement of the trademark.
Technical Reviewer: Andrew Jenks
Editorial Board: Steve Anglin, Dan Appleman, Ewan Buckingham, Gary Cornell, Tony Davis,
Jason Gilmore, Chris Mills, Dominic Shakeshaft, Jim Sumser
Assistant Publisher: Grace Wong
Project Manager: Sofia Marchant
Copy Editor: Ami Knox
Production Manager: Kari Brooks
Proofreader: Linda Seifert
Compositor: Dina Quan
Indexer: Rebecca Plunkett
Cover Designer: Kurt Krames
Manufacturing Manager: Tom Debolski
Distributed to the book trade in the United States by Springer-Verlag New York, Inc., 233 Spring
Street, 6th Floor, New York, New York 10013 and outside the United States by Springer-Verlag
GmbH & Co. KG, Tiergartenstr. 17, 69112 Heidelberg, Germany.
In the United States: phone 1-800-SPRINGER, email orders@springer-ny.com , or visit
http://www.springer-ny.com . Outside the United States: fax +49 6221 345229, email
orders@springer.de , or visit http://www.springer.de .
For information on translations, please contact Apress directly at 2560 Ninth Street, Suite 219,
Berkeley, CA 94710. Phone 510-549-5930, fax 510-549-5939, email info@apress.com , or visit
http://www.apress.com .
The information in this book is distributed on an “as is” basis, without warranty. Although every
precaution has been taken in the preparation of this work, neither the author(s) nor Apress shall
have any liability to any person or entity with respect to any loss or damage caused or alleged to
be caused directly or indirectly by the information contained in this work.
The source code for this book is available to readers at http://www.apress.com in the
Downloads section.
129002635.005.png
Para Ana: Mi esperanza, mi corazón,
mi tesoro, mi amiga, mi amor.
129002635.006.png
129002635.001.png
Contents at a Glance
Foreword . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .xi
About the Authors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .xiii
About the Technical Reviewer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .xv
Credits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .xvi
Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .xvii
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .xix
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .xxi
Chapter 1 .Nettrix: GDI+ and Collision Detection . . . . . . .1
Chapter 2 .Netterpillars: Artificial Intelligence
and Sprites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .65
Chapter 3 Managed DirectX First Steps: Direct3D
Basics and DirectX vs. GDI+ . . . . . . . . . . . . . . . . .141
Chapter 4 Space Donuts: Sprites Revisited . . . . . . . . . . . .207
Chapter 5 Spacewar! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .245
Chapter 6 Spacewar3D: Meshes and Buffers and
Textures, Oh My! . . . . . . . . . . . . . . . . . . . . . . . . . . . . .271
Chapter 7 Adding Visual Effects to Spacewar3D . . . . . . . .327
Epilogue Taking Your Next Steps . . . . . . . . . . . . . . . . . . . . . .343
Bonus Chapter Porting .Nettrix to Pocket PC . . . . . . . . . . . . . .351
Appendix A Suggested Reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . .371
Appendix B Motivations in Games . . . . . . . . . . . . . . . . . . . . . . . . .375
Appendix C How Do I Make Games? . . . . . . . . . . . . . . . . . . . . . . . . .381
Appendix D Guidelines for Developing
Successful Games . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .391
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .399
v
129002635.002.png
Zgłoś jeśli naruszono regulamin