Welcome to the home of gm_voxelate, the configurable voxel module for Garrysmod.
NO EXTERNAL LINKS RIGHT NOW. A NEW FACEPUNCH THREAD WILL BE CREATED FOR VERSION 0.3.0.
See the wiki in the sidebar.
DOCS ARE CURRENTLY OUTDATED. API SUBJECT TO CHANGE AND WILL BE STABILIZED IN VERSION 0.4.0.
❓Shaders not tested.
❓Shaders not tested.
Please report bugs on this repository's issues page!
It requires a compiler/runtime that supports C++11, which can cause problems on older linux systems.
YOU SHOULD PROBABLY JUST DEBUG ON RELEASE BUILDS BECAUSE THE DEBUG SETTINGS ARE A BIT AGGRESSIVE AND MAKE THIS RUN SLOW AS BALLS AND I HAVN'T BOTHERED TO FIX IT.
THIS GUIDE IS WINDOWS-ONLY. SETTINGS IN THIS GUIDE ARE NOT IDEAL FOR RELEASES.
- Clone this, garrysmod_common, and sourcesdk-minimal into the same directory.
- Get a recent build of premake5 and put it in your path. Official builds may not be new enough. Contact us if you have issues with this...
- Run "gm_voxelate/projects/setup.bat". If you want to use something other than VS2017, just change that part of the command.
- Run the shader install script in the repo's root directory.
At this point you should have working VS projects to build the modules with. Upon build, modules will automatically be copied to your garrysmod directory, assuming it is in the default place on the C drive.
If you want lua hotloading, make a
.vox_hotloading file as described in that section.
--autoinstall flag can be passed to premake to automatically copy binaries to the garrysmod directory on each build. Only supported on windows. Assumes the gmod directory is "C:\Program Files (x86)\Steam\steamapps\common\GarrysMod\garrysmod".
This module needs to load custom shaders. Fortunately, compiled shaders are shipped with the module. Unfortunately, they still need to be copied to the garrysmod directory. You can either run "install_shaders.bat", which assumes that the gmod directory is the same as above, or manually copy the shaders from "source/shaders/shaders" to "Garrysmod/garrysmod/shaders".
If you actually want to build shaders, follow the instructions in "source/shaders/readme.txt".
Right now, the Lua portion of gm_voxelate is compiled into the DLL, and is unmodifiable at runtime. This can get quite annoying during extended sessions of modifying the Lua portion of gm_voxelate exclusively. As such, you may enable lua hotloading to ease the burden of development and debugging, which directly reads files from the OS filesystem and loads them into Lua.
Hotloading can be enabled by creating a file in GarrysMod/garrysmod/data with the name
.vox_hotloading, whose contents is the path to the
lua folder in this repo. NO NEWLINES, NO TRAILING SPACES!
Secondly, you will either:
- install gm_luaiox (kindly provided by MetaMan)
- compile gm_voxelate with the premake trigger
--luahotloading, which will add a dangerous function that can read any file without restrictions
Technical details for using this in a gamemode
We generally don't depend on garryFuncs
includes/init.lua, as long as the stock luajit 5.1 funcs aren't modified, and a version of the
timer libraries is available for use.
Voxelate engine based
gm_voxelate:RegisterSubEntity(className,classObj) and it will internally extend the VoxelEntity class
Source engine based
note: both the voxelate engine and source engine entities are mutually exclusive: you may only use one type at a time.
gm_f1atgrass - Testbed for the module