Java Game 240x320 Gameloft -

The Call of Duty 4 of mobile phones.

For a game, you often need to handle graphics and user input manually. Java Game 240x320 Gameloft

import javax.microedition.lcdui.Canvas;
import javax.microedition.lcdui.Graphics;
import javax.microedition.lcdui.Image;
import javax.microedition.midlet.MIDlet;
public class MyGame extends MIDlet
private GameCanvas gameCanvas;
public MyGame() 
        gameCanvas = new GameCanvas(this);
        Display.getDisplay(this).setCurrent(gameCanvas);
protected void startApp() throws MIDletStateChangeException 
        gameCanvas.start();
protected void pauseApp()
protected void destroyApp(boolean unconditional) throws MIDletStateChangeException
class GameCanvas extends Canvas
private MyGame midlet;
    private Image background;
    private int screenWidth, screenHeight;
public GameCanvas(MyGame midlet) 
        this.midlet = midlet;
        screenWidth = getWidth(); // 240
        screenHeight = getHeight(); // 320
        try 
            background = Image.createImage("/background.png");
         catch (Exception e) 
            // Handle exception
public void start() 
        // Game loop
        while (isShown()) 
            try 
                Thread.sleep(50); // Adjust for game speed
             catch (InterruptedException ex) 
                // Handle exception
repaint();
protected void paint(Graphics g) 
        g.drawImage(background, 0, 0, Graphics.TOP_LEFT);
        // Draw game elements here

Genre: First Person Shooter Why it matters: The "Call of Duty 4" of Java. Using a pre-rendered 3D environment (the game wasn't real-time 3D, but used "billboarding" sprites for enemies), it offered a campaign set in the Middle East. The 240x320 screen allowed for a surprisingly accurate iron-sight mechanic using the '0' key. The set pieces—helicopter crashes, breaching doors—were jaw-dropping for the era. The Call of Duty 4 of mobile phones

Genre: Platformer Why it matters: Licensed games on Java were usually terrible. Gameloft made them great. This side-scroller used Gameloft's proprietary "Jamp" engine. The 240x320 screen showed off vibrant greens and purples in the swamp level. Shrek had a full moveset: jump slam, throw, and headbutt. It played like a lost GBA title. Genre: First Person Shooter Why it matters: The

Gameloft was the Blizzard of J2ME:

You can still play them:

What set their 240x320 games apart?