Pro Android Games - Silva - Apress (2009).pdf

(2634 KB) Pobierz
Create and port cool games like Space Blaster , classic Asteroids™ ,
Doom and Wolfenstein™ 3D using Android
Pro
Android Games
Vladimir Silva
813342265.264.png
 
 
 
 
 
 
 
813342265.041.png 813342265.052.png 813342265.063.png 813342265.074.png 813342265.085.png 813342265.096.png 813342265.107.png 813342265.118.png 813342265.129.png 813342265.140.png 813342265.151.png 813342265.157.png 813342265.166.png 813342265.176.png 813342265.182.png 813342265.190.png 813342265.201.png 813342265.212.png 813342265.222.png 813342265.233.png 813342265.238.png 813342265.239.png 813342265.240.png 813342265.241.png 813342265.242.png 813342265.243.png 813342265.244.png 813342265.245.png 813342265.246.png 813342265.247.png 813342265.248.png 813342265.249.png 813342265.250.png 813342265.251.png 813342265.252.png 813342265.253.png 813342265.254.png 813342265.255.png 813342265.256.png 813342265.257.png 813342265.258.png 813342265.259.png 813342265.260.png 813342265.261.png 813342265.262.png 813342265.263.png 813342265.265.png 813342265.266.png 813342265.267.png 813342265.268.png 813342265.269.png 813342265.270.png 813342265.271.png 813342265.272.png 813342265.273.png 813342265.274.png 813342265.275.png 813342265.276.png 813342265.277.png 813342265.278.png 813342265.279.png 813342265.280.png 813342265.281.png 813342265.282.png 813342265.283.png 813342265.284.png 813342265.285.png 813342265.286.png 813342265.287.png 813342265.288.png 813342265.289.png 813342265.290.png 813342265.291.png 813342265.292.png 813342265.293.png 813342265.294.png 813342265.295.png 813342265.296.png 813342265.297.png 813342265.298.png 813342265.299.png 813342265.300.png 813342265.301.png 813342265.302.png 813342265.303.png 813342265.304.png 813342265.001.png 813342265.002.png 813342265.003.png 813342265.004.png 813342265.005.png 813342265.006.png 813342265.007.png 813342265.008.png 813342265.009.png 813342265.010.png 813342265.011.png 813342265.012.png 813342265.013.png 813342265.014.png 813342265.015.png 813342265.016.png 813342265.017.png 813342265.018.png 813342265.019.png 813342265.020.png 813342265.021.png 813342265.022.png 813342265.023.png 813342265.024.png 813342265.025.png 813342265.026.png 813342265.027.png 813342265.028.png 813342265.029.png 813342265.030.png 813342265.031.png 813342265.032.png 813342265.033.png 813342265.034.png 813342265.035.png 813342265.036.png 813342265.037.png 813342265.038.png 813342265.039.png 813342265.040.png 813342265.042.png 813342265.043.png 813342265.044.png 813342265.045.png 813342265.046.png 813342265.047.png 813342265.048.png 813342265.049.png 813342265.050.png 813342265.051.png 813342265.053.png 813342265.054.png 813342265.055.png 813342265.056.png 813342265.057.png 813342265.058.png 813342265.059.png 813342265.060.png 813342265.061.png 813342265.062.png 813342265.064.png 813342265.065.png 813342265.066.png 813342265.067.png 813342265.068.png 813342265.069.png 813342265.070.png 813342265.071.png 813342265.072.png 813342265.073.png 813342265.075.png 813342265.076.png 813342265.077.png 813342265.078.png 813342265.079.png 813342265.080.png 813342265.081.png 813342265.082.png 813342265.083.png 813342265.084.png 813342265.086.png 813342265.087.png 813342265.088.png 813342265.089.png 813342265.090.png 813342265.091.png 813342265.092.png 813342265.093.png 813342265.094.png 813342265.095.png 813342265.097.png 813342265.098.png 813342265.099.png 813342265.100.png 813342265.101.png 813342265.102.png 813342265.103.png 813342265.104.png 813342265.105.png 813342265.106.png 813342265.108.png 813342265.109.png 813342265.110.png 813342265.111.png 813342265.112.png 813342265.113.png 813342265.114.png 813342265.115.png 813342265.116.png 813342265.117.png 813342265.119.png 813342265.120.png 813342265.121.png 813342265.122.png 813342265.123.png 813342265.124.png 813342265.125.png 813342265.126.png 813342265.127.png 813342265.128.png 813342265.130.png 813342265.131.png 813342265.132.png 813342265.133.png 813342265.134.png 813342265.135.png 813342265.136.png 813342265.137.png 813342265.138.png 813342265.139.png 813342265.141.png 813342265.142.png 813342265.143.png 813342265.144.png 813342265.145.png 813342265.146.png 813342265.147.png 813342265.148.png 813342265.149.png 813342265.150.png 813342265.152.png 813342265.153.png 813342265.154.png 813342265.155.png 813342265.156.png
 
 
 
 
 
 
 
