Exit Print View

Java Platform Micro Edition Software Development Kit Version 3.0

Get PDF Book Print View

Document Information

Getting Started

Java ME Platform SDK Features

Using Sample Projects

Creating and Editing Projects

Viewing and Editing Project Properties

Running Projects in the Emulator

Searching the WURFL Device Database

Finding Files in the Multiple User Environment

Profiling Applications

Monitoring Network Traffic

Lightweight UI Toolkit

Security and MIDlet Signing

BD-J Support

CLDC Emulation on a Windows Mobile Device

Installing CLDC Emulation on a Windows Mobile Emulator

On-device Debugging

Command Line Reference

Logs

JSR Support

JSR 75: PDA Optional Packages

JSR 82: Bluetooth and OBEX Support

JSR 135: Mobile Media API Support

JSR 172: Web Services Support

JSR 177: Smart Card Security (SATSA)

JSR 179: Location API Support

JSRs 184, 226, and 239: Graphics Capabilities

Mobile 3D Graphics (JSR 184)

Choosing a Graphics Mode

Immediate Mode

Retained Mode

Quality Versus Speed

Content for Mobile 3D Graphics

Running Demo3D Samples

Life3D

retainedmode

PogoRoo

Java Bindings for OpenGL ES (JSR 239)

Scalable 2D Vector Graphics (JSR 226)

Running SVGDemo

SVG Browser

Render SVG Image

Play SVG Animation

Create SVG Image from Scratch

Bouncing Balls

Optimized Menu

Picture Decorator

Location Based Service

PlaySVGImageDemo

Running SVGContactList

JSR 205: Wireless Messaging API (WMA) Support

JSR 211: Content Handler API (CHAPI)

JSR 238: Mobile Internationalization API (MIA)

JSR 229: Payment API Support

JSR 256: Mobile Sensor API Support

Index

Life3D

Life3D implements the popular Game of Life in three dimensions. Live cells are represented by cubes. Each cell has 26 possible neighbors (including diagonals). For each step of the animation, cells with fewer than four neighbors die of loneliness, while cells with more than five neighbors die of overcrowding. An empty cell with exactly four neighbors becomes a new live cell.

The view of the playing board rotates slowly so you can view the board from all angles.

The keypad buttons in Table 1 provide control over the game.

Controls for Life3D
Button
Description
0
Pause the animation.
1
Resume the animation at its default speed.
2
Speed up the animation.
3
Slow down the animation.
4
Choose the previous preset configuration from an arbitrary list. The name of the configuration is shown at the top of the screen.
5
Choose the next preset configuration from the list.
*
Generate a random configuration and animate until it stabilizes or dies. If it dies, generate a new random configuration.

See the source code for this example is at installdir\apps\Demo3D\src\com\superscape\m3g\wtksamples\life3d\Life3D.java.

ing HTML relocated from here.