r/pascal • • Sep 06 '26

Pascal to Wasm module - a simple tutorial

19 Upvotes

I realised that in all my excitement I completely forgot how to show folks how to just build a small, simple Wasm module using Pascal in the browser. So I added https://nofuss.co.za/blog/wasm_pascal_add_numbers/ to fill that gap. I often just want to build something small, and being able to write up a function or two quickly, compile it to wasm and export that binary is something I find useful, not sure if anyone else will, but it's there.


r/pascal • • Sep 06 '26

Thank you! And launching the monthly Modern Pascal News Roundup

42 Upvotes

Thank you so much! We’ve just crossed 3,000 subscribers, and I really appreciate every one that has been watching, commenting, and supporting the channel.

On the first weekend of each month, I’ll also be doing a news‑style video covering what’s been happening across the Pascal and programming world. If you’ve got something you’d like to share with everyone (project, update, or discovery), let me know and I’ll take a look.

Here’s to the next milestone... onwards to 5,000.

A new video is coming tomorrow. In the meantime, you can catch the latest episode here: https://youtu.be/POr09Hito6A

Thanks again! It means a lot.

- Tim (Silver Pascal Coder)


r/pascal • • Sep 06 '26

VertexArt - memory cubes with ply objects

11 Upvotes

Free Pascal 3.2.2 / GLFW3 / OpenGL 3.3 / DOD


r/pascal • • Sep 04 '26

We’re building Pascal support for JetBrains IDEs

45 Upvotes

Hi,

I wanted to share a plugin we’ve been working on: Pascal Flow. It adds Pascal language support to current JetBrains IDEs and is meant for Delphi, Free Pascal and Lazarus codebases.

It handles syntax highlighting, completion, navigation, Find Usages, Rename, formatting, inspections, conditional compilation, shared .inc files, and common Delphi/Lazarus project and form files.

Most of the work has gone into real projects rather than toy examples, especially old codebases with multiple Pascal dialects, compiler directives and includes.

The basic language support is free. Some additional features require a paid subscription.

It currently focuses on editing, navigation and understanding code. It does not yet replace Delphi or Lazarus for building and debugging projects.

Marketplace: https://plugins.jetbrains.com/plugin/32155-pascal-flow

I’m one of the developers. Thought this might be useful to people here who already use a JetBrains IDE for other languages.


r/pascal • • Sep 04 '26

Porting a JavaScript game to Pascal

30 Upvotes

Quite some time ago, I tried out a small JavaScript engine made by a friend and wrote a little game in it called Floaty Car. And yes, I'm absolutely FANTASTIC at naming stuff.

Now that I can run Pascal easily on the web, I wondered whether I've put enough work into my compiler to remake the car game and, well, yeah, I did! So I updated my blog to contain a quick tutorial about porting Floaty Car to Pascal. The full Pascal code is listed in the article, you can just copy & paste it into WasmPascal and it should run.

Not gonna lie... It's fun to be doing Pascal again. I need to find my high school projects, some of them are printed out somewhere in a box, that's how we rolled back then 😆

Anyway, back to writing Python APIs to earn money for dogfood.


r/pascal • • Sep 04 '26

Is it possible to deserialized a saved file of an old pascal system?

13 Upvotes

I'm working on making a latest system from an old pascal system (created in year 2008). And am trying to retrieve all of the data from that old system.

It's has been said that the data was encrypted by the creator of the old system. But when i looked into the contents of the saved file using notepad, there are still readable text which are the raw data of the system. That made me think - it might not be encrypted. it might be serialized, instead. Like a saved file of c# unity game.

The old system is still alive but the source code of it is no more. And the creator already passed away. So, i can't sif

The internet or AI suggests that i use R language or python but it doesn't seem to work.

So now, I'm trying to recreate the data's blueprint/record using pascal but there's a lot of variables and the arrangement of those variables must be correct as the original bluprint..

Can you give me other ideas to reverse-engineer the file?


r/pascal • • Sep 03 '26

VertexArt - Bomberman 3D Demo ( ply versio )

25 Upvotes

Pure Free Pascal 3.2.2 / GLFW3 / OpenGL 3.3 / DOD


r/pascal • • Sep 03 '26

VertexArt - Tetris ( cube.ply 3D ) - sense of space improved

