The render distance in Cube World is quite limited, and there is a technical reason for it. Cube World is 32-bit, which limits the amount of memory it can address, and render distance needs memory to load the world.
The vanilla Cube.exe can allocate only up to 2 GB of memory. This is already a
tight budget, so this mod can only add 10% more render distance without risking
a crash.
This is where LAA-patching comes into play. With large-address aware, 32-bit
executables can use up to 4 GB of memory instead. Cube World does not set this
LAA flag, but it seems to be able to handle such addresses without any issues.
See Patching on how to patch your Cube.exe. With this patch, the
mod can add up to 90% more render distance.
The render distance controls in the options still work as usual, but the mod
rescales them. On startup, the mod checks if Cube.exe was LAA-patched and
picks its upper limit accordingly: without the patch, 100% in the options
corresponds to about 110% of the vanilla render distance, and with the patch,
to about 190%.
The same view in vanilla and with the mod on an LAA-patched Cube.exe.
Everything that fades into the blue fog in vanilla stays visible: the mountains on
the left, the village on the right, and even the reeds by the river.
Warning
This mod tries to use as much memory as possible for more render distance while still maintaining enough headroom for other things. Despite testing and safety margins, running out of memory is still possible, which can cause severe stuttering and eventually crash the game. Reducing the render distance in the options to 50% or lower will likely help. For a patchedCube.exe, 50% render distance still results in a +60% render distance compared to vanilla, because this option is not a view distance, but a budget for an area, so the distance shrinks more slowly than the percentage.This is especially relevant when using translation layers like DXVK or any OS compatibility layers like Wine, because each of them adds their own memory footprint as overhead and reduces the headroom we take advantage of.
This mod is for the alpha build of Cube World.
Patching is entirely optional, but it greatly increases the effect of the higher render distance.
- download the
laa.ps1andpatch.batfiles from the releases - put
Cube.exeand both files into the same directory - run the
patch.batby double-clicking- a terminal window opens and should tell you
LAA flag setwhen successful
- a terminal window opens and should tell you
- close the terminal window by pressing any key
- copy the
Cube.exeback to your game directory if necessary
Your Cube.exe is now patched, and your original file was copied to
Cube.exe.bak. laa.ps1 and patch.bat are not needed anymore and can be
deleted.
Note
You can also use any other LAA patcher if you prefer to do so. Especially on Linux, where.batand.ps1cannot be used out of the box. If you have PowerShell installed, you can usepwsh laa.ps1 <path-to-Cube.exe>instead.
- requires coremaze Cube-World-Mod-Launcher
- unpack Mod Launcher in the game directory
- put
RenderDistanceMod.dllintoMods - start the game via
CubeModLauncher.exe
Requires a compiler that targets 32-bit Windows. Run make in this directory
and specify the compiler as CXX variable if necessary (e.g.
make CXX=i686-w64-mingw32-g++).
