The Linux Cookbook_ Tips and Techniques - Stutz_ Michael.pdf

(1815 KB) Pobierz
13736556 UNPDF
Programming Linux Games
Programming Linux Games
Loki Software, Inc.
with John R. Hall
An imprint of No Starch Press, Inc.
San Francisco
13736556.001.png
Programming Linux Games. Copyright c 2001 by Loki Software, Inc.
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.
Printed in the United States of America
1 2 3 4 5 6 7 8 9 10|04 03 02 01
Trademarked names are used throughout this book. Rather than including a funny little trademark
symbol with every occurrence of a trademarked name, we are using the names only in an editorial
fashion and to the benet of the trademark owner, with no intention of infringement of the trademark.
Co-publishers: William Pollock and Phil Hughes
Project Editor: Karol Jurado
Assistant Editor: Nick Ho
Cover and Interior Design: Octopod Studios
Copyeditor: Rebecca Pepper
Proofreader: Ken DellaPenta
Distributed to the book trade in the United States by Publishers Group West, 1700 Fourth Street,
Berkeley, California 94710, phone: 800{788{3123 or 510{528{1444, fax: 510{528{3444
Distributed to the book trade in Canada by Jacqueline Gross & Associates, Inc., One Atlantic Avenue,
Suite 105, Toronto, Ontario M6K E7 Canada, phone: 416{531-06737, fax: 416{531{4259
For information on translations or book distributors outside the United States, please contact
No Starch Press, Inc. directly:
No Starch Press, Inc.
555 De Haro Street, Suite 250
San Francisco, CA 94107
phone: 415{863{9900; fax: 415{863{9950;
info@nostarch.com ; http://www.nostarch.com
The information in this book is distributed on an \As Is" basis, without warranty. While every
precaution has been taken in the preparation of this work, neither the author nor No Starch Press, Inc.
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 it.
Library of Congress Cataloging-in-Publication Data
Programming linux games / Loki Software, Inc.
p. cm.
Includes index.
ISBN 1-886411-48-4 (pbk.)
1. Computer games--programming. 2. Linux. I. Loki Software, Inc.
QA76.76.C672 .L56 2001
00-052689
794.8'15268--dc21
Contents
Foreword
i
Preface
iii
Who This Book Is For . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
iv
Online Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
iv
Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
v
1 The Anatomy of a Game
1
A Quick Survey of Game Genres . . . . . . . . . . . . . . . . . . . . . . . . . .
2
Simulation Games . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2
First-Person Shooters . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4
Real-time Strategy Games . . . . . . . . . . . . . . . . . . . . . . . . . . .
6
Turn-Based Strategy Games . . . . . . . . . . . . . . . . . . . . . . . . . .
7
Role-Playing Games . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7
Puzzle Games . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9
Multiuser Dungeons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
A Quick Look Under the Hood . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
The Input Subsystem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
The Display Subsystem . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Zgłoś jeśli naruszono regulamin