Before you start
This series is for developers interested in building gaming plug-ins for Eclipse using OpenGL. This tutorial goes beyond Part 2 by adding movement for the BB gun, as well as collision detection in OpenGL.
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 looked at building the framework for a simple video game to be launched and played inside Eclipse by creating a plug-in. Part 2 took 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.
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"
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.
The following tools are needed to follow along:
- 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.
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.