Presentation Download Installation Getting Started Tutorials |
---|
Presentation
The LionEngine is a game engine especially developed during the project Lionheart Remake for an easy Java use. The engine is as a library, in Jar format (including its javadoc), which can be included in any project; for utility class uses, or to directly implement and inherit a game skeleton (including management of frame rate, extrapolation, input output...).
Using Java 8 internal libraries, it is specifically designed for 2D games (no support for 3D at the moment), and proposes a set of functions for 2D resources management (images, sprites, animations, tiles...).
It supports Android 8.0 (API 26). The only change to perform is the gameplay part, as the 'mouse' and 'keyboard' concepts are different on Android. Everything else is fully compatible and does not require any changes.
Download
Installation
Steps to include the LionEngine in your project:
- Download at least Android Studio 3
- Include all LionEngine libraries you need for your project, following the tree dependency:
- lionengine-core (minimum requirement)
- lionengine-core-android (uses Android 8.0 as graphic renderer, target for smartphones)
- You are now ready to use the LionEngine in your project
Getting Started
Once you installed the LionEngine in your project, you may would like to know how to prepare a quick sample as a first try.
Main class
- Using lionengine-core-android
public class ActivitySample extends ActivityGame
{
@Override
protected void start(Bundle bundle)
{
EngineAndroid.start("Sample Project", Version.create(0, 1, 0), this);
Loader.start(Config.fullscreen(Scene.NATIVE), Scene.class);
}
}
Minimal sequence
public class Scene extends Sequence
{
public static final Resolution NATIVE = new Resolution(320, 240, 60);
public Scene(Context context)
{
super(context, NATIVE);
}
@Override
public void load()
{
// Load resources
}
@Override
public void update(double extrp)
{
// Update game
}
@Override
public void render(Graphic g)
{
// Render game
}
}