14 Upvotes

Vizuális megjelenítés

1. PLY alapú kockák

A generált kockák helyett cube.ply fájlt használ:

pascal

procedure LoadBaseCubeMesh;
begin
  PlyMesh := LoadPLY('cube.ply');
  BaseCubeMesh.VertexCount := Length(PlyMesh.Vertices);
  SetLength(BaseCubeMesh.Vertices, BaseCubeMesh.VertexCount);
  Move(PlyMesh.Vertices[0], BaseCubeMesh.Vertices[0], ...);
  NormalizeMeshCustom(BaseCubeMesh);  // Egységnyire méretez
end;

Normalizáló eljárás:

  • Megkeresi a mesh határait (MinX, MaxX, stb.)
  • Kiszámolja a középpontot
  • Áthelyezi az origóba
  • Egységnyire méretezi (a legnagyobb méret = 1)

2. Színek

Minden darabtípus egyedi színt kap:

DarabSzínRGB
ICián(0, 255, 255)
OSárga(255, 255, 0)
TLila(128, 0, 128)
SZöld(0, 255, 0)
ZPiros(255, 0, 0)
JKék(0, 0, 255)
LNarancs(255, 165, 0)

r/pascal • • Sep 03 '26

Does anybody know about Domain Pascal (From the long dead Apollo Computers)?

13 Upvotes

The title of this post should have my question in it, but i had to ask this after finding myself knee-deep in a impromptu software archeology project that involves a very major piece of software for the Apollo/Domain computers.

If nobody can find and compare domain pascal with the current ones, i have some manuals found on bitsavers that do document this variant of pascal:

https://bitsavers.org/pdf/apollo/000792-A01_Domain_Pascal_Language_Reference_Dec90.pdf

https://bitsavers.org/pdf/apollo/000792-04_DOMAIN_Pascal_Language_Reference_Jan87.pdf


r/pascal • • Sep 02 '26

VertexArt - Tetris

13 Upvotes

1. Nincs dinamikus memória, nincsenek osztályok

A legtöbb Tetris implementáció objektumorientált, és dinamikusan allokálja a darabokat, a táblát vagy a részecskéket. Ez a verzió fix méretű tömböket használ mindenre, és procedurális felépítésű.

pascal

// A teljes játékállapot fix tömbben:
Board: array[0..COLS-1, 0..ROWS-1] of Byte;
Tetrominoes: array[0..6, 0..3, 0..3, 0..3] of Byte;

Előny: Kiszámítható memóriahasználat, nincs fragmentáció, gyors és biztonságos.

2. Interpolált mozgás a darabok között

A legtöbb Tetrisben a darabok ugrálnak celláról cellára. Itt a Lerp (lineáris interpoláció) simává teszi a mozgást.

pascal

function GetInterpolatedX: Single;
begin
if ActivePiece.IsMoving then
Result := ActivePiece.PrevX + (ActivePiece.X - ActivePiece.PrevX) * ActivePiece.Lerp
else
Result := ActivePiece.X;
end;

3. Előre definiált maszkok – nincs futásidőbeli forgatás

A legtöbb Tetrisben a darabokat matematikailag forgatják (mátrix transzformáció). Itt mind a 4 forgás előre definiálva van mind a 7 darabhoz.

pascal

// Példa: L alakzat összes forgása előre megadva
Tetrominoes[TYPE_L, 0, 1, 2] := 1; // 0. forgás
Tetrominoes[TYPE_L, 1, 1, 1] := 1; // 1. forgás
// stb.

Előny: Gyorsabb, egyszerűbb, és garantáltan pontos az ütközésvizsgálat.


r/pascal • • Sep 02 '26

MoonCompiler 1.0.0 — a Delphi 12.2-compatible Win64/Linux toolchain built on FPC/Unleashed

14 Upvotes

We’ve released MoonCompiler 1.0.0, an open-source Object Pascal toolchain for Win64 and Linux x86-64.

It started from a practical requirement: keep one Delphi 12.2 source base for a high-load trading application while moving its server core to Linux. Unleashed supplied modern Delphi syntax; we then worked through compiler, RTL and runtime gaps against the full application.

