A Game Engine built on libGDX and inspired by Flashpunk
This project is incredibly young and should not be used in any games yet.
A Java Game Engine built on libGDX and inspired by Flashpunk. Want access to all the goodess libGDX supplies? Want a really simple world / entity management system? Still want to make pixel-art based games? GDXPunk.
GDXPunk does not currently support Android (though, you may be able to get it to work) and has no plans to.
Current Features:
Entity
Group
OgmoLevel
Game
World
Control
Notes:
Projects MUST have the Gdx-Controllers extension added to them, see: http://www.badlogicgames.com/wordpress/?p=2743 for set up
In the desktop project the following parts of cfg should be defined:
cfg.width = 960;
cfg.height = 640;
cfg.foregroundFPS = 60;
cfg.backgroundFPS = -1;
They do not have to use these values, but without an FPS limit the engine will go crazy fast
In many ways this is reducing the power of libGDX by making it structured, however you can still easily hook in to every feature of libGDX and still should for pretty much every other aspect of development.
Planned Features:
Entities
TileLayers
Text
class to support adding fonts to world (Extends BitmapFont
)Entity
s have a collided() function?)Entity
s etc. also asset manager integration.Want to display an image on screen?
world = new World();
Entity e = new Entity(128, 128, "TestEntity", "data/test.png");
world.add(e);
That's it.
Want to load an ogmo level?
//Create the level with origin 0, 0 (Top Left)
OgmoLevel ogmo = new OgmoLevel("data/level1.oel", 0, 0);
//Load ground with Z-Layer 1
tileLayer = ogmo.loadTileLayer("ground", 1);
add(tileLayer);
//Load all entities with Z-Layer 2
//GDXPunk uses Entity Lookup dictionary classes to decode the information
//If you wanted to, you can write your own clever lookup using reflection!
add(ogmo.loadEntityLayer("entities", 2, new TestEntityLookup()));
//In create()
Control.define("jump", new KeyboardButton(Keys.A));
Control.define("jump", new ControllerButton(0, 1);
//In update()
if (Control.checkButton("jump")) jump();
Want to make a new game?
public class MyGame extends Game implements ApplicationListener {
@Override
public void create()
{
super.create(480, 320); //Screen res (virtual)
changeWorld(new TestWorld());
}
}