# Lab-5502: Your First Mobile Game

Expected Duration: 100 minutes
Contacts: Andrey Korostelev and Ivan Sidorkin

Introduction | Exercise 0 | Exercise 1 | Exercise 2 | Exercise 3 | Exercise 4 | Exercise 5 | Summary
Prerequisites System Software Notations Exercises Resources Questions 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. NetBeans IDE 6.7 Beta or more recent (Java Bundle) Java SE 5.0 Update 14 and higher (including JDK 6.0) ### 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 Exercise 0: Install and configure the lab environment Exercise 1: Create MIDP Application Exercise 2: Create SVG UI Exercise 3: Create the game Exercise 4: Fill the game with logic Exercise 5: Play with friends ### Additional Resources Lab-5502 Mobilegame presentation SVG Rich Components - References Netbeans Mobile Application Tutorials Rich SVG UI Application Using SVG Rich UI Components ### Where To Go For Help You can send technical questions via email to the authors of this Hands-on lab (and experts on the subject) or you can send your questions to the public users alias: users@mobility.netbeans.org Mobility users mailing list archive Forum: Java ME Technologies - CLDC and MIDP For general questions and feedback on JavaOne Hands-On Labs, please use the JavaOne2008_HOL_Forum Back to top To exercises | ### Related Resources Java SE for Business Compatibility Performance Security Mobility Timezone Updates ##### Related Downloads XML and Web Services Java Media Framework ##### Popular Topics JDK 6 Adoption Guide Java Platform Migration Guide Garbage Collection Tuning Troubleshooting Java SE ##### Sun Resources BigAdmin (sysadmin resources) Sun Web Learning Center Java Training ##### Related Sites java.com java.net NetBeans Java EE SDK OpenJDK Project Open-Source Java Project ### Getting Started? New to Java Center Java Tutorial: Getting Started Tutorials Java SE Training