In this repository i try to port DOOM to Free-Pascal using OpenGL and therefore beeing platform indipendant.
!! Attention !!
This is a work in progress, the game is already playable, but not everything is ported. Its highly recommended to play with debugger and Lazarus-IDE. If you get a "Port me." exception, you reached the end of the actual porting progress.
The original code was released by id-Software unfortunatunelly i was not able to get the code compiled, so i decided to use the crispy-doom version as base (as this one directly compiled and was able to start and play the .wad files i have had laying around).
Also i found some usefull documentations that try to explain the code:
- https://fabiensanglard.net/doomIphone/doomClassicRenderer.php
- https://doomwiki.org/wiki/Doom_source_code
- https://doom.fandom.com/wiki/Doom_source_code
- https://doom.fandom.com/wiki/Doom_source_code_files
- https://www.youtube.com/watch?v=cqL3jvlU61c&themeRefresh=1
There is already a FPC Doom on the List of ports, but that version only supports DirectX and therefore only supports Windows platform.
-
install Lazarus-IDE
-
install package LazOpenGLContext (is shipped with lazarus)
-
download dglOpenGL.pas and store it in the units folder
-
download bass and store bass.pas in the units folder
o Windows users:
- copy bass.dll into root folder
o Linux users:
- copy libbass.so to /usr/lib
- chmod o+r it
- get a valid .wad file and copy it where the binary is beeing created (or use this shareware version)
- read carefull the above hint and see section progress
- Download and install bass (see What needs to be done to compile the code)
- start the application (at best using the Lazarus IDE)
As this section is not interesting for everyone i extracted this into a separate section lessons learned. Furthermore there are some special points when porting a "old" DOS application to a modern "Linux/Windows" application, which i handle in the section DOOM vs. LCL.
As i am not doing a 100% source port but more a port for me and my education (or personal needs), FPC DOOM will not be like Vanilla DOOM and even not like Crispy DOOM. To See the differences look here.
- Replaying of demo's does not work because the time is "glichting" away during simulation
- not really a bug, but savegames are not onderstood, thus atm not available.