Getting started
Supported platforms
Officially supported are Linux and Windows. In theory it should also work on OSX but I couldn't verify this yet. It should also be possible to use the engine on mobile devices such as Android in the future but currently the code is not OpenGL ES compatible. There won't be a web target anytime soon because it would require too many changes in the code base.
Download
For cloning the repository you need the git utility. For installation instructions refer to https://git-scm.com/. Assuming you have installed git you can clone the repository using the following command:
git clone https://github.com/soerensen3/pascal3d.git
Info
Alternatively, if you do not want to install git, you can follow the link, use the Clone or download button and download as zip file.
Dependencies
SDL2
Pascal3D uses SDL2, which is an open source cross platform media library. It offers low level access "to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL". You can get SDL2 from the repositories (Linux) or from here (Windows, OSX):
Linux
Install sdl2, sdl2-ttf, sdl2-image including developer version in some distros (Fedora, Ubuntu, ...) using your package manager.
Windows
Download the files from above and copy them to the system32 folder or to the target folder of each application you want to compile.
OSX
Download the files from above and install the dmg files.
Lazarus
Lazarus is a cross platform RAD-IDE for Free Pascal. If you do not know Lazarus/Free Pascal you should probably start reading about it first. You can download Lazarus from Lazarus Official Website or (Linux) from the repositories of your distro. These websites offer a simplified installer suitable for all platforms: fpcupdeluxe and getlazarus.
Pascal3D Math
For Pascal3D you need the pascal3d_math library which is an extra repository. Simply go to the directory of your choice and execute this command or download as zip following the link.
git clone https://github.com/soerensen3/math3d.git
dglOpenGL and SDL2 Headers
Pascal3D comes with dglOpenGL because the original version did not have a package. Apart from that the files are unchanged. You can download the original version from here. The same applies to the SDL2 Headers by Tim Blume which are downloadable from here.
Building from source
Register the packages
Before you can compile any Pascal3D you have to first register the packages in Lazarus. You can do this by opening the packages in the IDE. You need to open the following packages:
- <pascal3d_math package>
- ./external/dglopengl/pl_opengl.lpk
- ./external/libsdl2/libsdl2.lpk
- ./src/pascal3d.lpk
- ./src/p3dgui/pascal3d_gui.lpk
Compiling
The easiest way is to open the project in Lazarus and compile there. You can however also compile from commandline using lazbuild. You will find the project for the official p3dscene editor in ./editor/p3dscene.lpi
Todo
- A lot of bugfixing - Making pascal3d more stable
- Add shadow maps
- Add octrees