Beginning Mobile Phone Game Programming
暫譯: 手機遊戲程式設計入門

Michael Morrison

  • 出版商: SAMS
  • 出版日期: 2004-11-01
  • 售價: $1,690
  • 貴賓價: 9.5$1,606
  • 語言: 英文
  • 頁數: 528
  • 裝訂: Paperback
  • ISBN: 0672326655
  • ISBN-13: 9780672326653
  • 已絕版

買這商品的人也買了...

商品描述

Description:

Build several fully functional games as well as a game engine to use for programming cell phone and mobile games with Beginning Mobile Phone Game Programming! The included CD provides the tool, code and graphics necessary to complete all exercises covered in the chapters. Beginning Cell Phone Game Programming demystifies wireless game programming by providing clear, practical lessons using the J2ME Game API. You will learn how to use the most popular mobile programming language, Java, to build compact games that can run on any Java-enabled device, including mobile phones, pagers and handheld computers. You will also learn to add a splash screen, create a demo mode, keep track of high scores, and test, debug, and deploy your games.

Topics covered include:

  • How to construct a game engine to drive mobile games.
  • How to use Java 2 Micro Edition (J2ME) and the Java Game API to get the most performance out of your mobile games.
  • How to implement sprite animation and control interactions among moving sprites.
  • How to play sound effects and music in mobile games.
  • How to take advantage of wireless networks to build mobile multiplayer games.
  • How to design and develop a variety of different games spanning several video games genres.

 

Table of Contents:

Introduction.

I. GETTING STARTED WITH MOBILE GAME PROGRAMMING.

1. Games on the Go.

    Essentials of Mobile Gaming

      The First Mobile Phone Game

      The Market for Mobile Games

      The Culture of Mobile Games

      The Bleeding Edge of Mobile Gaming

    Getting to Know Mobile Platforms

      Java 2 Micro Edition (J2ME)

      Binary Runtime Environment for Wireless (BREW)

      Symbian

      Windows Mobile Smartphone

    Java As a Mobile Game Platform

      What Is Java?

      Why Java?

      Java and Mobile Game Programming

    A Quick J2ME Primer

      Configurations and the Connected Limited Device Configuration (CLDC)

      Profiles and the MIDP

    Summary

    Field Trip

2. Mobile Java Game Development Basics.

    Game Design Basics

      Coming Up with the Basic Idea

      Developing the Storyline

      Establishing the Play Modes

    A J2ME Game Development Primer

    Getting to Know the J2ME Wireless Toolkit

      Using KToolbar

      Managing MIDlet Game Projects

      Building a Game MIDlet

      Testing a Game MIDlet

    The J2ME Emulator and Physical Devices

    Summary

    Field Trip

3. Constructing a Mobile Game Skeleton.

    Exploring the J2ME APIs

      The CLDC API

      The MIDP API

    Understanding MIDlets

      Inside a MIDlet

      The Basics of MIDlet Development

    Building the Skeleton Example Program

      Writing the Program Code

      Preparing the MIDlet for Distribution

      Building and Testing the Finished Product

    Summary

    Extreme Game Makeover

II. MOBILE GAME PROGRAMMING ESSENTIALS.

4. Mobile Game Graphics 101.

    Mobile Graphics Basics

      Understanding the Graphics Coordinate System

      Learning the Basics of Color

    Working with Graphics in J2ME

      Drawing Graphics Primitives

      Drawing Text

      Drawing Images

    Building the Olympics Example Program

      Writing the Program Code

      Testing the Finished Product

    Building the Slideshow Example Program

      Writing the Program Code

      Testing the Finished Product

    Summary

    Extreme Game Makeover