813342265.158.png 813342265.159.png 813342265.160.png 813342265.161.png 813342265.162.png 813342265.163.png 813342265.164.png 813342265.165.png 813342265.167.png 813342265.168.png 813342265.169.png 813342265.170.png 813342265.171.png 813342265.172.png 813342265.173.png 813342265.174.png 813342265.175.png 813342265.177.png 813342265.178.png 813342265.179.png 813342265.180.png 813342265.181.png 813342265.183.png 813342265.184.png 813342265.185.png 813342265.186.png 813342265.187.png 813342265.188.png
 
 
813342265.189.png 813342265.191.png 813342265.192.png 813342265.193.png 813342265.194.png 813342265.195.png 813342265.196.png 813342265.197.png 813342265.198.png 813342265.199.png 813342265.200.png 813342265.202.png 813342265.203.png 813342265.204.png 813342265.205.png 813342265.206.png 813342265.207.png 813342265.208.png 813342265.209.png 813342265.210.png 813342265.211.png 813342265.213.png 813342265.214.png 813342265.215.png 813342265.216.png 813342265.217.png 813342265.218.png 813342265.219.png 813342265.220.png 813342265.221.png
 
Pro Android Games
■ ■ ■
Vladimir Silva
813342265.223.png 813342265.224.png 813342265.225.png 813342265.226.png 813342265.227.png 813342265.228.png 813342265.229.png
Pro Android Games
Copyright © 2009 by Vladimir Silva
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-13 (pbk): 978-1-4302-2647-5
ISBN-13 (electronic): 978-1-4302-2648-2
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.
President and Publisher: Paul Manning
Lead Editor: Steve Anglin, Douglas Pundick
Technical Reviewer: Kunal Mittal and Vikram Goyal
Editorial Board: Clay Andres, Steve Anglin, Mark Beckner, Ewan Buckingham, Gary Cornell,
Jonathan Gennick, Jonathan Hassell, Michelle Lowman, Matthew Moodie, Duncan Parkes,
Jeffrey Pepper, Frank Pohlmann, Douglas Pundick, Ben Renow-Clarke, Dominic
Shakeshaft, Matt Wade, Tom Welsh
Coordinating Editor: Fran Parnell
Copy Editors: Heather Lang and Marilyn Smith
Formatter: Nancy Wright
Compositor: LaurelTech
Indexer: BIM Indexing and Proofreading Services
Artist: April Milne
Cover Designer: Anna Ishchenko
Distributed to the book trade worldwide by Springer-Verlag New York, Inc., 233 Spring Street,
6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax 201-348-4505, e-mail
For information on translations, please e-mail info@apress.com , or visit http://www.apress.com .
Apress and friends of ED books may be purchased in bulk for academic, corporate, or promotional
use. eBook versions and licenses are also available for most titles. For more information, reference
our Special Bulk Sales–eBook Licensing web page at http://www.apress.com/info/bulksales .
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 . You will need to
answer questions pertaining to this book in order to successfully download the code.
Contents at a Glance
Contents..................................................................................................................... iv
About the Author ........................................................................................................ x
About the Technical Reviewer ................................................................................... xi
Introduction .............................................................................................................. xii
Chapter 1: Welcome to Android Gaming................................................................. 1
Chapter 2: Compiling Native Code in Android ...................................................... 27
Chapter 3: Building a Java Game from Scratch ................................................... 55
Chapter 4: Java Games Continued: Fun with Polygons ........................................ 81
Chapter 5: Hybrid 3D Graphics with OpenGL and JNI ......................................... 117
Chapter 6: 3D Shooters Episode I: Wolfenstein 3D for Android .......................... 161
Chapter 7: 3D Shooters Episode II: Doom for Android........................................ 221
Appendix: Deployment and Compilation Tips ..................................................... 271
Index: ................................................................................................................. 287
813342265.230.png 813342265.231.png 813342265.232.png 813342265.234.png 813342265.235.png 813342265.236.png 813342265.237.png
Zgłoś jeśli naruszono regulamin