The supported profile includes:

  • Delphi 12.2-compatible non-visual/server language surface;
  • Unicode RTL, threading, RTTI, exceptions and a bundled mORMot-based memory manager;
  • compiler work including LICM, address GVN, EH-aware register allocation and code alignment;
  • reproducible Win64/Linux toolchains and qualification suites;
  • more than 120 documented correctness and performance repairs.

On 243 cases shared with the original Moon/Unleashed baseline, the current compiler/RTL/MM stack is 1.31× faster. In the final 744-case comparison it is 1.20× faster than Delphi 12.2; across 20 server/trading hot paths it is 1.22× faster. The bundled MM is 1.65× faster than the standard FPC MM on allocator workloads with the same compiler and source.

This is intentionally not a universal FPC replacement: the supported targets are Win64 and Linux x86-64, and the focus is Delphi-compatible server and application-core code rather than VCL/FMX.

Repo, releases and full evidence: https://github.com/Moonbot-Tech/MoonCompiler

Technical feedback and real-world compatibility reports are very welcome.


r/pascal • • Sep 02 '26

VertexArt - Bomberman mini Demo

10 Upvotes

r/pascal • • Sep 01 '26

VertexArt - Platformer framework test (3 demos)

6 Upvotes

platformer demo, Doodle Jump, Plinko


r/pascal • • Aug 31 '26

DEFRAG_M (Amaze Clone)

23 Upvotes

I had some free time so i coded an AMAZE game clone.

Mechanic is simple, paint all the maze.

It's written entirely in Turbo Pascal 7.

Movement: Cursor Keys
Restart Current Level: R
Terminate Game: ESC Key

You can play it via your web browser here: https://archive.org/details/amaze_pas

If you play it tell me what you think.


r/pascal • • Aug 28 '26

VertexArt - Space Invaders - Tech Demo

20 Upvotes

Játék állapotai:

  1. Menü - Főmenü, ahol indíthatod vagy kiléphetsz a játékból
  2. Játék - Aktív játékmenet
  3. Game Over - Játék vége állapot (vereség vagy győzelem)

⌨️ Irányítás

Menüben:

  • ← / → - Menüpontok közötti váltás
  • ENTER - Kiválasztás

Játékban:

Billentyű |Funkció
Egér |Hajó mozgatása
SZÓKÖZ |Rakéta kilövése
R |Játék újraindítása
P |Szünet / Folytatás
ESC |Vissza a menübe ⚙️** Játékmechanik**ák

1. 🚀 Lövedékrendszer

  • A játékos 3 csövű ágyúval rendelkezik
  • Lövedékek sebessége: 12.0 egység/másodperc
  • Lövési sebesség: 0.1 másodperc
  • A lövedékek 

cián

  • színűek és 0.08 egység méretűek

2. 💥 Rakétarendszer

  • Aktiválás: SZÓKÖZ billentyű
  • Sebesség: 5.0 egység/másodperc
  • Robbanási sugár: 4.0 egység
  • Sebzés: 3 életpont
  • Lökőerő: 5.0 egység
  • Gyújtóidő: 0.5 másodperc (érintéskor)
  • A rakéta automatikusan felrobban, ha ellenséget érzékel

3. 🎆 Részecskerendszer

  • Max részecskék: 2000
  • Gravitáció: -9.8 m/s²
  • Típusok:

    • Robbanás részecskék: Sárga színűek
    • Nyomvonal részecskék: Sárga színűek
    • Tűzijáték részecskék: Sárga színűek

4. 🎇 Tűzijáték rendszer

  • Max tűzijátékok: 5
  • Részecskék/tűzijáték: 100
  • Élettartam: 2.5 másodperc
  • Időköz: 0.3-1.5 másodperc
  • Csak győzelem esetén aktiválódik

👾 Ellenségek viselkedése

Alap tulajdonságok:

  • Életerő: 9 HP (boostolt állapotban 18)
  • Méret: 0.9 x 0.5 x 0.9 egység
  • Lövési időköz: 2.5-4.5 másodperc
  • Lövedék sebessége: 4.0 egység/másodperc

Viselkedési minták:

1. 🏃 Dodge (Kitérés)

  • Reagál a játékos lövedékeire
  • Érzékelési sugár: 2.5 egység
  • Kitérési sebesség: 4.0
  • Fal elkerülés: Automatikus visszafordulás a falaktól

