Hello! 👋

I'm AveryArk

Senior Roblox Programmer

About Me

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.

Luau Physics Networking Spatial Queries State Synchronization Server Authority Algorithms Parallel Luau Binary Serialisation Network Optimisation UI Design UX Design UI Coding Transaction Queueing Backend Security Framework Architecture State Management Data Persistence Asynchronous Programming

Projects

01

Ragdoll Physics

Snappy ragdoll physics that utilises the replication system I made.

LuauPhysicsNetworking
lua
Show code
1-- Suspends local execution until server confirmation is received
2local function register_replicate_context(self: StoryInternal, context_id: string)
3 local pending = self._PendingReplicateContexts[context_id] or {}
4 self._PendingReplicateContexts[context_id] = pending
5
6 local promise = self._Maid:AddPromise(Promise.new(function(resolve, reject, on_cancel)
7 local callback = function(confirmed)
8 self._ContextData[context_id] = confirmed
9 resolve(confirmed)
10 end
11 table.insert(pending, { callback = callback, startTime = os.clock() })
12 end))
13 table.insert(self._ActiveReplicatePromises, promise)
14 return promise
15end
16
17function Story.ReplicateContextAsync(self: StoryInternal, context_id: string, data: any)
18 if RunService:IsServer() then
19 -- Server validates and broadcasts confirmed state to all peers
20 Networking:BroadcastContext(self.Id, context_id, data)
21 return Promise.resolve(data)
22 end
23
24 if self.RunMode == "Subject" then
25 -- Subject sends hit claim to server and waits for confirmation
26 Networking:ReplicateContext(self.Id, context_id, data)
27 return register_replicate_context(self, context_id)
28 end
29
30 if self.RunMode == "Observer" then
31 -- Observers wait passively for server broadcast
32 if self._ContextData[context_id] ~= nil then
33 return Promise.resolve(self._ContextData[context_id])
34 end
35 return register_replicate_context(self, context_id)
36 end
37end
02

Networked Sequencer - Storyboard Engine

Storyboard 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.

LuauSpatial QueriesState SynchronizationServer Authority
lua
Show code
1
2-- Custom hitboxes using SAT theorm
3local function is_block_intersecting_aabb(part_cframe, part_size, box_cframe, box_size)
4 local D = part_cframe.Position - box_cframe.Position
5 local half_part = part_size / 2
6 local half_box = box_size / 2
7
8 local L = get_cframe_axes(part_cframe)
9 local E = { Vector3.xAxis, Vector3.yAxis, Vector3.zAxis }
10
11 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 end
21
22 for i = 1, 3 do if not check_axis(L[i]) then return false end end
23 for i = 1, 3 do if not check_axis(E[i]) then return false end end
24 return true
25end
26-- Recursive subdivision
27local 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 end
29
30 local can_voxelise, new_voxels = voxelise(cframe, size, shape, MIN_SIZE, THRESHOLD)
31 if not can_voxelise then
32 table.insert(debris, {cframe, size})
33 return voxels, debris
34 end
35
36 local intersecting = get_intersect_block(hitbox_cframe, hitbox_size, new_voxels)
37
38 for _, set in new_voxels do
39 if not table.find(intersecting, set) then table.insert(voxels, set) end
40 end
41
42 for _, set in intersecting do
43 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_ITER
47 )
48 end
49 return voxels, debris
50end
51
52-- Replication of debris and debris transformation
53-- SerDes
54local position_sd = squash.f32()
55local rotation_sd = squash.f32()
56local DEBRIS_ID_SQUASH = squash.string(8)
57
58local 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}
63
64-- SERVER: Binary serialization of debris transforms
65local function get_buffer(debris: BasePart)
66 local cursor = squash.cursor()
67 local x, y, z = debris.CFrame:ToEulerAnglesXYZ()
68
69 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)
75end
76
77-- CLIENT: Batched spatial interpolation
78step_connection:Connect(function(dt)
79 local parts, cframes = {}, {}
80
81 for part, target_cframe in client_active_debris do
82 if part.CFrame ~= target_cframe then
83 table.insert(parts, part)
84 table.insert(cframes, part.CFrame:Lerp(target_cframe, 0.175))
85 end
86 end
87
88 if #parts > 0 then
89 -- Fires CFrame updates for thousands of parts in a single C++ call
90 workspace:BulkMoveTo(parts, cframes)
91 end
92end)
93
03

Voxel Destruction Engine

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.

LuauSpatial QueriesAlgorithmsParallel LuauBinary SerialisationNetwork Optimisation
04

UI Design and UI Frontend Implementation

I'm also a fullstack UI Designer, I can design and implement UIs. I designed and implemented all the UIs in the video

LuauUI DesignUX DesignUI Coding
lua
Show code
1-- Dialogue is an easily customisable class
2dialogueIndex = {
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",
5
6 -- Interaction --
7 [3] = "Goodbye",
8 [4] = "Ok",
9 [6] = "Claim Loot"
10},
11
12dialogue = {
13 [1] = function(session: dialogueClasss)
14 local dialogue = require(ReplicatedStorage.client.dialogue)
15
16 session:reset()
17 session:text(1, true)
18 session:manifest()
19 session:wait()
20 session:button(4)
21 session:onButton(4):Wait()
22
23 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 end
44}
45
05

Dialogue System

A responsive dialogue system with a polished UI that I designed and implemented myself, focused on smooth interaction.

LuauUI DesignUX DesignUI Coding
lua
Show code
1-- First In First Out Transaction Queue
2-- Queues requests to ensure inventory state mutations are handled strictly
3-- One at a time per player, preventing item duplication exploits.
4local function request_transaction(player: Player, callback)
5 local queue = get_transaction_queue(player)
6
7 return queue:Enqueue(function()
8 return Promise.new(function(resolve, reject)
9 -- Craftsman.DataServer handles the Reflex immutable state updates
10 Craftsman.DataServer:UpdateState(player, function(state)
11 local new_state = Craftsman.TableUtil.DeepClone(state)
12 callback(new_state, resolve, reject)
13 return new_state
14 end)
15 end)
16 end)
17end
18
19-- Strict Binary Networking Schema using ByteNet Max
20-- It compresses inventory operations into really small byte payloads
21return 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)
/images/wakaapi-sched.png

This inventory UI, Frontend Coding and Backend Coding is completed in 7h within a day of dedicated working.

06

Inventory System

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)

LuauTransaction QueueingBackend SecurityUI DesignUX DesignUI Coding