MorePythonProgrammingfortheAbsoluteBeginner无水印原版pdf
More Python Programming for the Absolute Beginner 英文无水印原版pdf pdf所有页面使用FoxitReader、PDF-XChangeViewer、SumatraPDF和Firefox测试都可以打开 本资源转载自网络,如有侵权,请联系上传者或csdn删除查看此书详细信息请在美国亚马逊官网搜索此书e COURSE TECHNOLOGY° CENGAGE LearningMore Python@Programming for theO 2012 Course Technology, a part of Cengage LearningAbsolute Beginner: Jonathan SALL RIGHTS RESERVED. No part of this work covered by the copyrighherein may be reproduced, transmitted, stored, or used in any form or byPublisher and General Manager, Coursely means graphic, electronic, or mechanical, including but not limited toTechnology PtR: Stacy L. hiquphotocopying, recording, scanning, digitizing. taping, Web distribution, in-Assoclate Director of Marketing:formation networks, or information storage and retrieval systems,except aspermitted under Section 107 or 108 of the 1976 United States Copyright Act.without the prior written permission of the publisherManager of Editorial SeFor product information and tecassistance, contact us atMarketing Manager: Mark HughesSupport,1-800-3549706Senior Acquisitions Editor: Mitzi Koontzor permission to use material from this text or praduct, submit allrequests online at cengage. com/permissions further permissionsquestions can be emailed to permissiechnical Reviewer: Keith DavenportInterior Layout Tech: value Chain SoftwareAll other trademarks are the property of their respective ownersCover Designer: Mike TanamachiAll mages6Cengage Leaning unless otherwise noted.Library af Congress Control Number. 201193324eSBN-10:14354-5981Course Technology, a part of Cengage Learning20angage Leaming is a leading provider of customized learning solutionsith office locations around the globe, including singapore, the UnitedCengage Learning products are represented in Canada by NelsonPrinted in the united states of americ234567131211This book is dedicated to lone game developers on forums likeThegameprogrammingwikiwww.gpwiki.orgwhoputenormous passion into their creative works of interactivefiction, often without recognition. Do what you love and shareit with the worldACKNOWLEDGmENTS工offer my gratitude to those involved in getting this book finished and intoprint, especially Mitzi Koontz, Jenny Davidson, Keith Davenport, MikTanamachi, and Michael Beady. I would like to say, I hope it sells a millioncopies so i never have to work with any of you again, but that sentiment might bemisunderstood and considered rudel So i will just say thanks!ABOUT THE AUTHORonathan S Harbour has been programming since the 1980s. His first gamesystem was an Atari 2600, which he disassembled on the floor of his roomas a kid. He has written on C++, C#, Basic, Java, Directx, Allegro, Lua, DarkBasic, Game Boy Advance, Pocket PC, and game consoles. His other recent booksinclude Beginning java se 6 Game Programming, Third Edition; XNA Game Studio 4.0 forXbox 360 Developers, Multi-Threaded Gumme Engine Design; and an earlier book in thisseries, Visual Basic NET Programming for the Absolute Beginner(2003). He holds a mas-ter'sdegreeininformationsystensVisithinonthewebatwwwjharbour.comandwww.facebook.com/jharbourcomThis page intentionally left blankTABLE OF CONTENTSChapter1 PYTHON HAS CLASS,……1EGetting Started with Python.Python toolsPython LanguageObjects in PythonOOP: The Python way...Multiple InheritanceSummary…Chapter 2 GETTING STARTED WITH PY GAME: THE PIE GAME2Examining The Pie gamePrinting TextDrawing rectangles..Drawing ArcsThe pie gameSummary…34Chapter 3 FILE 1/O, DATA, AND FoNTS: THE TRIVIA GAME...35Examining The Trivia gamePython Data TypesGetting User Input….,,…Handling ExceptioThe mad Lib gaIneFile Input Outputforking with Text FileMore Python Programming for the Absolute BeginnerWorking with Binary FilesPrinting TeThe trivia classLoading the Trivia DataDisplan al50Reto user intGoingMain codeChapter 4 USER IN PUT: THE BoMB CATCHER GAMEExamining The bomb catcher gamePygame EventsReal-Time Event LoopMouse events61Device pollingPolling the KeyboardPolling the mouse65The bob catcher gaeChapter 5 MATH AND GRAPHICS: THE ANALOG CLOCK DEMO.....73Examining The Analog Clock Deo...Basic trigonometry74Circle Theory.………Traversing a Circle's Perimeterhe analog clock demoGetting the timeDrawing the Clock84Chapter b BITMAP GRAPHICS: THE ORBITING SPACESHIP DEMO.93Examining The Orbiting Spaceship Demo.BitmDrawing the background...Drawing the PlanetContentsDrawing the spaceship…………RotatingSummary............107Chapter 7 ANIMATION WITH SPRITES: THE ESCAPE THE DragonGAME…………………l。9Examining The Escape The Dragon GameCustom animation110Loading a Sprite Sheet112Chathe f112Drawing One FrameMySprite Classprite Animation to the TestThe escape the dragon game119Jumping120Colliding…121Source code124Chapter 8 SPRITE CoLLIsIOn DETECTIoN: THE ZoMBIE MoBAMEExamining The Zombie Mob game.……127Collision Detection Techniquesectangle Collision Between Two Sprites..Circle Collision Between Two SpritesPixel-Perfect Masked Collision Between Two SpritesRectangle Collision Between a Sprite and a GroupRectangle Collision Between Two GroupsThe Zombie mob game131Creating Your Own moduledvanced directional AnimationColliding with ZombiesGame source co…141
用户评论