
Spark Game Toolkit™ (SGT) is a powerful and flexible 2D game development library designed to streamline the creation of engaging games and multimedia applications using the Delphi (Object Pascal) programming language. Whether you're a seasoned developer or just getting started, SGT offers a robust set of tools to bring your ideas to life on Windows platforms.
To get started with Spark Game Toolkit, you'll need to have a basic understanding of Pascal programming and game development concepts.
Clone or Download:
Extract Files:
Install Prerequisites:
C:LLMgguf.Open Project:
Spark Game Toolkit.groupproj project group file located in the src folder.Run Example Projects:
ZipFile01 example first to create the Data.zip used by other examples.Here's a basic example of how to use Spark Game Toolkit to create a simple window and draw a shape:
uses
System.SysUtils,
SGT.Core;
var
LWindow: TWindow;
LFont: TFont;
LPos: TPoint;
begin
// Initialize a new window with the title "SGT: Window #01"
LWindow := TWindow.Init('SGT: Window #01');
// Load the default font with size 10
LFont := TFont.LoadDefault(LWindow, 10);
// Main game loop
while not LWindow.ShouldClose() do
begin
LWindow.StartFrame();
// Close the window if ESC key is pressed
if LWindow.GetKey(KEY_ESCAPE, isWasPressed) then
LWindow.SetShouldClose(True);
// Begin drawing on the window
LWindow.StartDrawing();
// Clear the screen with a dark slate brown color
LWindow.Clear(DARKSLATEBROWN);
// Draw FPS and Quit text on the screen
LPos := Math.Point(3, 3);
LFont.DrawText(LWindow, LPos.X, LPos.Y, 0, WHITE, haLeft, 'fps %d',
[FrameLimitTimer.FrameRate()]);
LFont.DrawText(LWindow, LPos.X, LPos.Y, 0, GREEN, haLeft, Utils.HudTextItem('Quit', 'ESC'),
[FrameLimitTimer.FrameRate()]);
// End drawing
LWindow.EndDrawing();
LWindow.EndFrame();
end;
// Free resources
LFont.Free();
LWindow.Free();
end. Spark Game Toolkit consists of several modules, each focusing on specific aspects of game development:
The Spark Game Toolkit comes with various example projects demonstrating different features of the library. You can find these examples in the examples directory of the SDK.
Contributions are vital to the Spark Game Toolkit's evolution. Whether you're fixing bugs, adding new features, or improving documentation, your help is greatly appreciated. Here's how you can contribute:
Pull requests are welcome and encouraged. They are an excellent way to propose new features, fix bugs, or improve documentation.
If you find the Spark Game Toolkit beneficial for your projects, please consider:
Your support and engagement play a crucial role in the growth and improvement of this open-source project. Thank you for contributing to the Spark Game Toolkit!
Spark Game Toolkit is released under the BSD 3-Clause License:
BSD 3-Clause License
Copyright (c) 2024-present, tinyBigGAMES LLC
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
This license allows you to use, modify, and distribute the software, provided you include the copyright notice, conditions, and disclaimer. For more details, please refer to the LICENSE file included with the SDK.
For support, feature requests, or general inquiries, please use the following resources:
Copyright © 2024-present tinyBigGAMES™ LLC. All Rights Reserved.