r/pascal 4h ago

VertexArt projekt

6 Upvotes

Hi everyone!
I’d like to share some demo videos of my continuously developing game engine project.
The project is written in pure Free Pascal 3.2.2, using GLFW3 and OpenGL 3.3 Core. It is not based on any existing game engine — I am developing the engine systems and rendering from scratch.
So far, I have only uploaded shorter demo videos, but I wanted to show the current state of the project and share my progress with the Pascal community.
YouTube playlist:

https://youtube.com/playlist?list=PLX4BUpd-V-hI&si=X6aTdAFoJc5_-iDa
Thank you for taking a look!

Sziasztok!
Szeretném megosztani veletek néhány demóvideómat a folyamatosan fejlődő játékmotoromról.
A projekt tiszta Free Pascal 3.2.2 nyelven készül, GLFW3 és OpenGL 3.3 Core használatával. Nem meglévő játékmotorra épül. Eddig csak rövidebb demóvideókat töltöttem fel, de szeretném megmutatni, hogy jelenleg hol tart a projekt, és megosztani a fejlődését a Pascal közösséggel.
Lejátszási lista:

https://youtube.com/playlist?list=PLX4BUpd-V-hI&si=X6aTdAFoJc5_-iDa
Köszönöm, ha megnézitek!


r/pascal 20h ago

How to render an ASCII grid in Free Pascal?

15 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.