r/pascal Jan 21 '23

mod volunteers?

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 5h ago

WFC (wave function collapse) & CGE Demo

Upvotes

several years ago I was working on _my version_ of the wave function collapse algorithm. I saw some issues with the reference that I wanted to try and solve, and I thought introducing a _pass system_ which would allow for a multi-pass workflow (ie. lay terrain first pass, foliage second etc..) while respecting constraints would be useful for a wide range of problems (back then I thought it would be neat for music and put out a video of a prototype https://www.youtube.com/watch?v=QLTQsu6QMwc)

Anyway, I never finished things up to where I would've liked (work, life, kids etc...) but now we agents...

so my WFC library got an overhaul (to say the least). I'm keeping everything at MIT so free game to use it however (I burned a lot of tokens so hopefully someone other than myself finds this interesting)

https://github.com/mr-highball/wfc

there's multiple demos there, but they're repo centric and I wanted to see what an agent could do with the library. it's idea was to make a factory style game where the supply lines were solved by wfc. it seemed 'ok' but I guided it along the way (mostly keeping it's ideas, while introducing some style choices). I play tested a few times and requested changes, additions, etc... (ie. the boombox and use of WFC for auto generation of music was my request) starting _yesterday_ and did a last pass today and think it's functional enough for a demo (start to finish less than 24hrs)

repo:

https://github.com/mr-highball/AutoForge

Playable Demo - hosted on github pages:

https://mr-highball.github.io/AutoForge/


r/pascal 22h ago

VertexArt - Wave

Enable HLS to view with audio, or disable this notification

Upvotes

Pure Free Pascal 3.2.2 / GLFW3 / OpenGL 3.3 / DOD


r/pascal 1d ago

Pascal to Wasm module - a simple tutorial

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 2d ago

Thank you! And launching the monthly Modern Pascal News Roundup

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 1d ago

VertexArt - memory cubes with ply objects

Enable HLS to view with audio, or disable this notification

Upvotes

Free Pascal 3.2.2 / GLFW3 / OpenGL 3.3 / DOD


r/pascal 3d ago

We’re building Pascal support for JetBrains IDEs

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 4d ago

Porting a JavaScript game to Pascal

Enable HLS to view with audio, or disable this notification

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 4d ago

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

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 4d ago

VertexArt - Bomberman 3D Demo ( ply versio )

Enable HLS to view with audio, or disable this notification

Upvotes

Pure Free Pascal 3.2.2 / GLFW3 / OpenGL 3.3 / DOD


r/pascal 4d ago

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

Enable HLS to view with audio, or disable this notification

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 (MinXMaxX, 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:

Darab Szín RGB
I Cián (0, 255, 255)
O Sárga (255, 255, 0)
T Lila (128, 0, 128)
S Zöld (0, 255, 0)
Z Piros (255, 0, 0)
J Kék (0, 0, 255)
L Narancs (255, 165, 0)

r/pascal 5d ago

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

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 5d ago

VertexArt - Tetris

Enable HLS to view with audio, or disable this notification

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 5d ago

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

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 6d ago

VertexArt - Bomberman mini Demo

Enable HLS to view with audio, or disable this notification

Upvotes

r/pascal 7d ago

VertexArt - Platformer framework test (3 demos)

Enable HLS to view with audio, or disable this notification

Upvotes

platformer demo, Doodle Jump, Plinko


r/pascal 7d ago

DEFRAG_M (Amaze Clone)

Enable HLS to view with audio, or disable this notification

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 10d ago

VertexArt - Space Invaders - Tech Demo

Enable HLS to view with audio, or disable this notification

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 12d ago

VertexArt - Space Invaders Demo - almost finished Tech Demo

Enable HLS to view with audio, or disable this notification

Upvotes

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


r/pascal 12d ago

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

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 13d ago

A DOS-era game running in the browser

Post image
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 14d ago

VertexArt - Space Invaders / Memoria cubes - explosion effect

Enable HLS to view with audio, or disable this notification

Upvotes

r/pascal 15d ago

VertexArt - Space Invaders - opponents flee

Enable HLS to view with audio, or disable this notification

Upvotes

r/pascal 15d ago

VertexArt - MemoryBoxes 6x6

Enable HLS to view with audio, or disable this notification

Upvotes

never enough development...


r/pascal 16d ago

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

Enable HLS to view with audio, or disable this notification

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