This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--!strict | |
-- PriorityQueue.lua | |
-- me when the queue is my priority | |
-- also made with lectures from mit ocw | |
-- magicoal_nerb/poopbarrel | |
local PriorityQueue = {} | |
PriorityQueue.__index = PriorityQueue |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--!strict | |
-- AVL Tree implementations based on the mit ocw lecture videos | |
-- poopbarrel/magicoal_nerb :^) | |
local Avl = {} | |
Avl.__index = Avl | |
export type AvlNode<T> = { | |
data: T, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Stack.lua | |
-- Last in, first out | |
-- poopbarrel/magicoal_nerb :^) | |
local Stack = {} | |
Stack.__index = Stack; | |
function Stack.new(capacityPow) | |
local mask = bit.lshift(1, capacityPow) - 1 | |
-- create an array beforehand so lua doesn't |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Xml.lua | |
-- Parses xml files | |
-- poopbarrel/magicoal_nerb :^) | |
-- This parser makes a few assumptions about our data: | |
-- * element tags are not separated by whitespace | |
-- * no comments | |
local Stack = require("Stack") | |
local ffi = require("ffi") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--!strict | |
--!native | |
-- Chunk.luau | |
-- Uses a binary greedy mesher to chunk | |
-- everything together. | |
-- poopbarrel/magicoal_nerb | |
local CHUNK_FACES: { Vector3 } = { | |
Vector3.xAxis, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--!strict | |
-- poopbarrel/magical_noob | |
-- @submodule quakec | |
-- @description another quake movement reimplementation ig | |
-- Physics | |
local XZ: Vector3 = Vector3.new(1.0, 0.0, 1.0) | |
local CAPSULE_FLOOR_ANGLE: number = 0.7 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- pprint.lua | |
-- suprisingly fast for being a non-tail call optimized | |
-- pretty printer. huh neat | |
-- poopbarrel/magicoal_nerb :^) | |
local function pprintHelper(buff, value, depth) | |
-- >_> | |
local t = type(value) | |
if t == "string" then | |
-- string |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Average stack based JSON parser i guess | |
local LEX_CLASSIFIER = { | |
8, 8, 8, 8, 8, 8, 8, 8, 8, 40, 40, 40, 40, 40, 8, 8, 8, | |
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 160, 16, 16, 16, | |
16, 16, 16, 16, 16, 16, 16, 16, 16, 66, 16, 16, 4, 4, 4, 4, 4, | |
4, 4, 4, 4, 4, 16, 16, 16, 16, 16, 16, 16, 65, 65, 65, 65, 65, | |
65, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | |
1, 16, 16, 16, 16, 16, 16, 66, 66, 66, 66, 66, 66, 2, 2, 2, 2, | |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 16, 16, 16, | |
8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local API_DUMP_URL = "https://raw.githubusercontent.com/MaximumADHD/Roblox-Client-Tracker/roblox/API-Dump.txt"; | |
local HttpService = game:GetService("HttpService"); | |
local Reflection = {}; | |
Reflection.__index = Reflection; | |
local function reflQuery(name) | |
return function(self, className) | |
local root = className; | |
local output = {}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--[[ | |
This mesher only handles 16x16x16 chunks! | |
Uses a more optimal approach towards creating | |
chunks. Checks plane intersections of the chunk | |
for greedy meshing. | |
This type of plane-intersection greedy meshing is | |
useful for fixing certain problems w/ voxel based | |
greedy meshing, where transparent objects may be | |
see through. |
NewerOlder