f you’ve never written a book, I have to tell you that it’s not easy. Once upon a time I
was an armchair critic of books—in hindsight, maybe that’s why I decided to write
one. The thing that strikes you when you embark on writing something like this is the
sheer mountain of (hard) work involved. In fact, it’s so much work that it really isn’t possible for one person to do it alone. Throughout the writing of this book, I’ve been helped
in so many ways by so many people that I can’t hope to get across how grateful I am. All
I can do is say a thank you and trust you to know how much I mean it.
I will, however, attempt to recognize some of the people who deserve a little acknowledgment—if I’ve forgotten you, then obviously you didn’t deserve it. . . . :)
First, thanks to André LaMothe for giving me the opportunity to contribute to such an
excellent series. To Mitzi Koontz, Jenny Davidson, and Cathleen Snyder for the excellent
feedback, continual support, and understanding when things didn’t quite go according to
plan—we got there in the end. Thanks also to Cristiano Garibaldi for covering all the
technical bases (and learning along with me).
To Colin Pyle and J. Alexander von Kotze: Thanks for never giving up on the dream of
making games for a living (and an extra thanks to Colin for supplying the excellent sprites
used in the examples).
To Blake, for allowing me to use his laptop sometimes, and to Ryan, for showing me how
a CD drive opens a thousand times. To Vandana and Pratibha Rai for buying me some
time (and thanks for the math books laaa). To Scott, Rhandy, Simon, Rob, Gibbo, Mike,
Jules, Kristy, Kat, Lee, and the rest of the team for keeping the day job challenging, interesting, and fun.
To Tarek, Sahar, Radfan, and Suleiman for the encouragement and support only friends
To Rick, my only mentor, for showing me that computing really is a science.
To my mum, for showing me that being creative is a way of life and dad for throwing in
regular doses of reality.
And finally, to the one and only G.I.: Thanks for believing from day one we could do it,
and then bearing the brunt of following through on that belief.
About the Author
MARTIN J. WELLS began programming his own games on a Tandy micro-computer more
than 20 years ago. Throughout an extensive career in the IT industry, he has worked in
many diverse fields involving a huge variety of computer languages and systems, including Java from its origins. He has extensive experience in media, communications, and
entertainment industry development and has founded successful companies in all of these
Martin lives with his wife and two sons in Sydney, Australia. He loves playing soccer and
inline hockey, reading, and playing with anything cool and interesting (including his sons).
About the Series Editor
ANDRÉ LAMOTHE, CEO, Xtreme Games LLC, has been involved in the computing industry for more than 25 years. He wrote his first game for the TRS-80 and has been hooked
ever since! His experience includes 2D/3D graphics, AI research at NASA, compiler
design, robotics, virtual reality, and telecommunications. His books are top sellers in
the game programming genre, and his experience is echoed in the Premier Press Game
Letter from the Series Editor
Writing games for PCs is fun, but it just doesn’t have the feel of a console or other handheld device. However, the thought of creating an embedded game for a phone was completely out of the question a few years ago, unless you wanted to call up Nokia or
Motorola and see if you could have the contract to create the on-board games. (I wish
someone would have; they are terrible!) Anyway, luckily for us, new phones support a
number of technologies that allow programmers to create fantastic applications. One
such technology is Java II Micro Edition, or J2ME. And that’s what this book is all
about—writing games for any phone that supports the J2ME standard.
When I first thought of doing a book on J2ME game programming, I knew that I wanted
it to push the envelope to set a new standard on what can be done on a phone. That
means I had to find an author who was an expert on the platform, but was also willing
to push limits and do the impossible, in a manner of speaking. I have to say that I am
very happy with this book. The author, Martin Wells, had the same vision about wanting to create the most amazing book on phone/J2ME game programming. For example,
he knew that he had to put a chapter on 3D in the book and talk about optimization and
other advanced topics. The bottom line is that this book is the best book on the market
about making real games on the J2ME platform; moreover, it’s written by someone who
has made numerous games on the platform. Marty knows the ins and outs and tricks of
the system, which is invaluable in such a complex subject area with so many other
choices to confuse you.
The other amazing thing about this book is that it is completely self-contained; if you
don’t know Java 2, there is a Java 2 primer contained within, so more or less all you need
is your phone, the book, and some time and you are going to be creating J2ME games on
your own phone! I think that this is an amazing thing to be able to do. It’s like having
your own little game console in your hand. You can play your own games or give them
to your friends, or possibly even sell and market them (which is also covered within the
In conclusion, if you have been interested in writing games for phones under the J2ME
platform, but don’t know where to start, how to integrate all the technology, or make
sense of all the different APIs, then this is the book for you. Rarely can a single book
empower someone to do so much, but Martin Wells has done an amazing job of it.
Series Editor, Premier Game Development Series