Mario Bros Java Game 240x320 - Super
The original NES game ran on a 256x240 pixel screen (landscape). The Java phone ran 240x320 (portrait). To solve this, developers did two things:
In the golden era of the Sony Ericsson and Nokia handsets, a specific version of Super Mario Bros
for Java (J2ME) existed—often a fan-made port or a "homebrew" miracle compressed into a tiny .jar file.
Here is a story of a pixelated hero trapped in a 240x320 resolution world. The Legend of the 16-Bit Castaway
The year was 2008. Tucked away in the "Games" folder of a scuffed Nokia N73, nestled between Snake III and Tetris, lived a version of Mario that shouldn’t have existed. This wasn’t the sprawling odyssey of consoles; this was Super Mario Bros: J2ME Edition , a world defined by a strict 240x320 vertical boundary.
The First BootMario didn't wake up to a sweeping orchestral score. He woke to a polyphonic rendition of the theme song—thin, tinny, and charmingly off-key. As he stood on the left edge of the screen, he looked up at a sky that felt a little too close. In this world, the clouds were slightly squashed to fit the aspect ratio, and the Goombas moved with a rhythmic, frame-skipping stutter.
The Great CompressionTo Mario, the world felt "tall." Unlike the wide vistas of the NES, every jump felt like a gamble against the top of the screen. He learned to navigate the "Ghost Buttons"—the invisible '2', '4', '6', and '8' keys that controlled his destiny.
The '5' Key: His only hope. It was the "Action" button that sparked the fireballs, though they flickered with a strange transparency to save on the phone's limited heap memory.
The Glitch in the KingdomOne afternoon, while sprinting through World 1-2, the frame rate dropped. The phone’s backlight flickered—a low battery warning. For Mario, this was an existential threat. The world began to "tear." Bowser’s castle didn't look like a fortress; it looked like a collection of misaligned tiles.
He reached the flagpole just as the screen dimmed. He didn't just slide down a pole; he descended into a sea of "Application Error" text. But as the charger was plugged in and the .jar file re-executed, Mario reset. He was a hero of the 240x320 realm—destined to be played under school desks and on long bus rides, a tiny king in a pocket-sized kingdom. super mario bros java game 240x320
Searching for a Super Mario Bros game in Java for the 240x320 resolution typically refers to the classic mobile versions developed for older J2ME (Java 2 Micro Edition) phones.
Because of copyright, these games are rarely available on official app stores today. However, you can find them through archival sites and enthusiast communities. 🕹️ Where to Find the Game
Phoneky: A long-standing repository for J2ME games. You can search their Java Games section for "Super Mario Bros" and filter by the 240x320 resolution. DEDOMIL
: One of the most comprehensive archives for original .jar files. Visit the Dedomil search page to find various versions, including the popular Super Mario Bros (Planet Zero) or unofficial NES ports.
Internet Archive: Many users have uploaded "Full J2ME Collections" that include dozens of Mario-style games and ports. 📱 How to Play on Modern Devices
Since modern smartphones do not natively run .jar files, you will need an emulator:
Android: Use J2ME Loader. It allows you to upscale the 240x320 resolution to fit your screen and supports on-screen touch controls.
PC: Use KEmulator or MicroEmulator. These are standard for testing and playing old mobile games on a computer. 🛠️ Key Version Differences
Official Releases: There were no "official" Nintendo-developed Java games, as Nintendo kept their IP on their own hardware. The original NES game ran on a 256x240
Gameloft/Mobile Ports: Most "Mario" games on Java were either high-quality clones (like Diamond Rush mechanics) or fan-made ports of the original NES game.
Screen Orientation: Ensure you download the Portrait version if your emulator setup is vertical, or Landscape if you prefer the wider NES-style view.
💡 Tip: When searching, look for filenames ending in .jar. Be cautious of sites asking you to download .exe or .apk files directly from a "Java game" link, as these are often incorrect formats.
Several variations were developed for mobile devices, each with varying levels of accuracy to the original NES classic: Super Mario Bros. Super Show (3-in-1)
: Often cited as an "absolutely exact copy" of the original NES (Dendy/Sega) versions for mobile phones. Super Mario Forever
: A Java port of the popular PC fan-game, featuring modern graphics but maintaining classic mechanics. Super Mario Dreams Blur Galaxy
: A more stylized Java version with different level designs and animations. Super Mario Saiyan Adventure
: A high-speed "Mario on drugs" style game where the speed can make controls difficult. Gameplay Mechanics & Features
These mobile ports generally strive to replicate the core experience of the 1985 classic: Side-Scrolling Action The original NES Mario ran at 60 FPS
: Players navigate Mario through various stages to save the princess from Bowser.
: Includes the Magic Mushroom for growth, Fire Flowers for shooting fireballs, and Starman for 20 seconds of invincibility. Collectibles
: Gathering 100 gold coins awards an extra life, while green 1-Up Mushrooms are rare and hidden in risky locations. Level Progression
: Worlds typically end with a flagpole slide or a boss fight with Bowser over a bridge. Typical Mobile Controls (T9 Keypad) While modern PC-based Java clones use keys like Z (run/fire)
, original J2ME mobile versions usually utilized the number pad: SourceForge : Move Left / Right : Fire / Duck : Jump or Select download link for one of these 240x320 versions, or are you looking for installation instructions for a modern emulator?
import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.util.ArrayList; import java.util.Iterator;public class MarioGame extends JPanel implements ActionListener, KeyListener { private static final int WIDTH = 240; private static final int HEIGHT = 320; private static final int GROUND_Y = 280;
// Mario private int marioX = 50, marioY = GROUND_Y - 20; private int marioVelX = 0, marioVelY = 0; private boolean onGround = true; private final int MARIO_WIDTH = 16, MARIO_HEIGHT = 20; // World private ArrayList<Platform> platforms; private ArrayList<Goomba> goombas; private ArrayList<Coin> coins; private int score = 0; private boolean gameOver = false; private Timer timer; public MarioGame() setPreferredSize(new Dimension(WIDTH, HEIGHT)); setBackground(Color.CYAN); setFocusable(true); addKeyListener(this); initLevel(); timer = new Timer(16, this); // ~60 FPS timer.start(); private void initLevel() platforms = new ArrayList<>(); // Ground platforms.add(new Platform(0, GROUND_Y, WIDTH, 10)); // Left platform platforms.add(new Platform(40, 250, 60, 10)); // Middle platform platforms.add(new Platform(120, 220, 60, 10)); // Right high platform platforms.add(new Platform(190, 180, 50, 10)); goombas = new ArrayList<>(); goombas.add(new Goomba(100, GROUND_Y - 15, 15, 15)); goombas.add(new Goomba(180, 250 - 15, 15, 15)); coins = new ArrayList<>(); coins.add(new Coin(60, 230, 8, 8)); coins.add(new Coin(140, 195, 8, 8)); coins.add(new Coin(200, 155, 8, 8)); marioX = 50; marioY = GROUND_Y - MARIO_HEIGHT; marioVelX = 0; marioVelY = 0; score = 0; gameOver = false; @Override public void actionPerformed(ActionEvent e) if (!gameOver) updateGame(); repaint(); private void updateGame() // Apply gravity marioVelY += 1; marioY += marioVelY; // Horizontal movement marioX += marioVelX; // Collision with platforms onGround = false; for (Platform p : platforms) if (marioY + MARIO_HEIGHT > p.y && marioY + MARIO_HEIGHT <= p.y + p.height + marioVelY && marioX + MARIO_WIDTH > p.x && marioX < p.x + p.width) marioY = p.y - MARIO_HEIGHT; marioVelY = 0; onGround = true; // Head bump (optional) if (marioY < p.y + p.height && marioY + MARIO_HEIGHT > p.y + p.height && marioX + MARIO_WIDTH > p.x && marioX < p.x + p.width && marioVelY < 0) marioY = p.y + p.height; marioVelY = 0; // World boundaries if (marioX < 0) marioX = 0; if (marioX + MARIO_WIDTH > WIDTH) marioX = WIDTH - MARIO_WIDTH; if (marioY + MARIO_HEIGHT > GROUND_Y + 10) gameOver = true; // Update enemies for (Goomba g : goombas) g.update(); // Enemy collision (game over) if (marioX < g.x + g.w && marioX + MARIO_WIDTH > g.x && marioY < g.y + g.h && marioY + MARIO_HEIGHT > g.y) gameOver = true; // Collect coins Iterator<Coin> it = coins.iterator(); while (it.hasNext()) Coin c = it.next(); if (marioX < c.x + c.size && marioX + MARIO_WIDTH > c.x && marioY < c.y + c.size && marioY + MARIO_HEIGHT > c.y) it.remove(); score += 10; // Jumping logic if (onGround && marioVelY == 0) // can jump in keyPressed @Override public void paintComponent(Graphics g) super.paintComponent(g); // Draw sky g.setColor(Color.CYAN); g.fillRect(0, 0, WIDTH, HEIGHT); // Draw platforms (brown) g.setColor(new Color(139, 69, 19)); for (Platform p : platforms) g.fillRect(p.x, p.y, p.width, p.height); // Draw coins (yellow) g.setColor(Color.YELLOW); for (Coin c : coins) g.fillOval(c.x, c.y, c.size, c.size); // Draw Goombas (dark brown) g.setColor(new Color(80, 50, 30)); for (Goomba gb : goombas) g.fillRect(gb.x, gb.y, gb.w, gb.h); g.setColor(Color.BLACK); g.fillRect(gb.x + 3, gb.y + 3, 3, 3); g.fillRect(gb.x + 9, gb.y + 3, 3, 3); g.setColor(new Color(80, 50, 30)); // Draw Mario (red with hat) g.setColor(Color.RED); g.fillRect(marioX, marioY, MARIO_WIDTH, MARIO_HEIGHT); g.setColor(Color.BLUE); g.fillRect(marioX + 2, marioY - 4, 12, 4); // hat g.setColor(Color.WHITE); g.fillRect(marioX + 4, marioY + 4, 3, 3); // eye // Score g.setColor(Color.BLACK); g.setFont(new Font("Arial", Font.BOLD, 12)); g.drawString("Score: " + score, 10, 20); if (gameOver) g.setColor(Color.RED); g.setFont(new Font("Arial", Font.BOLD, 20)); g.drawString("GAME OVER", WIDTH/2 - 60, HEIGHT/2); g.setFont(new Font("Arial", Font.PLAIN, 12)); g.drawString("Press R to restart", WIDTH/2 - 50, HEIGHT/2 + 30); @Override public void keyPressed(KeyEvent e) key == KeyEvent.VK_UP) if (onGround) marioVelY = -12; onGround = false; @Override public void keyReleased(KeyEvent e) int key = e.getKeyCode(); if (key == KeyEvent.VK_LEFT @Override public void keyTyped(KeyEvent e) {} // Helper classes class Platform int x, y, width, height; Platform(int x, int y, int w, int h) this.x = x; this.y = y; width = w; height = h; class Goomba int x, y, w, h; int dir = 1; Goomba(int x, int y, int w, int h) this.x = x; this.y = y; this.w = w; this.h = h; void update() class Coin int x, y, size; Coin(int x, int y, int s) this.x = x; this.y = y; size = s; public static void main(String[] args) JFrame frame = new JFrame("Super Mario Bros - 240x320"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setResizable(false); frame.add(new MarioGame()); frame.pack(); frame.setLocationRelativeTo(null); frame.setVisible(true);
}
The original NES Mario ran at 60 FPS. Java phones rarely broke 15-20 FPS. To compensate, developers reduced the number of moving sprites. Instead of 3 Koopas on screen, you'd get 1. Instead of scrolling clouds, the background was a static tile layer.
Performance Note: This game is optimized for portrait mode (240x320). The HUD (Heads-Up Display) displays your Score, Coin Count, World Number, and Time remaining at the top of the screen.
Saving: The game uses automatic checkpoints. Your progress is saved after completing a castle. Do not turn off your mobile device while the saving icon is blinking.