5. Using Sprite Animation.

    Understanding Animation

      Animation and Frame Rate

      Making the Move to Computer Animation

      2D Versus 3D Animation

    Analyzing 2D Sprite Animation

      Frame-Based Animation

      Cast-Based Animation

    Applying Sprite Animation to Mobile Games

    Working with the Layer and Sprite Classes

    Achieving Smooth Animation with the GameCanvas Class

    Building the UFO Example Program

      Writing the Program Code

      Testing the Finished Product

    Summary

    Extreme Game Makeover

6. Handling Mobile User Input.

    Assessing Mobile Game Input

    Handling Key Input with the GameCanvas Class

    Revisiting the Sprite Class

      Detecting Sprite Collisions

      Working with Frame-Animated Sprites

    Building the UFO 2 Example

      Writing the Program Code

      Testing the Finished Product

    Summary

    Extreme Game Makeover

7. Henway: Paying Tribute to Frogger.

    The Scoop on Henway

    Designing the Game

    Developing the Game

      Writing the Game Code

    Testing the Game

    Summary

    Extreme Game Makeover

8. Making Noise with Tones.

    Sound and Mobile Games

    A Tonal Sound and Music Primer

    Querying a Phone for Its Audio Capabilities

    Playing Tones in Mobile Games

      Playing Individual Tones

      Playing a Tone Sequence

    Building the UFO 3 Example Program

      Writing the Program Code

      Testing the Finished Product

    Summary

    Field Trip

9. Playing Digitized Sound and Music.

    A Digitized Sound Primer

    Getting to Know Wave Sounds

    Creating and Editing Wave Sounds

    Revisiting the Player Interface

    Playing Wave Sounds in Mobile Games

      Playing a Wave from a JAR File

      Playing a Wave from a URL

    Feeling the Music with MIDI

    Playing MIDI Music in Mobile Games

      Playing a MIDI Song from a JAR File

      Playing a MIDI Song from a URL

    Building the Henway 2 Example Game

      Writing the Game Code

      Testing the Finished Product

    Summary

    Field Trip

III. VIRTUAL WORLDS AND MOBILE GAME INTELLIGENCE.

10. Creating Tiled Game Layers.

    What Is a Tiled Layer?

    Creating Maps for Tiled Layers

      Using the Mappy Map Editor

      Using the Tile Studio Map Editor

      Formatting Map Information for Games

    Working with the TiledLayer Class

      Creating a Tiled Layer

      Moving and Drawing a Tiled Layer

    Building the Wanderer Example Program

      Writing the Program Code

      Testing the Finished Product

    Summary

    Field Trip

11. Managing Multiple Game Layers.

    Dealing with Multiple Game Layers

    Working with the LayerManager Class

    Animating Tiled Layers

    Building the Wanderer 2 Example Program

      Designing the Tiled Layer Maps

      Writing the Program Code

      Testing the Finished Product

    Summary

    Extreme Game Makeover

12. High Seas: A Game for the Pirate in You.

    The Scoop on High Seas

    Designing the Game

      Putting Together the Water Map

      Putting Together the Land Map

    Developing the Game

      Creating a Drift Sprite

      Declaring the Member Variables

      Assembling the start() Method

      Piecing Together the update() Method

      Drawing the Game Screen

      Starting a New Game

      Safely Placing Sprites

    Testing the Game

    Summary

    Extreme Game Makeover

13. Teaching Games to Think.

    The Least You Need to Know About AI

    Exploring Types of Game AI

      Roaming AI

      Behavioral AI

      Strategic AI

    Developing an AI Strategy

    Teaching Sprites to Think...Sort Of

      Designing the Chase Sprite

      Coding the Chase Sprite

    Building the High Seas 2 Example Game

      Writing the Program Code

      Testing the Finished Product

    Summary

    Extreme Game Makeover

IV. TAKING ADVANTAGE OF THE WIRELESS NETWORK.

