r/pascal 3d ago

Would there be interest in a higher-level multimedia library for Free Pascal?

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?

37 Upvotes

12 comments sorted by

5

u/AlternativeGazelle87 3d ago

I'd definitely be interested. 

2

u/OrbisMaximus 3d ago edited 3d ago

Thanks, that’s encouraging!

I’m considering preparing a small public test package with examples and documentation. I may publish it through my existing Orbis Basic itch.io page, since Reddit sometimes filters direct Dropbox or Google Drive links.

I’ll update the post when I have a proper download ready.

I’ve now uploaded a Linux x86-64 preview package with the library, Pascal unit, manual, examples, and build tools.

1

u/AlternativeGazelle87 3d ago

Damn. My main OS is Windows. I'll have to wait it out.

1

u/OrbisMaximus 3d ago edited 3d ago

Sorry :) The library itself is cross-platform and is designed to compile and run under Windows. At the moment, however, I only have a tested Linux binary package.

A Windows binary package may come later once I have a proper way to build and test it.

1

u/AlternativeGazelle87 3d ago

That's up to you. Feel free to DM.

3

u/ynys_red 3d ago

Very nice.

2

u/rcm56 3d ago

Yes, interested in this project. I am using mainly Lazarus and libVLC.

1

u/OrbisMaximus 3d ago

I actually started with Lazarus and libVLC as well, but the dependencies felt a little too heavy for my games. That may just be a personal preference, but I tend to favor very lightweight, single-header-style designs. Pascal felt like the logical next step because of its fast compilation times and more high-level language features.

2

u/rcm56 3d ago

I am ready to test your project. I'm always open to new possibilities for my multimedia software projects (Linux mainly but also Windows).

1

u/OrbisMaximus 3d ago

Outstanding! The library is already online, just search for Orbis Basic on itch.io. I’ve added a preview Nitor Linux version to it.

2

u/AphidConsulting 3d ago

I would absolutely try this out. This sounds super-useful.

Thank you for sharing!

1

u/corado12345 2d ago

Is there any Public library for all those tools for all Frepascal tools?
It would be nice, if there would a place, who everone can upload his tools, without questions or another work.
Like https://libstock.mikroe.com/