Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/panjohnny/pjgamelibrary
Small flexible game library for java
https://github.com/panjohnny/pjgamelibrary
2d-game-engine game-development game-lib-java game-library gamedev java
Last synced: 4 days ago
JSON representation
Small flexible game library for java
- Host: GitHub
- URL: https://github.com/panjohnny/pjgamelibrary
- Owner: PanJohnny
- Created: 2022-11-07T21:52:36.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-08-26T13:02:47.000Z (4 months ago)
- Last Synced: 2024-08-26T15:22:47.742Z (4 months ago)
- Topics: 2d-game-engine, game-development, game-lib-java, game-library, gamedev, java
- Language: Java
- Homepage: https://jitpack.io/com/github/PanJohnny/PJGameLibrary/latest/javadoc/
- Size: 124 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PanJohnny's Game Library
[![](https://jitpack.io/v/PanJohnny/PJGameLibrary.svg)](https://jitpack.io/#PanJohnny/PJGameLibrary)
[![](https://img.shields.io/badge/Javadocs-Online-informational)](https://jitpack.io/com/github/PanJohnny/PJGameLibrary/latest/javadoc/)
[![](https://jitci.com/gh/PanJohnny/PJGameLibrary/svg)](https://jitci.com/gh/PanJohnny/PJGameLibrary)A game library for making simple games in java
## Example with java desktop (awt + swing)
```java
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
- LWJGLYou can read more information at the wiki, or ask me directly.