PIXELS is a comprehensive and high-performance 2D game development framework engineered specifically for Delphi developers who demand professional results. Built on the rock-solid foundation of the industry-proven Allegro Library, PIXELS delivers enterprise-grade game development capabilities with the elegance and productivity that Delphi developers expect.
Whether you're building classic arcade games, stylish pixel art adventures, or rich interactive applications, PIXELS gives you the foundation you need โ fast graphics, smooth input handling, audio playback, asset management, and more โ all fully native to Delphi.
- Native Delphi Integration โ Seamlessly integrates with your existing Delphi workflow, leveraging familiar Object Pascal syntax and modern language features
- Production-Ready Performance โ Hardware-accelerated graphics, optimized rendering pipeline, and efficient memory management for smooth 60+ FPS gameplay
- Complete Game Development Stack โ Everything you need in one cohesive package: advanced graphics rendering, multi-format audio playback, precise input handling, flexible asset management, and powerful animation systems
- Developer-Friendly APIs โ Clean, intuitive interfaces designed by developers, for developers โ spend time creating, not debugging
- Classic arcade and retro-style games with pixel-perfect precision
- Modern indie games with stunning visual effects and smooth animations
- Interactive educational applications and multimedia presentations
- Rapid prototyping and game jams where time-to-market matters
- Commercial game projects requiring robust, maintainable codebases
Transform your game ideas into polished, professional experiences with PIXELS โ where Delphi's power meets modern game development excellence.
- Fully Delphi-Native: Designed for Delphi developers, by Delphi developers
- Game Loop Architecture: Built-in deterministic game loop with configurable frame rates (60 FPS default)
- Object-Oriented Design: Clean inheritance model with
TpxGame
base class - Resource Management: Automatic tracking and cleanup of game resources
- Hardware-Accelerated 2D: Fast OpenGL-based rendering pipeline
- Texture Management: Support for PNG, JPEG, and other common formats
- Sprite System: Advanced sprite class with animation, scaling, rotation, and collision
- Texture Atlas: Efficient sprite sheet management with animation sequences
- Shader Support: Custom GLSL shader support for visual effects
- Camera System: 2D camera with zoom, rotation, shake effects, and smooth following
- Blend Modes: Multiple blending modes for advanced visual effects
- DPI Scaling: Automatic high-DPI display support
- Music Playback: Streaming audio for background music (OGG)
- Sound Effects: Low-latency sample playback with multiple channels (OGG)
- Keyboard Input: Full keyboard support with key states and event handling
- Mouse Support: Mouse movement, buttons, and wheel with logical coordinate mapping
- Joystick/Gamepad: Complete controller support
- Vector Math: 2D/3D vector operations, transformations, and utilities
- Collision Detection: AABB, OBB, circle, and pixel-perfect collision methods
- Easing Functions: Comprehensive easing library for smooth animations
- Random Utilities: Enhanced random number generation with seeding
- Angle Operations: Optimized trigonometric functions with lookup tables
- File I/O: Flexible file system supporting disk, memory, and ZIP archives
- ZIP Support: Password-protected archive loading for asset distribution
- Font Rendering: TrueType font support with multiple sizes and colors
- Texture Loading: Efficient texture loading with color key support
- Console Integration: Rich console output with colors and formatting
- Video Playback: Full-screen video support for cutscenes
- Network Ready: Foundation for future networking capabilities
- Cross-Platform Ready: Windows out of the box; groundwork for future expansion
๐ง This repository is currently under construction.
PIXELS is actively being developed. Features, APIs, and internal structure are subject to change.
Contributions, feedback, and issue reports are welcome as the project evolves.
- Delphi: Any version supporting Win64/Unicode
- Platform: Windows 10/11 (x64)
- Graphics: OpenGL 3.0 compatible GPU
- Tested: Windows 11 (24H2) and Delphi 12.3 (latest patches)
-
Clone the repository:
git clone https://github.com/tinyBigGAMES/PIXELS.git
-
Add to your project:
- Add the
src
folder to your Delphi library path - Include
PIXELS.*
units in your uses clause
- Add the
-
Create your first game:
program MyFirstGame;
{$APPTYPE CONSOLE}
uses
PIXELS.Game,
PIXELS.Graphics,
PIXELS.Events;
type
{ TMyGame }
TMyGame = class(TpxGame)
private
FFont: TpxFont;
public
function OnStartup(): Boolean; override;
procedure OnShutdown(); override;
procedure OnUpdate(); override;
procedure OnRender(); override;
end;
{ TMyGame }
function TMyGame.OnStartup(): Boolean;
begin
Result := False;
// Initialize window
if not TpxWindow.Init('My First PIXELS Game', 800, 600) then Exit;
// Load default font
FFont := TpxFont.Create();
FFont.LoadDefault(12);
Result := True;
end;
procedure TMyGame.OnShutdown();
begin
FFont.Free();
TpxWindow.Close();
end;
procedure TMyGame.OnUpdate();
begin
// Quit on pressing ESC
if TpxInput.KeyPressed(pxKEY_ESCAPE) then
SetTerminate(True);
// Toggle fullscreen on pressing F11
if TpxInput.KeyPressed(pxKEY_F11) then
TpxWindow.ToggleFullscreen();
end;
procedure TMyGame.OnRender();
begin
// Clear screen
TpxWindow.Clear(pxBLACK);
// Draw text
FFont.DrawText(pxWHITE, 10, 10, pxAlignLeft, 'Hello PIXELS!', []);
// Draw a rectangle
TpxWindow.DrawFillRectangle(100, 100, 200, 150, pxRED);
end;
begin
// Run the game
pxRunGame(TMyGame);
end.
TpxGame
: Base class for all games with event-driven architecturepxRunGame()
: Main entry point that handles the complete game lifecycle
TpxWindow
: Window management, rendering context, and display operationsTpxTexture
: Texture loading, manipulation, and renderingTpxFont
: Text rendering with multiple alignment and formatting optionsTpxShader
: Custom shader support for advanced visual effectsTpxCamera
: 2D camera system with smooth movement and effects
TpxSprite
: Complete sprite implementation with physics and animationTpxTextureAtlas
: Efficient sprite sheet management- Animation Support: Frame-based animation with multiple playback modes
TpxInput
: Unified input handling for all device typesTpxAudio
: Music and sound effect playback system
TpxMath
: Comprehensive math library with game-specific functionsTpxVector
: 2D/3D vector operations and utilities- Collision Detection: Multiple collision methods for different use cases
The examples
directory contains sample projects demonstrating various PIXELS features:
- Basic Rendering: Simple shapes, textures, and text
- Sprite Animation: Character animation and movement
- Input Handling: Keyboard, mouse, and joystick examples
- Audio Playback: Music and sound effect integration
- Collision Detection: Different collision methods comparison
- Camera Effects: Camera movement, zoom, and shake effects
click image to open video
- ๐ Report Issues via the Issue Tracker
- ๐ฌ Join Discussions on the Forum and Discord
- ๐ Learn More at Learn Delphi
- ๐ Read Documentation in the Wiki
Contributions to PIXELS are highly encouraged! ๐
- ๐ Report Issues: Submit issues if you encounter bugs or need help
- ๐ก Suggest Features: Share your ideas to make PIXELS even better
- ๐ง Create Pull Requests: Help expand the capabilities and robustness of the library
- ๐ Improve Documentation: Help make PIXELS more accessible to developers
- ๐ฎ Share Examples: Contribute sample projects and tutorials
- Follow Delphi coding conventions
- Include unit tests for new features
- Update documentation for API changes
- Test on multiple Windows versions
Your contributions make a difference! ๐
PIXELS stands on the shoulders of giants:
- Allegro Library: The robust foundation that powers PIXELS
- Delphi Community: For decades of innovation in rapid application development
- Contributors: Everyone who helps make PIXELS better
PIXELS is distributed under the BSD-3-Clause License, allowing for redistribution and use in both source and binary forms, with or without modification, under specific conditions.
See the LICENSE file for more details.
๐ฎ PIXELS โ Professional 2D gaming, powered by Delphi. ๐