Git Product home page Git Product logo

gdxpunk's Introduction

GDXPunk

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
    • Static Image or Animated
    • Supporting Polygon/Rectangle collisions
  • Group
    • Collection of Entities
    • Logic can be applied to the entire group
    • Useful for HUD etc.
  • OgmoLevel
    • Ogmo Editor (v2) level loading and rendering
    • Supports (Rectangle) collisions with tilemap
  • Game
    • Maintains aspect ratio for you
    • Clear pixel rendering (Nearest Neighbour)
    • y-Down co-ordinate system by default
    • Handles resolution etc.
  • World
    • Comprehensive Z-Ordered rendering system, with layers and ordering within them
      • This is a little performance intensive due to linked-list implementation
      • Layers can have scrolling factors applied for parallax or HUD implementation
  • Control
    • Static input manager that can define Keyboard and Joystick controls using names
    • Allows multiple control schemes easily and redefining of controls

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
    • Use Spine animations as graphic
    • Use Rectangle as graphic
    • Use Circle as graphic
    • Use Line as graphic
    • Creating animations from a sequence of single images
    • Loading textures from atlases (for Entities or TileLayers)
    • Optimised caching of types for faster collisions
    • Option for unbounded collisions
  • TileLayers
    • Optional polygonal tilemap collisions for slopes etc.
  • Implement chunky pixel rendering using render to texture
  • Add Text class to support adding fonts to world (Extends BitmapFont)
  • Look into optimised collision handling (perhaps Entitys have a collided() function?)
  • Texture Atlas support for Entitys etc. also asset manager integration.

Entity Example

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.

Ogmo Editor Integration

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()));

Input Management

//In create()
Control.define("jump", new KeyboardButton(Keys.A));
Control.define("jump", new ControllerButton(0, 1);

//In update()
if (Control.checkButton("jump")) jump();

Game Example

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());
  	}
  
}

gdxpunk's People

Contributors

bfollington avatar volticgames avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.