14. Mobile Game Networking Essentials.

    Multiplayer Game Basics

      Turn-Based Games

      Event-Based Games

    Network Game Problems and Solutions

      State Synchronization

      Input Synchronization

      A Hybrid Solution

    Communicating over a Network with Sockets

      Stream Sockets

      Datagram Sockets

    Network Programming and J2ME

      Creating Datagram Packets

      Sending Datagram Packets

      Receiving Datagram Packets

    Building the Lighthouse Example

      Designing the Client and Server

      Writing the Program Code

      Testing the Finished Product

    Summary

    Field Trip

15. Connect 4: A Classic Game Goes Wireless.

    The Scoop on Connect 4

    Designing the Game

      Graphics and User Interface

      Game Logic

      Networking

    Developing the Game

      The Connect 4 Client and Server

      The Connect 4 Game Canvas

      The Connect 4 Game State

    Testing the Game

    Summary

    Field Trip

16. Debugging and Deploying Mobile Games.

    Game Debugging Basics

      Single-Stepping Code 

      Watching Variables 

      Using Breakpoints

    Game Debugging Strategies

      Bug Prevention

      Bug Detection

    Choosing a Debugger

    Deploying Mobile Games

      Understanding Over-the-Air Provisioning

      Preparing Your Game for Deployment

      Tweaking Your Web Server

    Testing OTA Provisioning with KToolbar

    Summary

    Field Trip

V. SPRUCING UP YOUR GAMES.

17. Optimizing Mobile Java Games.

    Understanding Mobile Game Optimization

      Optimizing for Maintainability

      Optimizing for Portability

      Optimizing for Size

      Optimizing for Speed

    General Mobile Game Optimization Tips

      Reducing Memory Usage

      Minimizing Network Data

      Eliminating Unnecessary Graphics

    Java Code Optimization Tricks

      Compiling Without Debug Information

      Eliminating Unnecessary Evaluations

      Eliminating Common Subexpressions

      Taking Advantage of Local Variables

      Expanding Loops

      Code Shrinking and Obfuscation

    Profiling Your Mobile Game Code

    Monitoring Mobile Game Memory Usage

    Putting Mobile Game Optimization into Perspective

    Summary

    Extreme Game Makeover

18. Space Out: Paying Tribute to Space Invaders.

    The Scoop on Space Out

    Designing the Game

    Developing the Game

      Creating a Moving Sprite

      Declaring the Member Variables

      Assembling the start() Method

      Piecing Together the update() Method

      Drawing the Game Screen

      Starting a New Game

      Adding Aliens, Missiles, and Explosions

    Testing the Game

    Summary

    Extreme Game Makeover

19. Keeping Track of High Scores.

    The Importance of Logging Your Achievements

    Getting to Know the Java RMS

      Understanding Records and Record Stores

      Exploring the RecordStore Class

    Preparing High Score Data for Storage

    Building the Space Out 2 Example Game

      Designing the Game Enhancements

      Writing the Game Code

      Testing the Finished Product

    Summary

    Field Trip

VI. APPENDIXES.

Appendix A. Java Game API Reference.

    The GameCanvas Class

      Member Constants

      Constructor

      Methods

    The Layer Class

      Methods

    The Sprite Class

      Member Constants

      Constructors

      Methods

    The TiledLayer Class

      Constructor

      Methods

    The LayerManager Class

      Constructor

      Methods

Appendix B. Mobile Game Programming Resources.

    Micro Dev Net

    J2ME Gamer

    J2ME.org

    Forum Nokia's Mobile Games Community

    Wireless Developer Network

    GameDev.net

    Gamasutra

    Game Developer Magazine

    Gamelan

    JavaWorld

    The Official Java Website

Appendix C. Creating Graphics for Mobile Games.

    Assessing Game Graphics

      Determining the Game Screen Size

      Reaching the Target Audience

      Establishing a Game Setting and Mood

      Adhering to a Graphics Style

    Exploring Graphics Tools

      Image Alchemy

      Paint Shop Pro

      Graphic Workshop

    Creating and Editing Graphics

      Line-Art Graphics

      3D Rendered Graphics

      Scanned Photography and Video-Captured Graphics

      Background Graphics and Textures

      Animated Graphics

    Finding Graphics

