Skip to content

PanJohnny/PJGameLibrary

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PanJohnny's Game Library

A game library for making simple games in java

Example with java desktop (awt + swing)

public class Example {
    public static void main(String[] args) {
        PJGL.init(new JDInitializer("Apple!"));
        PJGL pjgl = PJGL.getInstance();
        pjgl.start();

        SpriteRegistry.registerSprite("apple", "/apple.png");

        GameObject apple = new GameObject() {
            public final Position position = addComponent(new Position(this, 10, 10));
            public final Size size = addComponent(new Size(this, 100, 100));
            public final SpriteRenderer renderer = addComponent(new SpriteRenderer(this, "apple"));
        };

        pjgl.getManager().queueAddition(apple);
    }
}

Adaptability

This project is free to be adapted by anyone.

Currently you can use these two:

  • Java Desktop - awt, swing
  • LWJGL

You can read more information at the wiki, or ask me directly.