Skip to content

Advanced professional 2D indie game library for Delphi

License

Notifications You must be signed in to change notification settings

atkins126/topazgamelib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Topaz Logo

Chat on Discord GitHub stars GitHub Watchers GitHub forks Twitter Follow

Overview

Topaz Game Library™ is a 2D professional indie game library that allows you to do game development in Embarcadero Delphi for desktop PC's running Microsoft Windows® and uses OpenGL® 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. Topaz Game Library, 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 for non-commercial use. See License agreement.
  • Written in Object Pascal
  • Support Windows 64 bit platform
  • Hardware accelerated with OpenGL
  • You interact with Topaz via your derived TGame class and the various classes and routines in the Topaz unit.
  • Archive (custom archive format, password protection)
  • Window (OpenGL, anti-aliasing, vsync, viewports, primitives, blending)
  • Input (keyboard, mouse and joystick)
  • Texture (color key transparency, scaling, rotation, flipped, titled, BMP, DDS, PCX, TGA, JPEG, PNG)
  • Video (play, pause, rewind, OGV format)
  • Sprite (pages, groups, animation, poly-point collision)
  • Entity (defined from a sprite, position, scale, rotation, collision)
  • Audio (samples, streams, WAV, OGG/Vorbis, FLAC formats)
  • Font (true type, scale, rotate)
  • Timing (time-based, frame elapsed, frame speed)
  • Shaders (vertex, fragment, GLSL)
  • In App Purchase (powered by Stripe.com)
  • Social (post to all your social accounts, text and media, powered by dlvrit.com)
  • Misc (collision, easing, screen shake, screenshot, starfield, colors, INI based config files, startup dialog, treeview menu)
  • And more. See TopazGameLib.pas in installdir\sources and the docs in installdir\docs for more information about features.

Minimum System Requirements

Sponsor Benefits

  • The Software may be used by an unlimited number of developers to develop an unlimited number of commercial Products, which may be distributed to an unlimited number of clients, with no distribution or usage restrictions.
  • You will have priority support with access to our private Topaz 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.
  • Payment methods: Credit Card (via Stripe.com) | PayPal
  • I want to sponsor this project.

Other ways to help

  • I want to donate to this project.
  • 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 TopazArc 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.
  • In Delphi, load Topaz Game Library.groupproj to load and compile TopazExamples, which will showcase the library features and how to use them.
  • See examples in the installdir\examples for more information about usage.
  • You must include TGL.dll in your project distribution.

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 Topaz Game Library

Game Object

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

uses
  TopazGameLib;

type
  { TMyGame }
  TMyGame = class(TGame)
  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

Topaz.RunGame(TMyGame);

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

See the examples for more information on usage.

Media

Topaz Game Library Intro

Topaz.Game.Library.mp4

FreeStrike Prototype (currently in development, using TopazGameLib)

FreeStrike.Prototype.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 encouragingng 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

About

Advanced professional 2D indie game library for Delphi

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published