Bonus: Java Programming Primer - CD-ROM.

Index.

商品描述(中文翻譯)

描述:
使用《開始手機遊戲程式設計》建立幾個功能完整的遊戲以及一個遊戲引擎,以便用於程式設計手機和移動遊戲!隨附的CD提供了完成章節中所有練習所需的工具、代碼和圖形。《開始手機遊戲程式設計》通過使用J2ME遊戲API提供清晰、實用的課程,揭開無線遊戲程式設計的神秘面紗。您將學習如何使用最受歡迎的移動程式設計語言Java,構建可以在任何支持Java的設備上運行的緊湊型遊戲,包括手機、傳呼機和手持電腦。您還將學習如何添加啟動畫面、創建演示模式、跟踪高分,以及測試、調試和部署您的遊戲。

涵蓋的主題包括:
- 如何構建一個遊戲引擎來驅動移動遊戲。
- 如何使用Java 2 Micro Edition (J2ME)和Java遊戲API來獲得移動遊戲的最佳性能。
- 如何實現精靈動畫並控制移動精靈之間的互動。
- 如何在移動遊戲中播放音效和音樂。
- 如何利用無線網絡構建移動多人遊戲。
- 如何設計和開發涵蓋多種視頻遊戲類型的各種不同遊戲。

目錄:
引言。
I. 開始手機遊戲程式設計。
1. 隨時隨地的遊戲。
- 移動遊戲的基本要素
- 第一款手機遊戲
- 移動遊戲市場
- 移動遊戲文化
- 移動遊戲的前沿技術
- 了解移動平台
- Java 2 Micro Edition (J2ME)
- 無線二進制運行環境 (BREW)
- Symbian
- Windows Mobile智能手機
- Java作為移動遊戲平台
- Java是什麼?
- 為什麼選擇Java?
- Java與移動遊戲程式設計
- J2ME快速入門
- 配置和連接有限設備配置 (CLDC)
- 配置文件和MIDP
- 總結
- 實地考察
2. 移動Java遊戲開發基礎。
- 遊戲設計基礎
- 想出基本想法
- 開發故事情節
- 確立遊玩模式
- J2ME遊戲開發入門
- 了解J2ME無線工具包
- 使用KToolbar
- 管理MIDlet遊戲項目
- 構建遊戲MIDlet
- 測試遊戲MIDlet
- J2ME模擬器和實體設備
- 總結
- 實地考察
3. 構建移動遊戲骨架。
- 探索J2ME API
- CLDC API
- MIDP API
- 了解MIDlet
- MIDlet內部
- MIDlet開發基礎
- 構建骨架示例程序
- 編寫程序代碼
- 準備MIDlet以供分發
- 構建和測試最終產品
- 總結
- 極限遊戲改造
II. 移動遊戲程式設計要素。
4. 移動遊戲圖形101。
- 移動圖形基礎
- 了解圖形坐標系
- 學習顏色的基本知識
- 在J2ME中處理圖形
- 繪製圖形原語
- 繪製文本
- 繪製圖像
- 構建奧林匹克示例程序
- 編寫程序代碼
- 測試最終產品
- 構建幻燈片示例程序
- 編寫程序代碼
- 測試最終產品
- 總結
- 極限遊戲改造
5. 使用精靈動畫。
- 了解動畫
- 動畫與幀率
- 轉向計算機動畫
- 2D與3D動畫
- 分析2D精靈動畫
- 基於幀的動畫
- 基於角色的動畫
- 將精靈動畫應用於移動遊戲
- 使用層和精靈類
- 使用GameCanvas類實現平滑動畫
- 構建UFO示例程序
- 編寫程序代碼
- 測試最終產品

最後瀏覽商品 (20)