Skip to content
/ kopfkino Public

java2d game engine that benefits from 5+ years of working on its predecessor, Salty Engine

License

Notifications You must be signed in to change notification settings

sanj0/kopfkino

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kopfkino

kopfkino

kopfkino (noun) processes, events that take place only or mainly in the imagination, in one's own power of imagination. (translated from https://www.duden.de/rechtschreibung/Kopfkino)

Kopfkino is a java2d game library that benefits from 5+ years of development on its predecessor, Salty Engine.

Get started

For information on how to use the engnie, consider taking a look at the github wiki

1. How to get Kopfkino Engine

Kopfkino engine is built using maven. After cloning the repository, simply build the project using mvn clean install. Now include kopfkino in your own maven project by appending the following dependency declaration to your pom.xml:

<dependencies>
  <!--...-->
  <dependency>
    <groupId>io.github.sanj0</groupId>
    <artifactId>kopfkino</artifactId>
    <version>0.0.1-SNAPSHOT</version>
  </dependency>
  <!--...-->
</dependencies>

2. Start a simple kopfkino game

To get the bare minimum kopfkino running, consider the following code.

import de.sanj0.kopfkino.Game;
import de.sanj0.kopfkino.scene.EmptyScene;

import java.awt.*;

public class Main {

    public static void main(String[] args) {
        // initialise the game with a resolutino of 1920x1080 and a nice name
        // the latter is used for example in the window title
        Game.init(1920, 1080, "hello, kopfkino!");
        // Game is a singleton - Game.getInstance() retrieves the instance
        // ... to for example set the background (frame clear) color
        Game.getInstance().setBackgroundColor(Color.WHITE);
        // start the game after a splash screen of 3 seconds
        // into an empty scene,
        // with 5 milliseconds between fixed ticks
        // and 60 frames per second
        Game.start(3000, new EmptyScene(), 5, 60);
    }
}

About

java2d game engine that benefits from 5+ years of working on its predecessor, Salty Engine

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published