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 1: Getting started

How to build fun plug-ins for Eclipse using the SWT, OpenGL, and the LWJGL

Trebor Fenstermaker, Software Consultant, Sunnyside Avenue Software, LLC
Although he's programmed in Java since 1999, Trebor Fenstermaker was, for much of that time, highly suspicious of Java IDEs and was a die-hard command-line user, even doing all his code editing in vi -- until a colleague showed him that he really could be more efficient with Eclipse. He now evangelizes his fellow UNIX command-line refugees on its wonders and enjoys exploring its more powerful features -- including its endless possibilities for expansion through custom plug-ins.

Summary:  Although most users think of Eclipse as an Integrated Development Environment (IDE) for building Java™ applications, it is really something much more basic. Eclipse is a framework for building plug-ins, allowing any developer 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 will also learn the Eclipse plug-in architecture and learn how to define your own plug-in, develop an interface using SWT, and create code that interacts with other Eclipse resources.

View more content in this series

Date:  07 Mar 2006
Level:  Intermediate PDF:  A4 and Letter (1257 KB | 35 pages)Get Adobe® Reader®

Activity:  13232 views
Comments:  

Before you start

This tutorial, Part 1 of a four-part "Create an Eclipse game plug-in" series, will concentrate on building the framework for a simple shootout video game that can be launched and played inside Eclipse by creating a plug-in, installing it, integrating it with the Task List, and adding some basic visual components with the SWT and OpenGL. You'll develop a simple shoot-'em-up game that will read the computer bugs you've entered on the Tasks 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 (SWT), the Open Graphics Library (OpenGL), and the Lightweight Java Games Library (LWJGL).

About this series

In this 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 that can be launched and played inside Eclipse by creating a plug-in. Part 2 takes the basic framework created in Part 1 and starts 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.


About this tutorial

Here in Part 1, you will be introduced to the Eclipse plug-in architecture and learn how to define your own plug-in using the Eclipse tool itself. You will also begin to leverage the SWT to develop a simple user interface for your plug-in. You'll also create code to demonstrate how to interact with other Eclipse resources -- in this case, the Task List. By the end, you will have a good framework for which to build a simple breakout video game that will work directly in Eclipse; you will add that functionality in the remaining tutorials.


Prerequisites

You will need Eclipse V3.2, and a Java compiler and interpreter, V1.4 or higher.

1 of 9 | 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=104971
TutorialTitle=Create an Eclipse game plug-in, Part 1: Getting started
publish-date=03072006
author1-email=tcf@sunnysideave.com
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.