Skip to content

scuroinside/snippets

Repository files navigation

Snippets

A collection of useful (or useless) snippets for lua and GLua. All attached scripts are developed by me and are distributed under the MIT license. Cheapblur, Netvar, Task, Navmesh, PData scripts are part of ASGLib for Garry's mod. Documentation is largely identical to Crime 2.0 and is available here https://scuroin.gitbook.io/krume-20/

cheapblur.lua

This is a snippet to provide you with a cheap blurring method for your interfaces in Garry's Mod.

cipher.lua

Implementation of encryption based on custom random number function

netvar.lua

Library that providing customizable and fast network variables for tables and entities in Garry's Mod.

simplexnoise.lua

Translations of Ken Perlin's Simplex Noise to Lua (Basicaly used for generating landscape in Garry's Mod, but the lighting of the meshes was completely unusable)

task.lua

Simple module thats allow you to delay some not-so-needed actions in Garry's Mod. (Used for lazy initialization, sequential execution of heavy methods, and avoids me from throttling)

urlmaterial.lua

Simple snippet thats provides you to load web images as material without precache it to hard drive in Garry's Mod.

pdata.lua

sql extension and pdata replacement for custom gamemodes in Garry's Mod.

navmesh.lua

Implementation of the navigation POI and A* pathfinding algorithm for Garry's Mod

lang.lua

The simplest multilingual module for Garry's mod

simplegc.lua

Adjusts garbage collector behavior to reduce performance overhead