Skip to content

glua/gm_voxelate

Repository files navigation

gm_voxelate

forthebadge

Welcome to the home of gm_voxelate, the configurable voxel module for Garrysmod.

Links

More Information (Facepunch Thread)

Development Plan (Trello)

Documentation

See the wiki in the sidebar.

Bugs

Please report bugs on this repository's issues page!

Building

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.

Windows: Should just work.

Linux: Should just work?

Mac: Unknown, probably similar to Linux.

The test_install scripts are for quickly copying the binaries into directories on my systems, and are probably broken right now.

Technical details for using this in a gamemode

Required libraries/dependencies

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.

Sub entities

Voxelate engine based

use gm_voxelate:RegisterSubEntity(className,classObj) and it will internally extend the VoxelEntity class

Source engine based

extend voxel_entity

note: both the voxelate engine and source engine entities are mutually exclusive: you may only use one type at a time.

Testing/Debugging

Lua Hotloading

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:

  1. install gm_luaiox (kindly provided by MetaMan)
  2. compile gm_voxelate with the premake trigger luahotloading, which will add a dangerous function that can read any file without restrictions

Enjoy!

P.S. fair word of warning: warning

Used In

gm_f1atgrass - Testbed for the module