โ† Back to news

A 3D voxel game engine written in APL

github.com|117 points|10 comments|by sph|Jun 21, 2026

๐ŸงŠ avoxelgame: A 3D Voxel Engine in APL

This project is an experimental 3D voxel game engine developed by namgyaaal, utilizing the unique capabilities of Dyalog APL and SDL3.

"This started off as a bet with myself that APL notation would provide an easier way to make a voxel game."

Voxel Game Placeholder


๐ŸŽฎ Game Controls

Navigating the voxel world is handled via the following inputs:

  • Movement: W-A-S-D
  • Verticality: Space to jump
  • Perspective: Use the Mouse to rotate the camera
  • System:
    • Q: Exit the application
    • I: Toggle the display of rendering statistics
    • L: Lock/Unlock the cursor
  • Special Modes:
    • F: Enable fast noclip mode
  • Building: Keys 1 through 5 to switch between different block types for placement.

๐Ÿ› ๏ธ Technical Requirements

To get the engine running, you will need the following environment:

RequirementSpecification
LanguageDyalog APL 20.0
CompilerA standard C Compiler
Build ToolCMake
Graphics APIVulkan, Metal, or DirectX 12
Librariessdl3, sdl3_ttf, and sdl3_image

๐Ÿš€ Installation & Setup

๐Ÿง MacOS & Linux

Follow these steps to initialize the project:

  • Clone the repository.
  • Install the required dependencies.
  • Build and install the LSE (Language Support Extension).
make
make install

Note: This process places libLSE.dylib (macOS) or libLSE.so (Linux) into the ./libs/ folder alongside SDL3 files.

To launch the game, execute: ./main.apls

[!IMPORTANT] If you encounter issues with the shebang in main.apls, verify the location of dyalogscript using which dyalogscript and update the path accordingly.

๐ŸชŸ Windows

Windows setup is slightly more complex. It is recommended to use cmake-gui to link the SDL3 development libraries found in the official libsdl3 releases.

Alternatively, you can use the pre-compiled .dll files provided in the releases and place them in the ./libs directory.

To play via a Dyalog session:

]cd ROOT DIRECTORY
] link .
Play

๐ŸŽจ Shader Management

The engine uses GLSL shaders located in ./shaders/glsl. While pre-compiled shaders are included, you can customize them by editing the GLSL source and running the compilation script:

./compile_shaders.sh

Dependencies for shader compilation:

  1. DirectX Shader Compiler
  2. glslc
  3. spirv-cross

๐Ÿ“Š Project Analysis

Build Pipeline

Language Composition

The codebase is predominantly APL, with supporting C and GLSL code. The distribution is roughly:

APLโ‰ˆ83.3%Cโ‰ˆ11.4%GLSLโ‰ˆ2.4%Otherโ‰ˆ2.9%\text{APL} \approx 83.3\% \quad \text{C} \approx 11.4\% \quad \text{GLSL} \approx 2.4\% \quad \text{Other} \approx 2.9\%


โš ๏ธ Current Status & Credits

  • Known Issues: Smooth performance on Windows โ†’\rightarrow There are currently significant performance regressions on Windows that are being addressed.
  • Assets: A huge thank you to Madeline Vergani (@RubenVerg) for providing the textures.
  • License: This project is released under the MIT License.