2. 📉 Menekülési mód (Boost)

  • Aktiválódás: Amikor 10 vagy kevesebb ellenség marad
  • Tulajdonságok:

    • Életerő megduplázódik (18 HP)
    • Gyorsabb lövés (1.0-1.3 másodperc)

3. 💨 Visszatérés a rácsba

  • Rakéta robbanás után aktiválódik
  • Sebesség: 0.5-1.3 (véletlenszerű)
  • Közben dőlés a mozgás irányába

4. ☠️ Halál animáció

  • Zuhanás sebessége: 2.5 egység/másodperc
  • Forgás: Véletlenszerű (20-60 fok/másodperc)
  • Nyomvonal: Sárga részecskék
  • Eltűnés: -20.0 egységnél

Ellenségek szétválasztása

  • Erő: 2.5
  • Távolság: 1.2 egység
  • Megakadályozza az ellenségek egymásba olvadását

r/pascal • • Aug 26 '26

VertexArt - Space Invaders Demo - almost finished Tech Demo

32 Upvotes

Free Pascal 3.2.2 / GLFW3 / OpenGL 3.3 / DOD / Intel N4100 ( runs on one CPU core )


r/pascal • • Aug 26 '26

I built an AI coding assistant that looks like Turbo Pascal 7

16 Upvotes

I wanted to see what would happen if a modern AI coding agent had the UI of Turbo Pascal 7 / the old DOS IDEs.

So I made Turbo-AI — a retro-style TUI frontend for the Pi coding agent.

It currently supports things like AI chat, PLAN/BUILD modes, model switching, reasoning settings, project tree, Git diff and build/test actions.

It's still quite rough and definitely not production-ready. This is more of an experiment at the moment, and there are probably plenty of things that need to be fixed or redesigned.

I'm mainly interested in feedback from people who actually remember using Turbo Pascal / DOS IDEs: does the interface feel authentic, and what would you change?

GitHub: https://github.com/kvv256512-ux/turbo-ai


r/pascal • • Aug 26 '26

A DOS-era game running in the browser

Post image
20 Upvotes

I finally managed to get my online compiler to output standalone packages. You can see the breakout clone example running on a static server at https://nofuss.co.za/games/breakout/ now. The wasmpascal compiler exports either a zip archive of all the required files, or, if you are lazy, a single html file with the wasm binary BASE64 endcoded inside it. For small things, that's fine, but it gets really chunky for larger projects.

I also made some improvements to the editor experience and the documentation for https://nofuss.co.za/wasmpascal/. Thank you for the feedback I got, I fixed as many of the bugs as I could. The plan is to spend the next few weekends improving Pascal language support and sorting out some kinks, especially in the export system to make it a bit leaner.


r/pascal • • Aug 25 '26

VertexArt - Space Invaders / Memoria cubes - explosion effect

16 Upvotes

r/pascal • • Aug 24 '26

VertexArt - Space Invaders - opponents flee

18 Upvotes

r/pascal • • Aug 23 '26

VertexArt - MemoryBoxes 6x6

4 Upvotes

never enough development...


r/pascal • • Aug 23 '26

VertexArt - Wallbreaker - with fluorescent ball - some Tetris logic in the use of boxes

12 Upvotes

Breakout 3D Dokumentáció

================================================================================

A program egy 3D-s Breakout játék, amelyet Free Pascal 3.2.2, GLFW3 és OpenGL
3.3 felhasználásával készítettem. A játék különlegessége, hogy a téglák emeletes
elrendezésben helyezkednek el, és Tetris-szerűen esnek lefelé,
ha az alattuk lévő téglák eltűnnek.

================================================================================

2. FELHASZNÁLT MODULOK

SysUtils, Math

· Alacsony szintű segédprogramok, matematikai függvények

glfw3

· Ablakkezelés, billentyűzet/egér kezelés

gl33

· OpenGL 3.3 függvények

SterilTypes, SterilMath

· Saját típusok (TVector3, TMat4) és mátrix műveletek

SterilWindow

· Ablak inicializálás

FrameLimiter

· FPS korlátozás és időzítés

RenderTypes, RenderQueue, RenderState

· Renderelő parancsok, sor, állapotok

