Skip to content

shangmuzhuqin/lionengine

 
 

Repository files navigation

Build
Coverage
Lines of Code
Maven Central
License: GPL v3
Presentation
General features
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, font...). 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, AdPlug and AdlMidi). Windowed, full-screen and applet formats are fully supported, with a complete frame rate control.

General Features

  • lionengine-core

  • Simple initialization and screen configuration (windowed, fullscreen)
  • Advanced game loop (machine speed independent, frame skipping, hybrid)
  • Filtering capability (Bilinear, Blur, HQ2X, HQ3X, Scanline, CRT)
  • Sequence control (intro, menu, game part, credits...)
  • Easy resource management (relative to resource directory, JAR, temp)
  • Advanced image usage (sprite, animation, tile, font, parallax)
  • File I/O (binary & XML reader & writer)
  • Server & Client UDP system
  • Utility classes (Random, Conversions, Maths, File...)
  • Verbosity control
  • lionengine-core-awt

  • Engine implementation using AWT from JDK 8
  • 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 package
    • Setup (external XML configuration)
    • Factory (reusable cached object instances)
    • Handler (updating, rendering, and retrieving)
  • Extensible Feature 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)
    • Networkable (synced object over network)
    • and more...
  • lionengine-audio-wav

  • Support for Wav sound
  • lionengine-audio-sc68

  • Support for Sc68 Atari music (Sc68 wrapper)
  • lionengine-audio-adplug

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

  • Support for Midi music (AdlMidi wrapper)

Download

Go to website Last version

Installation

Steps to include the LionEngine in your project:

  1. Install at least the Java JDK 8
  2. Choose your favourite IDE (Eclipse, Netbeans...)
  3. Download the latest LionEngine
  4. 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-game (base for game development)
      • lionengine-audio-wav (support for Wav sound)
      • lionengine-audio-sc68 (support for Sc68 Atari music)
      • lionengine-audio-adplug (support for LDS music)
      • lionengine-audio-adlmidi (support for Midi music)
  5. 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

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.NATIVE.get2x()), Scene.class);
    }
}

Minimal sequence

public class Scene extends Sequence
{
    private 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
    }
}

Tutorials

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%