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!
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.
- 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 Editions (Windows 32-bit only)
- 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)
- Unzip the archive to a desired location.
- Add
installdir\sources
, and all theinstalldir\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 theGameVision Toolkit Projects
group file located in theinstalldir\sources
folder. - Build
GVArc
utility for making .ARC files (standard zip archives). Running themakearc.bat
ininstalldir\bin
will buildData.arc
that is used by the examples. - Build
GVDump
utiltiy 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.
- 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
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.
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;
A minimal implementation example:
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
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.
GameVision-Intro01-highlight.mp4
Script.HotReload.mp4
Website | https://tinybiggames.com |
[email protected] | |
Discord | https://discord.gg/tPWjMwK |
https://twitter.com/tinyBigGAMES | |
https://facebook.com/tinyBigGAMES |