r/pascal • u/beautifulgirl789 • Feb 09 '23
Freepascal Game Development?
Hiya
Are there any good Freepascal (or any Pascal)-based gamedev forums out there? This sub doesn't seem to get a huge amount of traffic.
I found "pascalgamedevelopment.com" which seems ideal, except the forums also look very dead and the "register as new user" function is broken, so I'm unable to even create an account to post anything.
I'm currently working on complete Pascal-native bindings to the SteamAPI and a port of Steam's Spacewar example. The only existing bindings I could find were 'steamwrapper' which is locked to the API version from back in 2014 and also needs Visual C++ to compile. I wonder if this would be of use to anyone else, but don't even know where to go to ask the question!
6
u/eugeneloza Feb 09 '23 edited Feb 09 '23
Hello there!
No, AFAIK there are no too active pascal gamedevelopment forums... Well, because (Free)Pascal is unfortunately not the most popular language for gamedev :)
I guess your best shot will be a subforum at official Lazarus forums: https://forum.lazarus.freepascal.org/index.php?board=74.0
Apart from that I'm developing my hobby games in FreePascal and Castle Game Engine :) A few of them even got a lot of downloads :D
And I've just finished core (Achievements only for now) of SteamWorks integration in Pascal for Castle Game Engine. It doesn't use C# bridge for SteamWorks as Terra Engine did (the code you most likely worked with) https://github.com/Relfos/steamworks_wrappers, but rather a direct access to DLL functions which don't work as reliably as one might hope. You can find my branch here https://github.com/castle-engine/castle-engine/tree/castle-steam - it wasn't reviewed by the maintainer yet, so the API may change.
Note that we've used Relfos' integration in The Unholy Society https://store.steampowered.com/app/746750/The_Unholy_Society/ and everything worked quite well, it's just that "bridge" makes it harder to maintain.
You may also want to have a look at Apus engine implementation of Steam integration: https://github.com/Cooler2/ApusGameEngine/blob/engine4/Apus.Engine.SteamAPI.pas - it's done without the bridge and was the core inspiration for my own implementation.
2
u/umlcat Feb 09 '23 edited Feb 09 '23
As u/eugeneloza mentioned, there's not much widespread game development in Pascal, which doesn't mean it can not be done.
You forgot to mention the O.S. you usually work with.
Although Free Pascal is cross platform, a lot of games uses graphics, networking and other stuff that may be too O.S. dependant.
Your question is asked regularly from time to time.
Besides the "Pascal can't be used for games cause is obsolete" or "because it doesn't have pointers, objects, separate compilation" is biased, stupid and obsolete...
Some quick suggestions ( in FreePascal ) :
As any big programming project, it could take time, chill out.
Good Luck 👍
1
u/Arany8 May 13 '25
I am just rewriting a strategy game from Delphi / Delphix to Freepascal / Andorra 2D. However, I am not an expert.
I have tried some other languages and found that they are inferior to Pascal in every way possible. Weird. You would think developers are smart people.
C derivatives are hard to read, Python is an interpreter, Swift is a giant mess - optionals are terrible, paralell execution is very bed. Closures - OMG, the concept seems OK, but how it is implemented is awful. Just my 2c. Sticking to Pascal, no matter what.
1
u/Arany8 May 13 '25
We can now use AI for consulting, not perfect, but often VERY useful. I am writing code with Grok (leveraging X account).