Skip to content

Cobrey/lionengine

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LionEngine

Build Status Coverage Lines of code Maven Central License

Summary

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 6 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...). Inputs and outputs are also available, with an easy keys retrieval, mouse movement... Management of music file are also available (Wav, Midi, and more using plug-ins, such as Sc68 and Lds). Windowed, full-screen and applet formats are fully supported, with a complete frame rate control.

It supports Android 4.0 (API 14). 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.

It includes an abstract editor that should allow to write easily a dedicated levels editor for your game. It can also be used as default editor without any add-on, just run and import a project from your game compiled sources !

In its current version, the engine greatly simplifies the development of Platform, Strategy and Shoot'em Up games, and also Network layer.

General Features

  • lionengine-core

  • Simple initialization, with version control, screen configuration and resource directory
  • Extrapolation control (machine speed independent)
  • Advanced filtering capability (Bilinear, HQ2X, HQ3X)
  • Sequence control (intro, menu, game part, credits...)
  • Easy resource management (relative to resource directory)
  • Advanced image usage (sprite, animation, tile, font, parallax)
  • File I/O (binary & XML reader & writer)
  • Utility classes (Random, Conversions, Maths, File...)
  • Verbosity control
  • lionengine-core-awt

  • Engine implementation using AWT from JDK 6
  • lionengine-core-swt

  • Engine implementation by using SWT 3.5.1
  • lionengine-core-android

  • Engine implementation using Android 4.0 (API 14)
  • lionengine-game

  • Camera management (view and movement)
  • Cursor (synced or not to system pointer)
  • Background package (for an easy background composition)
  • Tile based map package (with minimap support, native save & load function)
    • Ray cast collision system
    • Compatibility with raster bar effect
    • A Star pathfinding implementation
    • Tile extractor (generate tilesheet from a level rip image)
    • Level rip converter (generate a level data file from a tile sheet and a level rip image)
  • Object base (support external XML configuration, trait system)
  • General object factory system (create instance of object)
  • Objects handling system (updating them, rendering, and retrieving)
  • Extensible Trait system to compose object characteristics without code complexity
    • Transformable (size and translation)
    • Body (gravity handling)
    • Launchable (launcher and projectile system)
    • Rasterable (object raster bar effect)
    • Producible (ability to produce other objects)
    • Collidable (collision handling)
    • ...
  • lionengine-network

  • Server & Client system
  • Customizable network message
  • Integrated chat system
  • lionengine-audio-wav

  • Support for Wav sound
  • lionengine-audio-midi

  • Support for Midi music
  • lionengine-audio-sc68

  • Support for Sc68 Atari music
  • lionengine-audio-adplug

  • Support for Loudness Sound music (AdPlug wrapper)
  • lionengine-editor

  • Complete standalone editor which can be used in any project for general level edition
  • Can be extended to perform more specific things

Download

Installation

Steps to include the LionEngine in your project:

  1. Install at least the Java JDK 6
  2. Install the Android SDK 4.0 (only if you use lionengine-core-android)
  3. Choose your favourite IDE (Eclipse, Netbeans...)
  4. Download the latest LionEngine
  5. Include all LionEngine libraries you need for your project, following the tree dependency:
  • lionengine-core (minimum requirement)
    • lionengine-core-awt (uses AWT as graphic renderer, target for computer)
    • lionengine-core-swt (uses SWT as graphic renderer, target for computer)
    • lionengine-core-android (uses Android 4.0, target for phones)
    • lionengine-game (base for game development)
    • lionengine-network (support for network)
    • lionengine-audio-wav (support for Wav sound)
    • lionengine-audio-midi (support for Midi music)
    • lionengine-audio-sc68 (support for Sc68 Atari music)
    • lionengine-audio-adplug (support for LDS music)
  1. Join (if you want) the javadoc for each library
  2. 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-awt or lionengine-core-swt
public class AppSamplePc
{
    public static void main(String[] args)
    {
        EngineAwt.start("Sample Project", Version.create(0, 1, 0), AppSamplePc.class);
        Loader.start(Config.windowed(Scene.RESOLUTION.get2x()), Scene.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.RESOLUTION), Scene.class);
    }
}

Minimal sequence

public class Scene extends Sequence
{
    public static final Resolution RESOLUTION = new Resolution(320, 240, 60);

    public Scene(Context context)
    {
        super(context, RESOLUTION);
    }

    @Override
    public void load()
    {
        // Load resources
    }

    @Override
    public void update(double extrp)
    {
        // Update game
    }

    @Override
    public void render(Graphic g)
    {
        // Render game
    }
}

Tutorials

Packages

No packages published

Languages

  • Java 100.0%