Skip to main content


developerWorks  >  Open source  >

Create an Eclipse game plug-in, Part 3: Gaming the system

We put the player in the loop

developerWorks

Level: Intermediate

Tyler Anderson (tyleranderson5@yahoo.com), Freelance writer, Stexar Corp.

18 Apr 2006

Register now or sign in using your IBM ID and password.

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 3 games the system up with collision detection between the bugs and BBs, destroying the bugs.

In this tutorial

This tutorial continues where we left off in Part 2 by making the game come to life with the shapes and functionality we've already created. Here, we'll do the following:

  • Add movement for the BB gun

  • Add collision detection for BBs and the bugs, causing hit bugs to blow up and disappear, displaying the text "POW"

Prerequisites

This tutorial assumes you have the basic knowledge of Java syntax and coding, and about Eclipse plug-in programming, as shown in Part 1 of this series. 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 or IBM.

This tutorial assumes basic knowledge of Java language syntax and coding and about Eclipse plug-in programming, as shown in Part 1. Graphics programming knowledge is a plus, but is not required. Neither is knowledge of OpenGL.



Formats

html, pdf


Share this....

digg Digg this story del.icio.us del.icio.us Slashdot Slashdot it!


Back to top


Document options

Document options requiring JavaScript are not displayed


My developerWorks needs you!

Connect to your technical community


More in this series:
Create an Eclipse game plug-in