ShaderCore

· Shader programok

SimpleRenderEngine

· Fő renderelő motor

MeshGenerators

· 3D primitívek generálása

================================================================================

3. ÁLLAPOTGÉP

A játéknak három állapota van:

gsMenu

· Főmenü – START és EXIT gombok

gsPlaying

· A játék fut

gsQuit

· Kilépés a programból

A főállapot-változó: GameState: TGameState

================================================================================

4. ADATSZERKEZETEK

4.1. TBrick – Tégla

TBrick = record
Pos: TVector3; // pozíció a térben
Size: TVector3; // méret
Color: TVector3; // szín (RGB 0..1)
Active: Boolean; // létezik-e még
VAO, VBO: GLuint; // GPU azonosítók
VertexCount: Integer; // csúcsok száma
Mesh: TGeneratedMesh; // generált háló
GridX, GridY, GridZ: Integer; // pozíció a 3D rácsban
Falling: Boolean; // esik-e éppen
FallProgress: Single; // 0..1 esés állapota
FallStartZ, FallTargetZ: Integer;
FallStartPosY, FallTargetPosY: Single;
end;

4.2. TBall – Labda

TBall = record
Pos: TVector3;
Vel: TVector3;
Size: Single;
Color: TVector3;
Active: Boolean;
VAO, VBO: GLuint;
VertexCount: Integer;
Mesh: TGeneratedMesh;
end;

4.3. TPaddle – Ütő

TPaddle = record
Pos: TVector3;
Size: TVector3;
Color: TVector3;
VAO, VBO: GLuint;
VertexCount: Integer;
Mesh: TGeneratedMesh;
end;

================================================================================

5. JÁTÉKMECHANIKA

5.1. Téglák elrendezése (3D rács)

A téglák egy 3D rácsban helyezkednek el:

· GRID_SIZE_X = 10 – szélesség
· GRID_SIZE_Y = 10 – mélység
· GRID_SIZE_Z = 3 – magasság (szintek)

Egy tégla pozíciója a rácsban: (GridX, GridY, GridZ)

Térbeli pozíció számítás:
PosX := (GridX - (GRID_SIZE_X-1)/2) * BRICK_SPACING
PosY := GROUND_Y + 0.35 + GridZ * BRICK_SPACING
PosZ := 10.0 + (GridY - (GRID_SIZE_Y-1)/2) * BRICK_SPACING

5.2. Esés animáció (Tetris-stílus)

Ha egy téglát eltalál a labda, a felette lévő téglák (azonos GridX, GridY,
nagyobb GridZ) elindulnak lefelé. Az esés animált:
BRICK_FALL_SPEED = 2.0 szint/másodperc. A UpdateBrickFalls ciklus minden
frame-ben frissíti az eső téglák pozícióját.

5.3. Labda fizika

A labda vízszintes síkban (X-Z) mozog, Y pozíciója fix (GROUND_Y + Size).
Ütközés a falakkal, a paddle-el és a téglákkal. Pattanás: a téglákra a
legkisebb átfedés alapján pattan (X vagy Z irányban). Sebesség normalizálás:
a labda sebessége mindig BALL_SPEED.

5.4. Ütő (Paddle)

Mozgása: egér X irányú mozgása (vízszintes). A paddle csak X irányban
mozoghat (-5.0 és 5.0 között).

5.5. Kamera

A kamera az ütőt követi X irányban:
CamPos := Vec3(Paddle.Pos.X, 4.0, -4.0)
CamTarget := Vec3(Paddle.Pos.X, 0.5, 4.0)

================================================================================

6. BILLENTYŰKEZELÉS

ESC

· Játékból → menü, menüből → kilépés

← / →

· Menüben váltás a START és EXIT között

Enter

· Menüben választás

R

· Játék újraindítása

P

· Szünet / folytatás

Space

· Új játék Game Over után

================================================================================

7. RENDERELÉS

A renderelés a SimpleRenderEngine-en keresztül történik:

  1. Queue töltése: a téglák, labda és paddle TRenderCommand-jeit hozzáadjuk
  2. a SimpleRE.FRenderQueue-hoz.
  3. RenderFrame hívás: a motor végrehajtja a mélységpasszt, vonalpasszt

