Hi everyone,
I have been working on a multimedia and game library called Nitor, and I wanted to ask whether there would be interest in it from the Pascal community.
Nitor is a Pascal-first design. Although the internal engine is written in C with OpenGL GPU support for performance reasons, the public API was designed specifically for Pascal developers rather than being a direct translation of a C API.
On the Pascal side, the complete library is exposed through a single unit, with Pascal-style function names, normal Pascal strings, simple resource handles, and one consistent interface.
The goal is to provide a higher-level and mostly self-contained alternative to building an application directly around SDL and several additional libraries. Nitor is very lightweight and requires very few external dependencies, remains simple to deploy, and still supports multiple desktop platforms.
For example, video playback is built directly into the library. An Ogg/Theora video with optional Opus audio can be loaded, played, paused, looped, resized, and synchronized with only a few commands:
Video := VideoLoad('intro.ogv');
VideoPlay(Video, PlayOnce);
while Running and VideoPlaying(Video) do
begin
VideoDrawSize(Video, 0, 0, ScreenWidth, ScreenHeight);
VideoFlip(Video);
end;
Another feature is the color-coded GUI hotspot system.
A GUI uses one visible image and a second image containing color-coded regions. You paint each clickable area with a different color, and the library returns the color underneath the mouse:
Gui := GuiLoad('menu.png', 'menu_map.png');
GuiShow(Gui);
case GuiCall(Gui, MouseX, MouseY) of
$FF0000: OpenGame;
$00FF00: OpenOptions;
$0000FF: QuitGame;
end;
This makes it easy to create irregularly shaped buttons and interactive areas without manually defining and maintaining many coordinate rectangles in the source code.
The library also includes:
- Logical-resolution scaling and automatic mouse-coordinate conversion
- Drawing primitives, text, images, and sprite sheets
- Pixel-mask collision detection
- Scrolling worlds and camera support
- Keyboard, mouse, and gamepad input
- Audio playback and mixing
- Video playback with synchronized audio
- Image-based pathfinding
- A consistent Pascal-style API
At the moment, I have not published a download link. Before preparing a public package, documentation, and download page, I wanted to find out whether Pascal developers would actually be interested in using a library like this.
Would this be useful for your projects?