Ragdoll Physics
Snappy ragdoll physics that utilises the replication system I made.
I'm an experienced Roblox programmer that specialises in system designs. I can develop complex tasks like Custom Networking, Custom Physics Replication, Custom Physics, Voxel Destructions and Combat System. If you need simple tasks, I can also put together abilities from resources, create a weather system and fully working UI frontend.
Snappy ragdoll physics that utilises the replication system I made.
1-- Suspends local execution until server confirmation is received2local function register_replicate_context(self: StoryInternal, context_id: string)3 local pending = self._PendingReplicateContexts[context_id] or {}4 self._PendingReplicateContexts[context_id] = pending56 local promise = self._Maid:AddPromise(Promise.new(function(resolve, reject, on_cancel)7 local callback = function(confirmed)8 self._ContextData[context_id] = confirmed9 resolve(confirmed)10 end11 table.insert(pending, { callback = callback, startTime = os.clock() })12 end))13 table.insert(self._ActiveReplicatePromises, promise)14 return promise15end1617function Story.ReplicateContextAsync(self: StoryInternal, context_id: string, data: any)18 if RunService:IsServer() then19 -- Server validates and broadcasts confirmed state to all peers20 Networking:BroadcastContext(self.Id, context_id, data)21 return Promise.resolve(data)22 end2324 if self.RunMode == "Subject" then25 -- Subject sends hit claim to server and waits for confirmation26 Networking:ReplicateContext(self.Id, context_id, data)27 return register_replicate_context(self, context_id)28 end2930 if self.RunMode == "Observer" then31 -- Observers wait passively for server broadcast32 if self._ContextData[context_id] ~= nil then33 return Promise.resolve(self._ContextData[context_id])34 end35 return register_replicate_context(self, context_id)36 end37endStoryboard is a strictly typed unified sequence engine, specifically designed for combat. It abstracts networking complexity and maximise reusability with Components. It has a built in context management pipelne to handle predictive client actions or general context communication between server and client.
12-- Custom hitboxes using SAT theorm3local function is_block_intersecting_aabb(part_cframe, part_size, box_cframe, box_size)4 local D = part_cframe.Position - box_cframe.Position5 local half_part = part_size / 26 local half_box = box_size / 278 local L = get_cframe_axes(part_cframe)9 local E = { Vector3.xAxis, Vector3.yAxis, Vector3.zAxis }1011 local function check_axis(axis)12 local t = math.abs(D:Dot(axis))13 local Ra = (half_part.X * math.abs(L[1]:Dot(axis))) +14 (half_part.Y * math.abs(L[2]:Dot(axis))) +15 (half_part.Z * math.abs(L[3]:Dot(axis)))16 local Rb = (half_box.X * math.abs(E[1]:Dot(axis))) +17 (half_box.Y * math.abs(E[2]:Dot(axis))) +18 (half_box.Z * math.abs(E[3]:Dot(axis)))19 return t <= (Ra + Rb)20 end2122 for i = 1, 3 do if not check_axis(L[i]) then return false end end23 for i = 1, 3 do if not check_axis(E[i]) then return false end end24 return true25end26-- Recursive subdivision27local function check_voxelisation(hitbox_cframe, hitbox_size, hitbox_shape, cframe, size, shape, MIN_SIZE, THRESHOLD, voxels, debris, iteration, MAX_ITER)28 if iteration >= MAX_ITER then return voxels, debris end2930 local can_voxelise, new_voxels = voxelise(cframe, size, shape, MIN_SIZE, THRESHOLD)31 if not can_voxelise then32 table.insert(debris, {cframe, size})33 return voxels, debris34 end3536 local intersecting = get_intersect_block(hitbox_cframe, hitbox_size, new_voxels)3738 for _, set in new_voxels do39 if not table.find(intersecting, set) then table.insert(voxels, set) end40 end4142 for _, set in intersecting do43 check_voxelisation(44 hitbox_cframe, hitbox_size, hitbox_shape,45 set.cframe, set.size, set.shape,46 MIN_SIZE, THRESHOLD, voxels, debris, iteration + 1, MAX_ITER47 )48 end49 return voxels, debris50end5152-- Replication of debris and debris transformation53-- SerDes54local position_sd = squash.f32()55local rotation_sd = squash.f32()56local DEBRIS_ID_SQUASH = squash.string(8)5758local DEBRIS_REPLICATION_RECORD = squash.record {59 part_id = squash.T(DEBRIS_ID_SQUASH),60 position = squash.T(squash.Vector3(position_sd)),61 rotation = squash.T(squash.Vector3(rotation_sd))62}6364-- SERVER: Binary serialization of debris transforms65local function get_buffer(debris: BasePart)66 local cursor = squash.cursor()67 local x, y, z = debris.CFrame:ToEulerAnglesXYZ()6869 DEBRIS_REPLICATION_RECORD.ser(cursor, {70 part_id = debris.Name,71 position = debris.CFrame.Position,72 rotation = Vector3.new(x, y, z)73 })74 return squash.tobuffer(cursor)75end7677-- CLIENT: Batched spatial interpolation78step_connection:Connect(function(dt)79 local parts, cframes = {}, {}8081 for part, target_cframe in client_active_debris do82 if part.CFrame ~= target_cframe then83 table.insert(parts, part)84 table.insert(cframes, part.CFrame:Lerp(target_cframe, 0.175))85 end86 end8788 if #parts > 0 then89 -- Fires CFrame updates for thousands of parts in a single C++ call90 workspace:BulkMoveTo(parts, cframes)91 end92end)93 Highly performant and optimised system for real time voxelisation destructions and debris replicating. It uses Separating Axis Theorem recursively to find the smallest expected part from larger parts. Parallel Luau is utilised to make the entire thing faster and more performant.
I'm also a fullstack UI Designer, I can design and implement UIs. I designed and implemented all the UIs in the video
1-- Dialogue is an easily customisable class2dialogueIndex = {3 [1] = "Ah, another adventurer seeking the finest craftsmanship! I've got just the thing for you.",4 [2] = "Take a look at this beauty. Forged with care and reinforced with enchanted steel, it'll withstand the toughest of battles. A true masterpiece, if I say so myself",56 -- Interaction --7 [3] = "Goodbye",8 [4] = "Ok",9 [6] = "Claim Loot"10},1112dialogue = {13 [1] = function(session: dialogueClasss)14 local dialogue = require(ReplicatedStorage.client.dialogue)1516 session:reset()17 session:text(1, true)18 session:manifest()19 session:wait()20 session:button(4)21 session:onButton(4):Wait()2223 session:reset()24 session:text(2, false)25 session:wait()26 session:loot({27 [dialogue.lootModifier.icon] = "rbxassetid://13812120467",28 [dialogue.lootModifier.text] = "Iron Sword",29 [dialogue.lootModifier.lootType] = dialogue.lootType.item,30 [dialogue.lootModifier.quantity] = 1,31 })32 session:button(6, {33 [dialogue.buttonModifier.backgroundColor] = Color3.fromRGB(86, 255, 67),34 [dialogue.buttonModifier.shadowColor] = Color3.fromRGB(40, 40, 40)35 })36 session:button(3)37 session:onButton(6):Once(function()38 session:Destroy()39 end)40 session:onButton(3):Once(function()41 session:Destroy()42 end)43 end44}45A responsive dialogue system with a polished UI that I designed and implemented myself, focused on smooth interaction.
1-- First In First Out Transaction Queue2-- Queues requests to ensure inventory state mutations are handled strictly3-- One at a time per player, preventing item duplication exploits.4local function request_transaction(player: Player, callback)5 local queue = get_transaction_queue(player)67 return queue:Enqueue(function()8 return Promise.new(function(resolve, reject)9 -- Craftsman.DataServer handles the Reflex immutable state updates10 Craftsman.DataServer:UpdateState(player, function(state)11 local new_state = Craftsman.TableUtil.DeepClone(state)12 callback(new_state, resolve, reject)13 return new_state14 end)15 end)16 end)17end1819-- Strict Binary Networking Schema using ByteNet Max20-- It compresses inventory operations into really small byte payloads21return ByteNet.defineNamespace("Inventory", function()22 return {23 packets = {24 DragItem = ByteNet.definePacket({25 value = ByteNet.struct({26 SourceSlot = ByteNet.optional(ByteNet.uint8),27 SourceLocation = ByteNet.optional(ByteNet.string),28 TargetSlot = ByteNet.optional(ByteNet.uint8),29 TargetLocation = ByteNet.optional(ByteNet.string),30 }),31 }),32 SplitItem = ByteNet.definePacket({33 value = ByteNet.struct({34 SourceSlot = ByteNet.uint8,35 Quantity = ByteNet.uint16,36 }),37 }),38 },39 }40end)
This inventory UI, Frontend Coding and Backend Coding is completed in 7h within a day of dedicated working.
A rigid inventory system designed with data safety in mind. It is designed fundementally to prevent duplication exploits and data issues. (This is open source so you can check if you click here)
A modular, Promise driven game framework engineered for high concurrency environments. My standard workflow involves utilising DocumentService for session locking and data persistence, Reflex for immutable states, and ByteNet Max for high performance binary serialization and network traffic optimization.
Professional workflow, secure systems designs, and responsiveness.
I use a modern Roblox development pipeline using Rojo and Git + GitHub, it enables professional source control, modular code management, and higher efficiency. Alternatively, I am also prepared to work directly in Roblox Studio with only the necessary packages if the project requires it.
1{2 "name": "adventure-inventory",3 "tree": {4 "$className": "DataModel",5 "ReplicatedStorage": {6 "Packages": {7 "$path": "Packages"8 },9 "Shared": {10 "$path": "src/Shared"11 },12 "Client": {13 "$path": "src/Client"14 },15 "CraftsmanConfig": {16 "$path": "src/CraftsmanConfig.luau"17 }18 },19 "ServerScriptService": {20 "$className": "ServerScriptService",21 "Server": {22 "$path": "src/Server"23 },24 "Bootstrap": {25 "$path": "src/Bootstrap.server.luau"26 }27 },28 "StarterPlayer": {29 "$className": "StarterPlayer",30 "StarterPlayerScripts": {31 "$className": "StarterPlayerScripts",32 "Bootstrap": {33 "$path": "src/Bootstrap.client.luau"34 }35 }36 }37 }38}39 All of my systems are built on top of the Craftsman Framework, a modular Roblox framework engineered for high concurrency environments. Craftsman is a framework tailored to boost efficiency to the next level, so hours of time are not spent on writing common or repetitive code.
1local Craftsman = {2 Component = Component, -- Module Loader3 Player = Player, -- Player Management4 Entity = Entity, -- Character & Entity Management5 Queue = Queue, -- Task Queue System67 DataServer = DataServer, -- Server Data Manipulation8 DataClient = DataClient, -- Client Data Access9 MarketServer = MarketServer, -- Server Marketplace Logic10 MarketClient = MarketClient, -- Client Marketplace Access1112 InputUtil = InputUtil, -- User Input Handling13 PrintUtil = PrintUtil, -- Debugging and Printing14 TableUtil = TableUti, -- Table Manipulation Utilities1516 AnimationUtil = AnimationUtil, -- Animation Handling17 SoundUtil = SoundUtil, -- Sound Handling1819 MathUtil = MathUtil, -- Math Utilities20 StringUtil = StringUtil, -- String Utilities2122 Config = Config, -- Configuration Management23} Security and optimisation is the foundation of all systems. Using transaction queueing, strict server authority, and network binary serialization, my systems compress payloads to the absolute minimum while preventing common bugs like item duplication.
1-- Secure first in first out transaction queue to ensure race conditions bugs do not create the opportunity for critical bugs such as item dupes in complex inventory interactions.2local function get_transaction_queue(player: Player)3 local queue = transaction_queues[player]4 if not queue then5 queue = Craftsman.Queue.new({6 RetryOn = false,7 DefaultTimeout = 4,8 })9 transaction_queues[player] = queue10 end1112 return queue13end1415-- Requests a transaction for the player, it will be queued and executed sequentially to prevent async race conditions16local function request_transaction(player: Player, callback)17 local queue = get_transaction_queue(player)18 local promise = queue:Enqueue(function()19 return Promise.new(function(resolve, reject)20 Craftsman.DataServer:UpdateState(21 player, function(state)22 local new_state = Craftsman.TableUtil.DeepClone(state)23 callback(new_state, resolve, reject)24 return new_state25 end)26 end)27 end)2829 return promise30end I commit to transparent, rapid development with productive hours. Whether its implementing complex systems from scratch or scripting a rich UI. I can deliver robust, production ready code with extreme efficiency. Such as, designing a full inventory UI, scripting the frontend and backend in under 7 hours.
Let's build something amazing together. Reach out via any of the channels below.
ark@craftsman.systems
@uark
@averyark