The engine is still in its early stages, but capable of making basic gameloops already. See daedalus-game module for an example. I play around in there during development.
- Java 16+ (we use new features)
- opengl 4.5+ compatible device
- Create a gameloop by implementing DaedalusLoop:
public class SandboxLoop implements DaedalusLoop {
private OrthographicCameraController cameraController;
private Texture checkerboard;
@Override
public void onInit() {
cameraController = new OrthographicCameraController((float)Constants.WINDOW_WIDTH / (float)Constants.WINDOW_HEIGHT, true);
checkerboard = Texture.create("textures/Checkerboard.png");
}
@Override
public void onUpdate(float dt) {
cameraController.onUpdate(dt);
Renderer.begin(cameraController.getCamera());
Renderer.drawQuad(0.0f, 0.0f, Mat4f.scale(new Vec3f(0.5f)), 45, checkerboard);
Renderer.end();
}
@Override
public void onEvent() {
}
}
- Initialize the engine in main by extending DaedalusApplication and calling run, passing it your loop class:
public class SandboxApplication extends DaedalusApplication {
public static void main(String[] args) {
SandboxApplication sandboxApplication = new SandboxApplication();
sandboxApplication.run(new SandboxLoop());
}
}