I program in C++ but what I wanted to do was a 2d game with FreePascal... Is it possible?
Yes, of course you can create 2D even 3D games using Free Pascal. Pascal syntax is easy to understand, I believe you will find doing games in Pascal is easier than in C++.
Have you consider to use
Lazarus? Lazarus is a combination of Free Pascal Compiler + a powerful IDE + some useful units. It is a powerful combination to create games and GUI applications.
The documentation for doing games in Pascal is rare to find. Most of them only explain a small topic in game programming.
If you are new in Lazarus and interested to learn about some basic graphics tricks, try this:
https://wiki.freepascal.org/Portal:HowTo_Demos#GraphicsIf you want to see some simple games created using Lazarus/FPC, here:
https://forum.lazarus.freepascal.org/index.php/topic,35313.0.htmlAnd this is the game portal for Lazarus/FPC:
https://wiki.freepascal.org/Portal:Game_Development