Now that we have our Arkanoid single player experience complete is time to connect to rest of the world. After all better than show off our high-scores to our friends is to show them to everybody in the Internet!
One of the main features of mobile devices is the ability to be connected almost everywhere anytime. Java ME allows easy access to these communications features of your device:
- HTTP
- Socket
- SMS
- Bluetooth
During this lesson we are going to learn to use a HTTP connection to send our highscores data to a central server and to use the SMS functionality to invite other friends to play our Arkanoid game.
Continue reading ‘Lesson 7 - Network’
In our last lesson we learned how to save our game settings, the Sound On/Off screen, but why we have this option, if we don’t have any sound in our game? It’s time to learn about Java Mobile Multimedia API (MMAPI) and add some sound to our game. Let’s rock!
MMAPI offers a set of multimedia capabilities for mobile devices, including playback and recording of audio and video data from a variety of sources. Of course, not all mobile devices support all the options, but MMAPI is designed in such a way that it takes full advantage of the capabilities that are available, while ignoring those that it cannot support.
Continue reading ‘Lesson 6 - Multimedia’
After our last lesson we had a completely functional Arkanoid midlet but one important thing is still missing, can you guess what? To save the high scores! Until know our high scores were lost each time we exit the application (the same happens for the game settings). What’s the point of playing our game if we cannot save the scores to show off to our friends!!!
To implement this functionality you need to understand how the Midlet Input Output works and then how to use RecordStores.
Continue reading ‘Lesson 5 - Files’
In our last lesson, we completed our GameCanvas class with all the main interaction between elements. Now that we have all gameplay elements build it’s time to improve the look of our game.
The ideia is to use some images files to represent our game entities instead of using Graphics draw/fill methods.
With this in mind i created the some images, based on the free SpriteLib resource pack, to use in our game.

Continue reading ‘Lesson 4 - Images, Sprites and Tiles’
At the end of our last lesson we completed the game menu interface for our Arkanoid game. One of the screens we didn’t create was the Game screen. Our goal is to produce a game screen like the screenshot bellow:

For the game screen we cannot use the high level ui elements because we need to have full control the way our game elements are draw and how to react to keypad events. In order to do this we need to use the low level interface classes available in J2ME.
Continue reading ‘Lesson 3 - Graphics’
Since the interaction with the user is a paramount concern in any mobile application, due to the size of the screens, it is important for you to understand the basics of this side of MIDlets. In this article, you will learn what user interface (UI) elements are available on a MIDlet and how to use them in creating a user Inteface for our Arkanoid clone.
Any interaction with a user is done via a UI element. In fact, when you created the simplistic Hello World MIDlet in part one, you used one such element called Alert to show a message on the screen. This message was actually shown on the screen by the help of another UI element called Display.
Let’s start with a discussion of the overall architecture of the UI elements. Continue reading ‘Lesson 2 – User Interface’
So you want to develop for your mobile phone? Say hello to Java Micro Edition. Java ME combines a small JVM and a set of Java APIs for developing applications for mobile devices.
This article is the first in a series where we are going to approach all the basics for developing an application for mobile phone using Java ME. The final goal of these tutorials is to develop a small Arkanoid clone (http://en.wikipedia.org/wiki/Arkanoid) and in the process learn all the base libraries, classes and methods available in Java ME:
- Midlet
- User Interface
- Canvas
- Storage
- Sound
- Networking
This time, after a quick introduction to the development tools, I will provide a step-by-step guide to creating your first Java ME application, also known as MIDlets.
Continue reading ‘Lesson 1 – Getting Started’