Giter Club home page Giter Club logo

luna's Introduction

Luna Logo

Chat on Discord GitHub stars GitHub Watchers GitHub forks Twitter Follow

Overview

Luna Game Toolkit™ is an open-source 2D indie game library that allows you to do game development in Embarcadero Delphi for desktop PC's running Microsoft Windows® and uses Direct3D® for hardware accelerated rendering.

It's robust, designed for easy use and suitable for making all types of 2D games and other graphic simulations, You access the features from a simple and intuitive API, to allow you to rapidly and efficiently develop your projects. There is support for bitmaps, audio samples, streaming music, video playback, loading resources directly from a compressed and encrypted archive, a thin object oriented actor/scene system, entity state machine, sprite management, collision detection and much more. Luna Game Toolkit, easy, fast & fun!

Please star this repo by clicking the Star box in the top right corner if you find it useful!

if you wish to learn more about the Delphi language visit learndelphi.org.

Downloads

Development - This build represents the most recent development state an as such may or may not be as stable as the official release versions. If you like living on the bleeding edge, it's updated frequently (often daily) and will contain bug fixes and new features.

Releases - These are the official release versions and deemed to be the most stable.

Features

  • Free and open-source. See License agreement.
  • Written in Object Pascal
  • Support Windows 64 bit platform
  • Powered by SDL (https://github.com/libsdl-org/SDL)
  • Everything will be linked into your executable, ready for use with no DLLs to maintain.
  • Hardware accelerated with Direct3D
  • You interact with Luna via your derived TLuGame class and the various classes and routines in the Luna unit.
  • Archive (zip archive format, password protection)
  • Window (Direct3D, anti-aliasing, viewports, render targets, primitives, blending)
  • Input (keyboard, mouse and joystick)
  • Texture (color key transparency, scaling, rotation, flipped, titled, BMP, TGA, JPEG, PNG formats)
  • Video (play, pause, rewind, MPEG1 format)
  • Sprite (pages, groups, animation, poly-point collision)
  • Entity (defined from a sprite, position, scale, rotation, collision)
  • Actor (high level, actor, actor list management) coming soon!
  • Audio (samples, streams, WAV, OGG, FLAC formats)
  • Font (true type format, scale, normal, italics, bold, strike-through styles)
  • Timing (time-based, frame elapsed, frame speed)
  • CloudDb (Remote MySQL database access via PHP)
  • Highscore (Post, retrieve, clear highscores to a remote MySQL database) coming soon!
  • Social (post to all your social accounts, text and media, powered by dlvrit.com) coming soon!
  • Misc (collision, easing, screen shake, screenshot, starfield, INI based config files, startup dialog, treeview menu) coming soon!
  • And more. See Luna.pas in installdir\sources and the docs in installdir\docs for more information about features.

Minimum System Requirements

Sponsor Benefits

  • You will have priority support with access to our private Luna development forum and discord channel.
  • You will have access to private betas, documents, etc. and be able to help shape the direction of the product.
  • You will be helping us continue developing this product, thank you in advance.
  • I want to sponsor this project.

Other ways to help

  • I will make some examples and demos using this project.
  • I will spread the word about this project.
  • I wish to do X for this project.

Thank you very much for any support you can provide, I will be most grateful. 👏

How to use in Delphi

  • Unzip the archive to a desired location.
  • Add installdir\sources, folder to Delphi's library path so the library source files can be found for any project or for a specific project add to its search path.
  • Use LuArc utility for making archive files (compressed, encrypted custom format). Running the makearc.bat in installdir\bin will build Data.arc that is used by the examples. Note: You must build Data.arc before you run any examples, they all depend on it.
  • In Delphi, load Luna Game Toolkit.groupproj to load and compile the examples/LuArc, which will showcase the library features and how to use them.
  • See examples in the installdir\examples for more information about usage.

NOTE: All executables in this repo that are created by us will be digitally signed as tinyBigGAMES LLC, for your protection and peace of mind.

Known Issues

  • This project is in active development so changes will be frequent
  • Documentation is WIP. They will continue to evolve
  • More examples will continually be added over time

A Tour of Luna Game Toolkit

Game Object

You just have to derive a new class from the TLuGame base class and override a few callback methods. You access the toolkit functionality from the Luna unit.

uses
  Luna;

type
  { TMyGame }
  TMyGame = class(TLuGame)
  public
    procedure OnGetSettings(var aSettings: TGameSettings); override;
    procedure OnStartup; override;
    procedure OnShutdown; override;
    procedure OnUpdate(aDeltaTime: Double); override;
    procedure OnRender; override;
    procedure OnRendeHUD; override;
  end;

How to use

A minimal implementation example:

{ TMyGame }
procedure TMyGame.OnGetSettings(var aSettings: TGameSettings);
begin
  inherited;
  
  // add your settings code  
  aSettings.WindowWidth := 960;
  aSettings.WindowHeight := 540;
  aSettings.WindowTitle := 'My Game';
  aSettings.WindowClearColor := DARKSLATEBROWN;  
end;

procedure TMyGame.OnStartup;
begin
  inherited;
  
  // add your own startup code
end;

procedure TMyGame.OnShutdown;
begin
  // add your shutdown code
  
  inherited;
end;

procedure TMyGame.OnUpdate(aDeltaTime: Double);
begin
  inherited;
  
  // add your update code
end;

procedure TMyGame.OnRender;
begin
  inherited;
  
  // render your render code
end;

procedure TMyGame.OnRenderHUD;
begin
  inherited;
  
  // add your render HUD code 
end;

To run your game, call

LuRunGame(TMyGame);

NOTE: For a LGT game to work properly, execution MUST start with LuRunGame(...). Only a single instance will be allowed to run, all other instances will quietly terminate.

See the examples for more information on usage.

Media

Luna Game Toolkit Intro

Luna.mp4

Support

Our development motto:

  • We will not release products that are buggy, incomplete, adding new features over not fixing underlying issues.
  • We will strive to fix issues found with our products in a timely manner.
  • We will maintain an attitude of quality over quantity for our products.
  • We will establish a great rapport with users/customers, with communication, transparency and respect, always encouraging feedback to help shape the direction of our products.
  • We will be decent, fair, remain humble and committed to the craft.

Links:


Made for Delphi

luna's People

Contributors

jarroddavis68 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.