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.
Please report bugs on this repository's issues page!
This is designed to be built with MetaMan's Garry's Mod and Source SDK headers.
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.
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.
The --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:
--luahotloading
, which will add a dangerous function that can read any file without restrictionsEnjoy!
P.S. fair word of warning:
IGNORE THIS.
We generally don't depend on garryFuncs:tm:
You should be good to completely override includes/init.lua
, as long as the stock luajit 5.1 funcs aren't modified, and a version of the hook
and timer
libraries is available for use.
use gm_voxelate:RegisterSubEntity(className,classObj)
and it will internally extend the VoxelEntity class
extend voxel_entity
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