While most users regard Eclipse as an integrated development environment for building java™ applications, it is actually more fundamental. Eclipse is the framework for building plug-ins that allow you to extend its functionality to solve almost any problem-just by leveraging a set of APIs and out-of-the-box libraries available. In this four-part "create Eclipse Game Plug-in" tutorial series, you will address one of the most pressing problems that most programmers encounter every day: How to take time out to play a fast video game without switching applications, and make it less obvious. The tutorial will develop a simple program that reads bugs into the view and explodes them. The game will run as a plug-in in Eclipse, which demonstrates how to write the Eclipse API, how to use the Standard Widget Toolkit, the Open Graphics Library, and lightweight Java Games L Ibrary. The 3rd part will increase collision detection between bugs and BB bombs and destroy bugs.
Before you start
This series is geared toward developers who are interested in building Eclipse game plug-ins using OpenGL. This tutorial continues to be developed on the basis of the 2nd part, using OpenGL to add mobile and collision detection to BB bombs.
About this series
In this four-part series, we describe the basic technologies, tools, and libraries used to create a fully feature-complete Eclipse plug-in that will provide graphics using the Standard Widget Toolkit (SWT) and the OpenGL library. Part 1th describes how to build a framework for simple video games that can be started and played within Eclipse by creating plug-ins. Part 2nd begins by adding the actual visual elements with Open GL, based on the basic framework created in part 1th. Part 3rd adds the actual game element, allowing users to interact with the graphic created in part 2nd. Part 4 puts together all the elements created in the first three sections to make sure they work together.
About this tutorial
This tutorial starts at the end of part 2nd and uses the shapes and functions we have created to make the game practical. In this article, the following work will be done:
Add mobile for BB gun.
Add a collision effect for BB bombs and bugs to smash and disappear the hit bugs, displaying the text "POW".
Prerequisite conditions
This tutorial assumes that the reader has basic knowledge of Java syntax and coding and Eclipse plug-in programming, as shown in part 1th of this series. The knowledge of graphic programming can be useful, but not necessary. No knowledge of OpenGL is required.
System Requirements
The following software is required:
Eclipse Eclipse is the framework for creating plug-ins for part 1th. Now continue to build the game plug-in with Eclipse. Please download Eclipse V3.2 M3 or above from eclipse.org. Eclipse SWT SWT is an Eclipse component package that is used to make windows that are donated by IBM to Eclipse. Please download the SWT 3.2 M3 or above version. Eclipse OpenGL needs to use OpenGL to create shapes, and so on. Please download the experimental ORG.ECLIPSE.OPENGL binding, version 0.5 for SWT 3.2. Eclipse sample Plug-ins with OpenGL download the sample plug-in with one view using OpenGL. The source code in this plugin will be used as the framework for building your own custom OpenGL settings. Java Technology Eclipse and all of its plug-ins require Java technology.
Overview and Settings
In the 2nd part, we focused on using OpenGL to build the game object. Now you will write the code for the game feature.
Current progress
Currently, we have developed several shapes with OpenGL, including a BB gun, a spherical worm, and a cylindrical bullet. We also created the text ("POW") that was displayed when the bug was hit. Next, we'll look at the features to write.