2D Platformer Game Engine
The Quad Engine was developed to make 2D game programming easy for everyone. The engine is made to be implemented into your project before you start developing.
Using Java 8 internal libraries, it is specifically designed for 2D games (no support for 3D at the moment), and proposes a set of functions for 2D resources management (images, sprites, animations, tiles...). Inputs and outputs are also available, with an easy keys retrieval, mouse movement... Management of music file are also available (Wav, Midi). Windowed and full-screen are fully supported, with a complete frame rate control.
In the Quad Engine's current version, it greatly simplifies the development of Platformer, and Top Down games.
- Simple initialization, with title control, and screen configuration
- Extrapolation control (machine speed independent)
- Sequence control (intro, menu, game, credits...)
- Easy resource management (relative to resource directory)
- Advanced image usage (sprite, animation, tile, font, parallax)
- 2D dynamic lighting
- 2D shadow rendering using ShadowTypes (Full, Half, Total, None)
- Renders images (sprites, animations, objects, shapes)
- GameObject class handles objects in the game (player, enemies, items)
- Easy object managing
- Object physics, handles collisions between TileMap and other objects
- Resource managment (_sprites, images)
- Font for rendering text
- Audio handling (support for Wav)
- Light handling (size, color)
- 2D parallax background support
- Tile based implementation from single image
- Smooth tile movement using Tween Engine
Steps to include the Quad Engine in your project:
- Install at least the Java JDK 8
- Choose your favourite IDE (Eclipse, Netbeans...)
- Download the latest [Quad Engine]
- Include all Quad Engine classes you need for your project:
- Quad Engine (minimum requirement)
- GameContainer (main game loop)
- Abstract Game (base for game development)
- Renderer (support for rendering)
- GameObject (base for creating objects)
- Background (parralax background support)
- TileMap (support for creating dynamic map)
- Quad Engine (minimum requirement)
- You are now ready to use the Quad Engine in your project
Once you installed the Quad Engine in your project, you can quickly start creating a project using the following code:
public class GameManager {
public static void main(String[] args) {
GameContainer gc = new GameContainer(new AbstractGame());
gc.setWidth(Settings.WIDTH);
gc.setHeight(Settings.HEIGHT);
gc.setScale(Settings.SCALE);
gc.setTitle("Quad Engine 1.01");
gc.setClearScreen(true);
gc.start();
}
}
public class StateTest extends State{
@Override
public void init(GameContainer gc) {
// Initiate state
}
@Override
public void update(GameContainer gc, float dt) {
// Update state
}
@Override
public void render(GameContainer gc, Renderer r) {
// Render state
}
@Override
public void dipose() {
// Dispose state
}
}
private void loadState(int state) {
// implement this into your code. TestState() is your state and VALUE is its index.
if(state == VALUE) states[currentState] = new TestState();
}