Results 1 to 10 of 10

Thread: GameVision Toolkit 2.0

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Post GameVision Toolkit




    Overview


    GameVision Toolkit™ is 2D indie SDK that allow you to do game development in Delphi for 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 projects. There is support for bitmaps, audio samples, streaming music, video playback, loading resources directly from a standard ZIP archive, a thin object oriented actor/scene system, entity state machine, sprite management, PolyPoint™ collision detection and much more. GameVision, easy, fast & fun!

    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 GameVision (Allegro, Nulkear, CSFMLAudio, LuaJIT)
    • Written in Object Pascal
    • Support Windows 32/64 bit platforms
    • Support Delphi Community Edition
    • 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)
    • Shaders (vertex, pixel, HLSL)
    • Misc (screenshake, screenshot, starfied, colors, ini based config files, startup dialog, treeview menu)


    Minimum System Requirements



    How to use in Delphi

    • Unzip the archive to a desired location.
    • Add installdir\sources, and all the installdir\deps\xxx folders to Delphi's library path so the toolkit source files can be found for any project or for a specific project add to its search path.
    • See examples in the installdir\examples for more information about usage. You can load all projects using the GameVision Toolkit Projects group file located in the installdir\sources folder.
    • Build GVArc 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 GVDump utility if you need convert a small binary file to Pascal source format that can be included {$I MyBinaryFile.inc} in your project.
    • Build GVExamples to 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 GameVision

    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 GameVision.XXX units.

    Code:
    uses
      GameVision.Common,
      GameVision.Audio,
      GameVision.Graphics,
      GameVision.Input,
      GameVision.System,
      GameVision.UI,
      GameVision.Game;
      
    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
      // open archive file
      Engine.OpenArchive(cArchiveFilename);
    end;
    
    procedure TMyGame.OnExit;
    begin
      // close archive file
      Engine.CloseArchive(cArchiveFilename);
    end;
    
    procedure TMyGame.OnStartup;
    begin
      // open display
      Display.Open(cDisplayWidth, cDisplayHeight,  cDisplayFullscreen, cDisplayTitle);
    
      // create font, use buildin
      FFont := TFont.Create;
    end;
    
    procedure TMyGame.OnShutdown;
    begin
      // free font
      FreeAndNil(FFont);
    
      // close display
      Display.Close;
    end;
    
    procedure TMyGame.OnUpdate(aDeltaTime: Double);
    begin
      // process input
      if Input.KeyboardPressed(KEY_ESCAPE) then
        Engine.SetTerminate(True);
    end;
    
    procedure TMyGame.OnClearDisplay;
    begin
      // clear display
      Display.Clear(BLACK);
    end;
    
    procedure TMyGame.OnShowDisplay;
    begin
      // show display
      Display.Show;
    end;
    
    procedure TMyGame.OnRender;
    begin
      // render any graphics here
    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', [Engine.GetFrameRate]);
      FFont.Print(Pos.X, Pos.Y, 0, GREEN, alLeft, 'Esc - Quit', []);
    end;
    To run your game, call

    Code:
    Engine.Run(TMyGame);

    NOTE: For GameVision to work properly, execution MUST start with Engine.Run(...). This call will property setup/shutdown the library and log and handle errors. Only one GameVision app instance is allowed to run and will safely terminate if more than one is detected.


    See the examples for more information on usage.


    Media




    Support



    Last edited by drezgames; 06-08-2021 at 08:04 PM.

  2. #2
    PGDCE Developer de_jean_7777's Avatar
    Join Date
    Nov 2006
    Location
    Bosnia and Herzegovina (Herzegovina)
    Posts
    286
    Seems pretty cool and simple.
    Existence is pain

  3. #3
    An example of hot loading a Lua script in GameVision.


  4. #4
    Quote Originally Posted by de_jean_7777 View Post
    Seems pretty cool and simple.
    Hi, thanks! I've updated the first post with the latest info. It's on the road to cross platform support. An important first step was getting win32/win64 working. It's been rewritten and enhanced and this new codebase is much easier to take it other non-windows platforms. Don't have a time frame for this, but the wheels have been set in motion. This toolkit is the one I'm actively working on. You can follow progress up on GitHub.

  5. #5
    Added basic physics.


  6. #6
    I mostly make arcade space combat type games and always wanted to have that synthetic, AI, computer assistant type voice in the game. Added support for text-to-speech to GameVision with both male and female voices.

    Last edited by drezgames; 27-07-2021 at 03:40 AM.

  7. #7
    Added robust LuaJIT integration to GameVision. Two minimal interfaces allow you to access variables, automatically register routines and more. Lua.SetVariable('OutterTable.InnerTable.Name', 'MyName') will, for example, automatically setup the tables and variables for you in one call. You can define all your routines as class methods and call Lua.RegisterRoutines(TMyClass) to register them all in one call.

    gamevision-lua.jpg

  8. #8
    I'm working on a premium add-on for GameVision, remote high score management.

    I managed to reduce the complexity of interacting with a remote MySQL database, optional SSL connection all while being non-blocking, down to about 9 routines. You simply point to a remote MySQL database with valid credentials and everything will be set up for you automatically. You only need to create an empty database. You can Clear, List and Post your scores and a callback handler will fire after the operation has completed. Then you can query the cached results. These operations are pushed unto a background thread (using the Async routines in GameVision) to allow your game to continue running.

    If anyone wishes to help me beta test it, I can offer you a free license to the full version in exchange for your help. If you're interested join my discord https://discord.gg/tPWjMwK, private message me and I will add you to the beta channel. Thanks!

    gamevision-highscores.jpg

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
  •