Results 1 to 7 of 7

Thread: Vivace Game Toolkit

  1. #1

    Vivace Game Toolkit

    logo256.png



    Overview

    Vivace™ (ve'va'CHe) Game Toolkit is an SDK to allow easy, fast & fun 2D game development in Delphi on desktop PC's running Microsoft Windows® and uses Direct3D® for hardware accelerated rendering.
    It's robust, designed for easy, fast & fun use an 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 graphics simulations. There is support for bitmaps, audio samples, streaming music, video playback, loading resources directly from a standard ZIP archive and much more.

    Downloads

    Development - This build represent 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
    • All required libraries are bundled in Vivace (Allegro, Nulkear, CSFMLAudio, LuaJIT)
    • Written in Object Pascal
    • Hardware accelerated with Direct3D
    • You interact with the toolkit via routines, class objects and a thin OOP framework
    • Archive (mount/unmount, ZIP format )
    • Display ( Direct3D, antialiasing, vsync, viewports, primitives, blending)
    • Input (keyboard, mouse and joystick)
    • Bitmap (color key transparency, scaling, rotation, flipped, titled, BMP, DDS, PCX, TGA, JPEG, PNG)
    • Video (play, pause, rewind, OGV format)
    • Sprite (pages, groups, animation, polypoint collision)
    • Entity (defined from a sprite, position, scale, rotation, collision)
    • Actor (list, scene, statemachine)
    • Audio (samples, streams, WAV, OGG/Vorbis, FLAC formats)
    • Speech (multiple voices, play, pause)
    • Font (true type, scale, rotate, 2 builtin)
    • Timing (time-based, frame elapsed, frame speed)
    • Scripting (load, save, easy manual binding to Pascal, FFI from script)
    • Misc (screenshake, screenshot, starfied, colors, ini based config files, startup dialog, treeview menu)

    Minimum System Requirements

    • Delphi 10 or higher
    • Microsoft Windows 10
    • DirectX 9

    How to use in Delphi

    • Unzip the archive to a desired location.
    • Add installdir\source\library and installdir\source\utils to Delphi's library path so the toolkit source files can be found for any project or for a specific project add to projects search path.
    • See examples in the installdir\examples for more information about usage. You can load all examples using the Vivace Game Toolkit project group file located in the installdir\source folder.
    • Build ViArc utility for making .ARC files (standard zip archives). Running the makearc.bat in installdir\bin will build Data.arc that is used by the examples.
    • Build ViDump utiltiy if you need convert a small binary file to Pascal source format that can be included {$I MyBinaryFile.inc} in your project.
    • Build ViExample that showcase will showcase many of the features and capabilities of the toolkit.

    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 Vivace

    Game Object

    You just have to derive a new class from the TCustomGame base class and override a few callback methods. You access the toolkit functionality from the classes in the various Vivace.XXX units.
    Code:
    uses
      Vivace.Color,
      Vivace.Math,
      Vivace.Input,
      Vivace.Font,
      Vivace.Game,
      Vivace.Engine,
      Vivace.Common;
      
    const
      cArchiveFilename   = 'Data.arc';
    
      cDisplayTitle      = 'MyGame';
      cDisplayWidth      = 800;
      cDisplayHeight     = 480;
      cDisplayFullscreen = False;
    
    type
      { TMyGame }
      TMyGame = class(TCustomGame)
      protected
        FFont: TFont;
      public
        procedure OnLoad; override;
        procedure OnExit; override;
        procedure OnStartup; override;
        procedure OnShutdown; override;
        procedure OnUpdate(aDeltaTime: Double); override;
        procedure OnClearDisplay; override;
        procedure OnShowDisplay; override;
        procedure OnRender; override;
        procedure OnRenderHUD; override;
      end;
    How to use

    A minimal implementation example:
    Code:
    uses
      System.SysUtils;
    
    { TMyGame }
    procedure TMyGame.OnLoad;
    begin
      // mount archive file
      gEngine.Mount(cArchiveFilename);
    end;
    
    procedure TMyGame.OnExit;
    begin
      // unmount archive file
      gEngine.Unmount(cArchiveFilename);
    end;
    
    procedure TMyGame.OnStartup;
    begin
      // open display
      gEngine.Display.Open(cDisplayWidth, cDisplayHeight,  cDisplayFullscreen, cDisplayTitle);
    
      // create font, use buildin
      FFont := TFont.Create;
    end;
    
    procedure TMyGame.OnShutdown;
    begin
      // free font
      FreeAndNil(FFont);
    
      // close display
      gEngine.Display.Close;
    end;
    
    procedure TMyGame.OnUpdate(aDeltaTime: Double);
    begin
      // process input
      if gEngine.Input.KeyboardPressed(KEY_ESCAPE) then
        gEngine.SetTerminate(True);
    end;
    
    procedure TMyGame.OnClearDisplay;
    begin
      // clear display
      gEngine.Display.Clear(BLACK);
    end;
    
    procedure TMyGame.OnShowDisplay;
    begin
      // show display
      gEngine.Display.Show;
    end;
    
    procedure TMyGame.OnRender;
    begin
    end;
    
    procedure TMyGame.OnRenderHUD;
    var
      Pos: TVector;
    begin
      // assign hud start pos
      Pos.Assign(3, 3, 0);
    
      // display hud text
      FFont.Print(Pos.X, Pos.Y, Pos.Z, WHITE, alLeft, 'fps %d', [gEngine.GetFrameRate]);
      FFont.Print(Pos.X, Pos.Y, 0, GREEN, alLeft, 'Esc - Quit', []);
    end;
    To run your game, call
    Code:
    RunGame(TMyGame);
    See the examples for more information on usage.

    Support

    Website: https://vivace.dev
    E-mail : support@tinybiggames.com
    Discord: https://discord.gg/tPWjMwK
    Twitter: https://twitter.com/tinyBigGAMES
    Dailymotion: https://dailymotion.com/tinyBigGAMES
    Last edited by drezgames; 04-07-2021 at 05:02 PM.

  2. #2
    Added support for positional audio.

    Last edited by drezgames; 02-07-2021 at 07:32 PM.

  3. #3
    Added support for immediate mode GUI.

    Last edited by drezgames; 02-07-2021 at 07:30 PM.

  4. #4
    Could this be used with FreePascal and Lazarus?

  5. #5
    Quote Originally Posted by Chesso View Post
    Could this be used with FreePascal and Lazarus?
    Hi, possibly sure, but there will be some work as it was designed taking advantage of Delphi. The source is open, so if anyone wants to work on making it compatible FP/Laz I welcome it. I would start with the Vivace.External.XXX units first as the library is built on top of them. Once that is done it should be easier overall. Also, using the Delphi mode should make things easier as well.
    Last edited by drezgames; 04-07-2021 at 04:59 PM.

  6. #6
    Great work!

    Btw., what is the difference to your Game Vision Toolkit?
    Last edited by Matthias; 26-07-2021 at 06:10 PM.

  7. #7
    Hi, cool thanks!

    GameVision is the evolution and is actively being work on. Rewritten with cross platform in mind (not there yet, but its much easier now going forward). Support win32 and win64 platforms (this was an important first step) already. The base library will always be free and opensource, with premium addons. I'm actually working on one right now, remote high scores. I need to update my GV post here with the latest info, but if you have facebook, there is a post https://www.facebook.com/groups/1370...7407455302291/ talking about it.

    https://gamevision.dev
    Last edited by drezgames; 26-07-2021 at 07:20 PM.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •