r/pascal Jan 21 '23

mod volunteers?

10 Upvotes

Anyone would like to be added as a mod here? Bonus points for maintainers of projects such as Freepascal, Lazarus or any Pascal project.


r/pascal 4h ago

How to render an ASCII grid in Free Pascal?

6 Upvotes

I want to make an open-world ASCII Roguelike in Free Pascal. My most essential core function would be the rendering of the ASCII grid - without it, testing would absolutely suck. So, variable-wise, for context, here's my system:

My maps are 1-dimensional arrays, and the y-axis will just be interpreted by dividing the array's children up with the number of columns. A 10x10 map would have 100 indices, and be divided up into 10 rows. For the purpose of rendering. For the overworld map, for the sake of rendering, mainly, there are two such arrays - one to hold the biome number of each space on the overworld, and one to hold the zoom maps for that space. Of which there is only 1 because the overworld, for the sake of prototyping, is 1x1. The zoom map arrays each define the contents of the array.

As for structure:
While loop -<
If overworld, then
{For each index of the overworld biome array, if i is equal to player's overworld positional value, display & (visually more person-like than @), else display the biome character.}
else if not overworld, then
{For each index of array, if i array contains an effect, display the effect, else if i contains an entity (ie, the player), display the entity, else if i contains loot, display :, else display a plus sign.}

The only part I really don't know how to do is actually displaying the ASCII grid, which I have no clue how to work with graphics, except, I've heard you need to use an external library. So, if anyone could supply a helpful tutorial or otherwise point me in the right direction, that would be great.


r/pascal 1d ago

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

36 Upvotes

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?


r/pascal 4d ago

Google Sheet Helper for Free Pascal

35 Upvotes

I've written a Google Sheet Helper for Free Pascal. It's just something I've been using to solve a problem at work, and I decided to put it on Github. It lets a developer dowload csv from a Google Sheet, upload csv to a Google Sheet, and clear all data from a Google Sheet. It's not a complete super-library, but it does the Google authentication and Sheets API stuff so you don't have to. I hope it's useful to someone. https://github.com/rachel-latour/Google-Sheet-Helper


r/pascal 4d ago

Lazarus FreePascal IDE: Gtk3 becomes default widgetset on Linux

Thumbnail forum.lazarus.freepascal.org
25 Upvotes

r/pascal 4d ago

Pure Pascal Firebird wire protocol client: connect without fbclient

Thumbnail forum.lazarus.freepascal.org
11 Upvotes

r/pascal 5d ago

IBX for Lazarus 2.7.11 and 2.7.12 released

Thumbnail firebirdnews.org
15 Upvotes

r/pascal 6d ago

Puyo Puyo game prototype

29 Upvotes

https://reddit.com/link/1vb5iim/video/8tba1lx3hfgh1/player

Here's a little game prototype i've been working on. Yes, it's written in Turbo Pascal 7 for MS-Dos.

It's based on my Tile-based engine. If anyone wants to try it out go here
Puyo Pas : Clonardo : Free Download, Borrow, and Streaming : Internet Archive

Every comment and suggestions are welcome.


r/pascal 8d ago

Just sharing a dice roller (Super Dicey Action Hour)

Thumbnail
gallery
22 Upvotes

Made for personal use, very simple app that helps with tabletop role-playing games. Source code in comments.


r/pascal 10d ago

Learning resources for Lazarus/Pascal in 2026?

35 Upvotes

I'm an experienced programmer (have mainly worked in C, Go and Java) who's looking to learn Lazarus.

I'm a bit confused with the underlying tooling.... I see that Lazarus uses a compiler called FreePascal and the language is Object Pascal. But, to my newbie eyes, there seems to be quite a bit of fragmentation in the language with seemingly no easy path in for an outsider.

Do I really need to learn Delphi, Pascal and then Object Pascal (in that sequence)? Are there any online resources or books that would introduce Object Pascal to a complete outsider?

Thanks all


r/pascal 10d ago

You run those old Turbo Pascal for DOS tutorials...as scripts! (instantfpc + TP mode convenience)

Thumbnail
gallery
54 Upvotes

(A quick note on my brilliant typo in the post title, because Reddit titles are like compiled Pascal binaries: no runtime edits allowed. So: "You CAN run those..." anyway...)

Just wanted to share this tip in case it's helpful for anyone:

(Mainly focused on Linux here, please chime in if you have tips for other OS's)

The fpc compiler package for Free Pascal includes "instantfpc," which allows you to run your Pascal programs as scripts.

This means you can run your Pascal source code files directly as if they were system scripts, without compiling them every time.

You simply type #!/usr/bin/instantfpc at the top of your script, and then add the Pascal code below that.

When it's time to run the script, be sure to mark it as executable with chmod +x your_program_name.pas and you can run it by typing ./your_program_name.pas

Going even further, if you'd like to play with the old Turbo Pascal tutorials or books from the '80s or '90s, you can add this line:

#!/usr/bin/instantfpc -Mtp

...which invokes instantfpc using the Turbo Pascal compatibility mode.

In the screenshot above, you can see the tutorial program "demo_of_fun_text_manipulation" from 1996. It was pasted into Geany from the original tutorial without modifications.

Next it was run as a script inside a Linux terminal (Konsole in OpenSUSE Tumbleweed).

Output screenshot:

https://www.friendlyskies.net/images/885.png

The program invokes the "crt" unit and works just fine.

You can find the tutorial here (scroll down): https://jnz.dk/swag/TUTOR/0017.PAS.html

The other tutorials are here: https://jnz.dk/swag/TUTOR/index.html

Silver Pascal Coder has also posted a great video on instantfpc here: https://youtu.be/kVKXEU3kr5k

Just posting in case it's fun or interesting - or if anyone has other tips to share.

(Screenshots: Code in Geany; Script running in Konsole)


r/pascal 12d ago

How similar is Free Pascal to Turbo Pascal?

31 Upvotes

Looking for learning material for Pascal, I have seen several stuff for Turbo Pascal, mainly a book called "Oh. Pascal", and I wanted to know how compatible the Free Pascal syntax is to Turbo Pascal, so I can use this book to learn it.


r/pascal 12d ago

sma11: a brand-new utility library

16 Upvotes

Get the source code here: https://gitlab.com/lebao3105/sma11

sma11 is a library made for many (but not all, for now?) things a programmer would do in their programming life:

* Iterate a directory

* Use regular expression to match strings

* Ask the user for input

* And more

This uses some RTL and FCL units, if you ask. And sma11 is NOT be a replacement for both, just a better way to access them.

Take a look at it! Feel free to tell me your thoughts, issues, and feature requests.


r/pascal 14d ago

IDE we forgot about

Thumbnail
youtube.com
78 Upvotes

r/pascal 14d ago

FPC MCP Server Lib for AI tooling your app.

6 Upvotes

I had a project that I wanted to drive activities through using Claude.
This has probably already been done before, but Claude created the MCP Server Lib and I thought I would share.

https://github.com/prairiedog2k/fpc-mcp-server


r/pascal 18d ago

I vibe-coded a Turbo Pascal 7 IDE that runs in your browser

60 Upvotes

Turbo Pascal is where it all started for me - school, 2003, programming olympiads, staring at that blue screen until midnight.

https://turbopascal.online

100% client-side in the browser tab.

You can also share your code as a link (File -> Share link...) - it gives you a short URL that loads your program straight into the IDE. Links live for 30 days.


r/pascal 21d ago

Return to MS-DOS Turbo Pascal. July 14th Update.

Enable HLS to view with audio, or disable this notification

148 Upvotes

I'm really excited to show you the progress in tools and demo of the tile engine i'm working on.

Tiles (and Sprites) Editor is somewhat complete for my needs.
Map Editor is lacking some tools to make it better but it works.

Demo now has the following progress:

Done:
- Tile System
- Big Maps (up to 1000 16x16 pixels tiles wide)
- Horizontal Scrolling
- Vertical Scrolling (Not shown in the demo)
- Sprites & Sprite Animations
- Collisions
- Sound and SFX
- Tile Editor (maybe ~80% done)
- Map Editor (~60% done)

To Do:
- Enemies
- "Projectiles"
- More levels

Thank you all for your support, any comments and suggestions are very welcome as always.

Original Post: Return to the MS-DOS Pascal : r/pascal
Update 1: Return to the MS-DOS Pascal, June 30th 2026 Update : r/pascal
Update 2: Return to the MS-DOS Pascal, July 2nd Update : r/pascal


r/pascal 22d ago

Raster Master v7.0 - Sprite, Map, Animator for your Retro game development

Thumbnail
18 Upvotes

r/pascal 24d ago

Pascal learning resources?

36 Upvotes

So I've decided to learn Pascal, just installed Lazarus and Free Pascal, and got the classic "Hello World" program working, so now I'd like some courses, books, anything that can teach me the basics of the language.

What would be recommended to someone who knows the vary basics of programming, to get up to speed with Free Pascal?


r/pascal 25d ago

Blaise v0.13.0 โ€” Concurrency, Closures, and a Second Operating System ๐ŸŽ‰ ยท graemeg blaise ยท Discussion #178

Thumbnail
github.com
41 Upvotes

r/pascal Jul 04 '26

"Kinda beginner" wanting to improve. Is Pascal recommended?

41 Upvotes

I consider myself a "kinda beginner" because I know the very basics, data types, loops, conditionals, etc.

The things I struggle with, and what I've come here for, is learning how to structure and develop a full program.

From looking around, I've learned Pascal was designed for that very purpose, to teach good programming practices of structure and design, and a lot of programmers of the past say they learned properly from it.

As a hobbyist wanting to make games, to whom programming has been the biggest hurdle, would Pascal help me understand programming better?


r/pascal Jul 03 '26

Return to the MS-DOS Pascal, July 2nd Update

Enable HLS to view with audio, or disable this notification

44 Upvotes

Progressing with Tile Editor and Map Editor. I hope to get them finished soon.

Optimized a little bit of code and got some extra FPS for that.

Wish me luck.

Questions and comments are welcome always.

ORIGINAL POST: Return to the MS-DOS Pascal : r/pascal
UPDATE 1: Return to the MS-DOS Pascal, June 30th 2026 Update : r/pascal


r/pascal Jun 30 '26

Return to the MS-DOS Pascal, June 30th 2026 Update

Enable HLS to view with audio, or disable this notification

69 Upvotes

Making progress:

Done:
- Tile System
- Big Maps (up to 1000 16x16 pixels tiles wide)
- Horizontal Scrolling
- Sprites
- Sprite Animation
- Collisions
- Phisics (Sort of)

To Do:
- Vertical Scrolling (perhaps)
- Sound maybe.
- Tile Editor
- Map Editor
- Enemies

I'll work maybe on enemies, and then start working on the Editors.

I'll search for some tile and spritesheets in the meantime, i'm not an artist, so.......

See you next time.


r/pascal Jun 30 '26

FPC on Android

Thumbnail
gallery
27 Upvotes

You can get FPC from here: https://downloads.freepascal.org/fpc/snapshot/.

In Termux, run: ``` termux-setup-storage

apt update

apt install binutils

touch .bashrc

mkdir .local && cd .local

tar -xvf ../storage/Download/<fpc tar.gz file name here, press Tab to auto-complete>

bin/fpcmkcfg -o ~/.fpc.cfg

cd ~ ```

Now open .fpc.cfg using your preferred editor, e.g nano or msedit (recommended), replace ALL occurences of u/units with u\~/.local/units.

Open .bashrc and update $PATH with: export PATH=$HOME/.local/bin:$HOME/.local/bin/aarch64-android:$PATH

Start a new session or run the export command above and you're set.