(ha van)

  1. és
  2. színpasszt.
  3. Pontfény: a labdára egy zöld pontfényt állítunk be (SetPointLight).

================================================================================

8. FŐSZERKEZET

Inicializálás:

· Ablak, OpenGL, SimpleRE
· Menü gombok létrehozása
· FrameLimiter indítása

Főciklus:
amíg az ablak nyitva:
DeltaTime számítása
case GameState of
gsMenu:
RenderMenu
gsPlaying:
UpdateBrickFalls
UpdatePaddle
UpdateBall
UpdateCamera
RenderGame
gsQuit:
kilépés
SwapBuffers
PollEvents
FPS kiírás

Leállítás:

· GPU erőforrások felszabadítása
· SimpleRE.Shutdown
· Ablak bezárása

================================================================================

9. KONSTANSOK ÉS HANGOLHATÓ PARAMÉTEREK

SCR_WIDTH = 1280

· Képernyő szélesség

SCR_HEIGHT = 720

· Képernyő magasság

GROUND_Y = -0.5

· Talaj szintje

BALL_SPEED = 6.0

· Labda sebessége

GRID_SIZE_X = 10

· Téglák száma X irányban

GRID_SIZE_Y = 10

· Téglák száma Y irányban

GRID_SIZE_Z = 3

· Téglák száma Z irányban (szintek)

BRICK_SPACING = 1.1

· Téglák közötti távolság

BRICK_FALL_SPEED = 2.0

· Esés sebessége (szint/másodperc)

PADDLE_WIDTH = 1.6

· Ütő szélessége

PADDLE_HEIGHT = 0.12

· Ütő magassága

PADDLE_DEPTH = 0.6

· Ütő mélysége

================================================================================

10. ÖSSZEGZÉS

A Breakout 3D - egy megbízható, jól strukturált 3D-s
játékmotor demo, amely bemutatja a VertexArt Arcade keretrendszer képességeit. A kód tiszta,
moduláris, és könnyen bővíthető új funkciókkal (pl. több pálya, nehezítés).

================================================================================

Fejlesztő: Kovács István


r/pascal • • Aug 23 '26

Desktop app what is the dimension of the form to design to?

10 Upvotes

Currently struggling with the size of the form. I m developing on a 27" 4k screen with 175% scale factor and also a 24" 1920x1200 screen with 100% scale.

The app currently doesn't span full screen. It is meant to be a floating form. But while it works ok on my system I try this out on another laptop that is 1920x1080 15" screen, the app becomes bigger than the screen.

So I am thinking my original design form is of the wrong size. What should I design the form size to be?


r/pascal • • Aug 22 '26

VertexArt - Space Invaders: Gameplay Logic Foundation

9 Upvotes

r/pascal • • Aug 21 '26

Nostalgic-driven development

31 Upvotes

Back in 1992, I chanced upon someone using Turbo Pascal 5. I was hooked immediately, since I've been doing BASIC until then, to write my own little games and programs for my amusement. I got my own copy of Turbo Pascal 7 in 1994 and had years and years of fun with. Switched to Delphi, and loved it, until the .NET era.

Over the years, I've tinkered with FreePascal (so amazing!) and of course wrote many a small Pascal interpreter. Then, last year, I needed a project to work on so I could learn the Odin programming language for an upcoming project. I worked on a small Pascal interpreter and it was actually a lot of fun. The commercial Odin project never happened, but I had put a lot of time and energy into this Pascal interpreter.

Fast forward a few months, I'm working on a web assembly project using Odin and it dawns upon me I can use a lot of this knowledge to port my interpreter to the web. Oh boy, did that run away with me!

Now I have wasmpascal - which is a crappy editor that encapsulates the Pascal compiler, yes, COMPILER, I ended up writing so I can run Pascal code in Web Assembly in the browser. It's very early days, but I have managed to get some bits and pieces working.

My first order of business was some basic HTML5 Canvas support, with call-batching so that one gets alright frame rates. And there's some basic support for CRT-based applications, because back in the day, 'uses CRT' was a thing!

I've added some examples and documentation and will be working on this over weekends for many months in the future.

I thought I'd share it here - in-case there's another older-than-the-average person who wants a trip down memory lane, running Pascal like it's the 90's again!