Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

Create an Eclipse game plug-in, Part 4: Packaging, testing, and putting final touches

Peter Nehrer (pnehrer@ecliptical.ca), Freelance Writer, Freelance Developer
Peter Nehrer is a software consultant living in Toronto, Ontario. He specializes in Eclipse-based enterprise solutions and J2EE applications. His professional interests include development tools, model-driven software development, and information sharing. He is the author and contributor to several Eclipse-related open source projects. He is an IBM Certified Solutions Developer for XML and related technologies. He holds a master's degree in computer science from the University of Massachusetts at Amherst.

Summary:  Although most users think of Eclipse as an integrated development environment for building Java™ technology applications, it is really something much more basic. Eclipse is a framework for building plug-ins, allowing you to extend its functionality to solve nearly any problem -- just by leveraging a set of APIs and readily available libraries. In this four-part "Create an Eclipse game plug-in" tutorial series, you will solve a pressing problem most programmers encounter daily: how to break away to play a quick video game without switching applications and making it obvious. You'll develop a simple game that will read the bugs entered on the a view and blast them to bits. The game will run inside Eclipse as a plug-in, that will demonstrate how to write to the Eclipse API, while using the Standard Widget Toolkit, the Open Graphics Library, and the Lightweight Java Games Library. Part 4 demonstrates how to build and test the plug-in using an automated process, and finally, package it for distribution.

View more content in this series

Date:  02 May 2006
Level:  Intermediate PDF:  A4 and Letter (507 KB | 27 pages)Get Adobe® Reader®

Activity:  5843 views
Comments:  

Before you start

This series is for developers interested in building game plug-ins for Eclipse using OpenGL and the Lightweight Java Games Library (LWJGL). Part 4 concludes the series by showing how to build and unit-test the plug-in using an automated process, and how to package it for distribution.

About this series

In this four-part series, you will be introduced to the basic techniques, tools, and libraries used to create a full-featured Eclipse plug-in that uses the Standard Widget Toolkit (SWT) and OpenGL libraries for providing graphics. Part 1 looks at building the framework for a simple video game to be launched and played inside Eclipse by creating a plug-in. Part 2 takes the basic framework created in Part 1 and started adding the actual visual elements using OpenGL. Part 3 adds the actual game elements, enabling the user to interact with the graphics created in Part 2. Part 4 takes everything created in the previous three parts and makes sure it all works properly, including packaging and testing the plug-in.


About this tutorial

In this tutorial, we take everything developed thus far, test it, and prepare it for distribution. Specifically, we will:

  • Create JUnit test cases for unit-testing the plug-in.
  • Create an Eclipse feature project to manage packaging of the plug-in.
  • Develop an automated build and test process using headless build support provided by the Plug-in Development Environment (PDE).

Prerequisites

This tutorial assumes you have basic knowledge of Java syntax and coding; Eclipse plug-in programming, as shown in Part 1 of this series; unit-testing with JUnit; and Apache Ant scripts. Graphics programming knowledge is a plus, but not required. Knowledge of OpenGL is not required.


System requirements

The following tools are needed to follow along:

Eclipse
Eclipse is the framework for creating the plug-in created in Part 1. Now we'll continue leveraging Eclipse in building the gaming plug-in. Download Eclipse SDK 3.2 M3 or later.
Eclipse SWT
SWT is the Eclipse widgets package for window making, donated to Eclipse by IBM. Download SWT 3.2 M3 or later.
Eclipse OpenGL
You need the OpenGL libraries for creating shapes and more. Download the experimental org.eclipse.opengl binding, version 0.5 for SWT 3.2 for your system.
Eclipse Example Plug-in using OpenGL
Download the Example plug-in with a view that uses OpenGL. You'll use the source code in this plug-in as a framework for building your own custom OpenGL scene.
Java technology
Eclipse and all its plug-ins need Java technology. Download Java from Sun Microsystems or IBM.
Eclipse Test Framework
This package provides support for automated testing of plug-ins. It is available from Eclipse.org as an add-on to the Eclipse SDK.
Info-ZIP
This utility is used by the automated build script on platforms that do not have a native zip/unzip command. Download it from Info-ZIP.

1 of 10 | Next

Comments



Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Open source
ArticleID=109633
TutorialTitle=Create an Eclipse game plug-in, Part 4: Packaging, testing, and putting final touches
publish-date=05022006
author1-email=pnehrer@ecliptical.ca
author1-email-cc=

Tags

Help
Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere).

My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Use the search field to find all types of content in My developerWorks with that tag. Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere). My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Try IBM PureSystems. No charge.