GitHunt
OD

odelbos/le-cobol-2-dda-raycasting

Basic Flat Raycasting Algorithm in COBOL using DDA algorithm.

Synopsis

Basic Flat Raycasting Algorithm in COBOL. (using DDA algorithm).

It's an attemps to rewrite in COBOL the C version : Flat Raycasting in C

Note

With all my repositories, the le- prefix mean: Learning Exercise.

Install dependencies on Mac OSX:

Install GCC:

xcode-select --install
% gcc --version
Apple clang version 16.0.0 (clang-1600.0.26.4)
Target: arm64-apple-darwin24.1.0
Thread model: posix

Install Raylib and GnuCOBOL:

brew install raylib glfw gnucobol

Version:

  • Raylib 5.5
% cobc --version
cobc (GnuCOBOL) 3.2.0
C version "Apple LLVM 16.0.0 (clang-1600.0.26.3)"

Install dependencies on Linux (Debian / Ubuntu):

Install GCC (as root user):

apt-get install build-essential
gcc --version
gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0

Install GnuCOBOL (as root user):

apt-get install gnucobol
% cobc --version
cobc (GnuCOBOL) 3.1.2.0
C version "13.2.0"

Install Raylib (as root user):

apt-get install libasound2-dev libx11-dev libxrandr-dev libxi-dev \
    libgl1-mesa-dev libglu1-mesa-dev libxcursor-dev libxinerama-dev \
    libwayland-dev libxkbcommon-dev
apt-get install cmake
mkdir -p /opt/src
cd /opt/src
git clone https://github.com/raysan5/raylib.git
cd /opt/src/raylib
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=/opt/raylib-5.5 -DBUILD_SHARED_LIBS=ON ..
make
make install

In your .bashrc or .zshrc or .exports add:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/raylib-5.5/lib

Build

git clone https://github.com/odelbos/le-cobol-2-dda-raycasting
cd le-cobol-2-dda-raycasting
./make.sh

Run

./raycast

Languages

COBOL90.1%C5.5%Shell4.3%

Contributors

Created May 2, 2025
Updated May 2, 2025