AppStars

Mobstar Games, 2004–2007

Mobstar Games: J2ME games for around 150 handsets, from 2004.

Mobstar Games was our mobile games studio. From 2004 we shipped our own arcade games for Java phones, each tuned for around 150 different handsets and often under 35 KB. We ported licensed titles from BREW to J2ME, built branded games for the BBC and for spirits brands on our own multiplayer server, and wrote MEmu so people could play our phone games in a web browser.

Owner
Mobstar Games, our own studio, with publishers and brands including the BBC
Industry
Games; media & brands
Services
Mobile games, porting, real-time multiplayer, build tools
Platforms
Java ME (MIDP 1.0 and 2.0, CLDC 1.0 and 1.1), BREW, C# and .NET with SQL Server, Java applets
Our role
We designed, built and shipped the games, the ports, the multiplayer server and the tools behind them.

The challenge

Before app stores, "Java phone" was a promise that the same code would run everywhere. It didn't. Screens ran from 128×128 to 176×220, and some phones reported a different drawable area from the one you actually got. Some ran MIDP 1.0 with almost no game APIs; others MIDP 2.0. Jar size was capped per handset and per operator portal, heaps were tiny, and every brand used different key codes.

Games were downloaded over the air and paid for by the kilobyte, so every byte of art and code had to earn its place. One game could need 18 or 19 device-specific builds to reach the market, and testing every phone by hand was not an option.

Our approach

  • One source tree, many builds. Variation was handled by the build, not by branches: preprocessor flags, per-resolution resource folders and one build configuration per screen and profile.
  • Handsets are data. A device list turned one build per configuration into one named build per handset.
  • Budgets first. Jar size, heap and frame time were set before features, and features were cut to fit, not the other way round.
  • Integer maths, no allocation in the hot path. Most target phones had no floating point and slow garbage collection.

What we built

Our own games

AstralX, our first J2ME game, was a shooter with 40 levels and five bosses, published by Telcogames. Magic Clouds, an arcade puzzle-platformer with 50 stages and an online leaderboard uploaded from the phone, was sold through Sony Ericsson in five languages. Fishing, Jewels and X-Pong followed; Fishing's download page listed 168 named handsets, at 27 KB to 35 KB depending on the device.

Three jar sizes from one game

When a handset's jar limit was smaller than the game, we cut the same game down instead of writing a second one. AstralX shipped as a 120,038-byte MIDP 2.0 build, a 92,174-byte build and a 54,265-byte MIDP 1.0 Mini that dropped two bosses, two enemy types, a bitmap font and a bonus module. Positions were fixed point (24:8), sine and cosine came from lookup tables, sprites came from a fixed pool, and garbage collection ran on loading screens, never mid-wave. An obfuscator shortened class names, and our resource packer folded art into a single file to avoid the jar's per-file overhead.

Ports and branded games

For publishers we ported licensed titles from BREW to J2ME, including Shrek 2 and MTX: Mototrax. For the BBC's CBBC we built Headrush "Face It!", a face-matching puzzle game in eight screen-size builds. We also built poker games for spirits brands, and a promotional platform game for Esselte. Throughout, we worked with client artists so their artwork fitted each device's screen and memory before it reached a build.

MoGam, a multiplayer card-game server

The branded poker games needed real-time multiplayer, so in 2007 we built MoGam: a C# and .NET server for multi-table Texas Hold'em and blackjack, with phone clients over TCP, SQL Server, an admin console and a test client. Its key design choice still holds: socket threads only read and write, and a single message pump feeds every message to the game, so game logic runs on one thread and never races itself. Hand ranking was written from first principles, and blackjack and Hold'em shared one table abstraction.

MEmu: phone games in a web browser

MEmu was a Java applet that re-implemented the phone's MIDP display and game APIs on the desktop JVM, so visitors to our website could play a game inside a Sony Ericsson K700 skin before installing anything. A new handset skin was a properties file and some images: screen area, button hit areas and key map, all data.

Architecture

The build pipeline that made around 150 handsets manageable.

  1. One source treePreprocessor flags per screen and profile
  2. ResourcesA folder of art for each screen size
  3. BuildCompile, preprocess, obfuscate, preverify
  4. Jar per configurationSized for each tier
  5. JarNamerA named jar and jad for every handset

Layout constants were static finals, so the compiler removed code for screens a build didn't target.

Results

Under the hood

Small, fast and portable, because it had to be.

Why it matters now

Android today is the same problem with better tools: thousands of models, different screens, vendor quirks and very different amounts of memory. The habits from Mobstar Games still decide whether a field app runs well on the cheapest phone a crew carries. That's how we approach mobile and field apps.

Budgets matter even more with AI. Choosing which features fit a 54 KB jar is the same question we ask when fitting a model onto a phone or a pair of glasses: what has to run on this device, what may it cost, and what do we cut so it still does its job? That's where our wearables and edge AI work starts. From the same era: MIAD, our server-driven UI SDK, and B-Live Radio for Bacardi. And in 2025 we ported AstralX to .NET 9 Blazor WebAssembly: same game, 21 years apart.

Lessons for today

  • Build for the matrix, not the device. Configurations, resource folders and a device list scaled to around 150 phones. Hand-made builds wouldn't have.
  • Set budgets before features. Size, memory and frame time are design inputs. Decide what a feature may cost, then design it to fit.
  • Collect garbage when you choose. Keep allocation out of hot paths and do the expensive work on a loading screen, not in the middle of the action.
  • Automate the boring release step. JarNamer was about 120 lines and saved more time than any clever code, because it turned a manual, error-prone step into a command.
  • Let people try before they install. A playable demo in a web page did more than a description ever could. Prototypes in front of real users still win arguments.

Questions

What was Mobstar Games?

Our mobile games studio, founded in 2004. It made its own J2ME arcade games, ported licensed titles for publishers and built branded games for the BBC and spirits brands.

How did one game run on around 150 handsets?

One source tree with preprocessor flags, resources per screen size and one build configuration per screen and profile. A small tool then produced a named build for every handset.

What was MoGam?

Our real-time multiplayer server for Texas Hold'em and blackjack, written in C# and .NET, with phone clients, an admin console and a single message pump driving the game logic.

Can you still play AstralX?

Yes. In 2025 we ported it to .NET 9 Blazor WebAssembly, so it runs in a web browser at the original Nokia resolution.

Related

The services behind this work, and more stories like it.

Services

Case studies

Bring us the hard problem.

A 45-minute discovery call with the engineer who'll build it.