MIDP 2.0 Games: a Step-by-Step Tutorial with Code Samples (Step 6)

And here’s the code for Tumbleweed.java: package net.frog_parrot.jump; import java.util.Random; import javax.microedition.lcdui.*;import javax.microedition.lcdui.game.*; /** * This class represents the tumbleweeds that the player  * must jump over. * * @author Carol Hamer */public class Tumbleweed extends Sprite {   //———————————————————  //   dimension fields   /**   * The width of the tumbleweed’s bounding square.   */  static int WIDTH = 16; … Continue reading "MIDP 2.0 Games: a Step-by-Step Tutorial with Code Samples (Step 6)"

MIDP 2.0 Games: a Step-by-Step Tutorial with Code Samples (Step 3)

The GameCanvas Class The GameCanvas class represents the area of the screen that the device has allotted to your game. The javax.microedition.lcdui.game.GameCanvas class differs from its superclass javax.microedition.lcdui.Canvas in two important ways: graphics buffering and the ability to query key states. Both of these changes give the game developer enhanced control over precisely when the … Continue reading "MIDP 2.0 Games: a Step-by-Step Tutorial with Code Samples (Step 3)"