2 options
Learning Java by building android games : get ready for a fun-filled experience of learning Java by developing games for the Android platform / John Horton.
- Format:
- Book
- Author/Creator:
- Horton, John, 1920- author.
- Series:
- Community experience distilled.
- Community Experience Distilled
- Language:
- English
- Subjects (All):
- Android (Electronic resource).
- Java (Computer program language).
- Android (Electronic resource)--Programming.
- Physical Description:
- 1 online resource (392 p.)
- Edition:
- 1st edition
- Other Title:
- Get ready for a fun-filled experience of learning Java by developing games for the Android platform
- Place of Publication:
- Birmingham, England : Packt Publishing, 2015.
- Language Note:
- English
- System Details:
- Mode of access: World Wide Web.
- text file
- Summary:
- If you are completely new to either Java, Android, or game programming and are aiming to publish Android games, then this book is for you. This book also acts as a refresher for those who already have experience in Java on another platforms or other object-oriented languages.
- Contents:
- Cover; Copyright; Credits; About the Author; About the Reviewers; www.PacktPub.com; Table of Contents; Preface; Chapter 1: Why Java, Android, and Games?; Is this book for me?; If you just want to learn pure Java; If Android is your focus; Where this book will take you; Why build games to learn to program?; Why Android and Java?; Android is the fastest evolving and growing OS ever; Android developers have great prospects; Android is open source; Java is here to stay; Java is not just for Android; Java is fast and easy to use; A summary of Java and Android
- Setting up our development environmentInstalling the JDK; Android Studio; Installing Android Studio; Summary; Chapter 2: Getting Started with Android; Our first game project; Preparing Android Studio; Building the project; Exploring Android Studio; Using the Android Studio visual designer; Android UI types; TextView; Layout elements; ImageView widgets; ButtonView; Using the sample code; Making our game menu; Structuring our code for Android; Life cycle phases - what we need to know; Life cycle phases - what we need to do; Dividing our game into activities; Our first look at Java
- Cleaning up our codeBuilding and installing our game; Emulators and devices; Creating an emulator; Running the emulator; Running our game on the emulator; Building our game; Installing the setup to a device; Future projects; Self-test questions; Summary; Chapter 3: Speaking Java - Your First Game; Java syntax; The compiler; Making code clear with comments; Storing data and using it with variables; Types of variables; Reference types; Declaration; Initialization; Expressing yourself in Java; Math game - asking a question; Creating the new game activity; Laying out the game screen UI
- Coding a question in JavaLinking our game from the main menu; Decisions in Java; More operators; Decision 1 - If they come over the bridge, shoot them; Decision 2 - Else, do this; Switching to make decisions; Math game - getting and checking the answer; Self-test questions; Summary; Chapter 4: Discovering Loops and Methods; Looping with loops; While loops; Breaking out of a loop; The continue keyword; Do-while loops; For loops; Random numbers in Java; Methods; The structure of a method; Modifier; Return type; Name of a method; Parameters; Getting things done in the method body; Using methods
- A working methodExploring method overloading; Enhancing our math game; Enhancing the UI; The new Java code; Amending GameActivity; The methods; The setQuestion method; The updateScoreAndLevel method; The isCorrect method; Calling our new methods; Finishing touches; Going full screen and locking orientation; Adding a custom image (instead of the Android icon); Self-test questions; Summary; Chapter 5: Gaming and Java Essentials; Java arrays - an array of variables; Arrays are objects; A simple example of an array; Getting dynamic with arrays; Dynamic array example
- Entering the nth dimension with arrays
- Notes:
- Includes index.
- Includes bibliographical references and index.
- Description based on online resource; title from PDF title page (ebrary, viewed February 11, 2015).
- ISBN:
- 9781784393847
- 1784393843
- OCLC:
- 904154023
The Penn Libraries is committed to describing library materials using current, accurate, and responsible language. If you discover outdated or inaccurate language, please fill out this feedback form to report it and suggest alternative language.