Lab-5502: Your First Mobile Game

Expected Duration: 100 minutes

Last Updated: 10 March, 2009

This Hands-on Lab takes you through the process of developing a mobile game with the assistance of the Game Builder included in the NetBeans Java ME module. Participants will learn how to quickly create compelling SVG UIs using the new SVG Form components. The lab will also cover the basics of creating a MIDP application and connecting it to a web service.

In this lab we create a simple game where the heroes Duke and James collect bricks. At first Duke will be controlled by the player and James will be managed by the computer. In the last exercise will use web services to make it a true multiplayer game.

All menus in this application use an SVG UI and you will create them yourself during the lab.

Copyright
Copyright  2009 Sun Microsystems, Inc. All rights reserved. Sun, Sun Microsystems,
the Sun logo, Solaris, Java, the Java Coffee Cup logo, JavaOne, the JavaOne logo,
and all Solaris-based and Java-based marks and logos are trademarks or registered
trademarks of Sun Microsystems, Inc. in the United States and other countries.
                        

Prerequisites

 

This hands-on lab assumes you have some basic knowledge of, or programming experience in, the following technologies:

  • MIDP/CLDC development
  • SVG (Scalable Vector Graphics)
  • Web Services API (JSR 172)
  • MIDP 2.0 Game API (JSR 178)

You will need to refer to the accompanying presentation 5502_mobilegame.pdf during the lab.


System Requirements

 
  • Supported OSes: Linux, Windows Vista/XP
  • Memory requirement: 512MB
  • Disk space requirement: 750MB

Software Needed For This Lab

 

Please install the following set of software. If you have any questions on installation, please feel free to send questions to the lab forum mentioned below.


Notations Used in This Documentation

 
  • <lab_root> - directory into which lab zip file is unzipped
    • This document uses <lab_root> to denote the directory under which you have unzipped the lab zip file of this hands-on lab. The name of the lab zip file of this hands-on lab is 5502_mobilegame.zip.
    • Once you unzipped the lab zip file under <lab_root>, it will create a subdirectory called mobilegame. For example, under Linux, if you have unzipped the lab zip file in the /home/dant directory, it will create /home/dant /mobilegame directory.
  • The lab machines are running Java Desktop System over Solaris 10
  • In order to open a terminal window in Java Desktop System, right click any point in the background of the desktop, and select Open Terminal in the pop-up menu.
  • The following source code editors are provided on the lab machines
    • vi (type vi in a terminal window)
    • emacs (type emacs in a terminal window)
    • jedit (type jedit in a terminal window)
    • NetBeans IDE (either click NetBeans IDE icon or type netbeans in a terminal window)

Lab Exercises

 

Additional Resources

 

Where To Go For Help

 
 

Back to top
To exercises

Update Your Java Runtime Environment