Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mineking9534/gameenginelite
Lightweight GameEngine for teaching java basics
https://github.com/mineking9534/gameenginelite
Last synced: 1 day ago
JSON representation
Lightweight GameEngine for teaching java basics
- Host: GitHub
- URL: https://github.com/mineking9534/gameenginelite
- Owner: MineKing9534
- License: mit
- Created: 2024-03-31T15:13:05.000Z (8 months ago)
- Default Branch: master
- Last Pushed: 2024-03-31T15:32:39.000Z (8 months ago)
- Last Synced: 2024-03-31T16:26:51.517Z (8 months ago)
- Language: Java
- Homepage:
- Size: 470 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE
Awesome Lists containing this project
README
# GameEngineLite
Very, very lightweight GameEngine for teaching java basics.## Install
```gradle
repositories {
maven { url 'https://maven.mineking.dev/snapshots' }
}dependencies {
implementation 'de.mineking:GameEngineLite:VERSION'
}
```## Basic Setup
```java
public class Test {
public static void main(String[] args) {
new Test();
}private final World world;
private final Player player;public Test() {
world = new World(10, 10);
player = world.createPlayer("test");var window = world.createWindow(2);
window.listen("w", player::step);
window.listen("s", player::stepBack);
window.listen("d", player::turnRight);
window.listen("a", player::turnLeft);
}
}
```## Advanced Setup
```java
public class Test {
public static void main(String[] args) {
new Test();
}private final AdvancedWorld world;
private final AdvancedPlayer player;public Test() {
world = new AdvancedWorld(10, 10);
player = world.createPlayer("test");var window = world.createWindow(2);
world.setDelay(0);window.listen("w ArrowUp", player::step);
window.listen("s ArrowDown", player::stepBack);
window.listen("d ArrowRight", player::turnRight);
window.listen("a ArrowLeft", player::turnLeft);
}
}
```