Untitled Magic Game

Added on September 9, 2026

Roblox Noita Inspired Binary Networking 3D Card UI MVC Architecture CPS Spells

Overview

I am currently developing this untitled magic game on Roblox. Please note that this is a private project currently in active development and is not released or playable by the public. It is heavily inspired by Noita and focuses completely on deep technical craftsmanship. The project features an emergent spell building engine, high speed binary network replication, an interactive 3D card deck UI for wand customization, and a decoupled Model View Controller architecture.

In addition to the systems engineering, I also created some of the pixel art myself. Using Aseprite, I manually drew the icons for the Bolt, Explosive Projectile, Bounce, Explosive Bounce, and Slithering Path spells (the remaining spell art is temporarily AI generated while in development).



Technical Highlights


1. Recreated Noita Spell System

The core gameplay centers on a dynamic spell composition system inspired by Noita. I built the spells using Continuation Passing Style where modifiers yield functions that dynamically compose parameters for downstream spells:

  • Dynamic Multicasts & Modifiers: Supports Hexagon Form, Double Form, Trigger Bolts (triggering sub spells on impact), Slithering Path, and Explosive Bounces.
  • Higher Order Wrapper Composition: Modifiers wrap property updaters via compose(f, g), allowing infinite stacking of spell behaviors.
  • Nondestructive Virtual UI Tree Preview: Evaluates the full wand cycle non destructively in a virtual pass to construct a hierarchical tree for HUD rendering before resetting wand pointers.
-- Continuation Passing Style Wrapper Composition
local function compose(f, g)
    return function(val)
        return g(f(val))
    end
end

-- Example Spell Modifier: Explosive Trigger Bolt
{
    Name = "boltWithTrigger",
    Type = SpellType.Projectile,
    Cast = function(wand, spell, castState)
        return 1, function(nextSpells)
            local tracker = wand:CastProjectile("Bolt", castState, spell)
            local nextSpell = nextSpells[1]
            if nextSpell then
                tracker.onHit = function(hitProjectile)
                    nextSpell.cast({
                        cf = CFrame.lookAt(hitProjectile.position, hitProjectile.position + hitProjectile.velocity),
                        bounceFromNormal = hitProjectile.normal
                    })
                end
            end
            return { projectiles = {tracker} }
        end
    end
}

2. Performant Binary Networking System

To replicate hundreds of fast moving projectiles and enemies simultaneously without network lag, I wrote a custom networking layer:

  • Declarative Serialization: Custom schema mapping entity states to bit aligned byte layouts like Id, Position vec2, Health u32.
  • Dynamic Byte Width Scaling: Dynamically selects byte writers based on active entity counts to save every bit of network bandwidth.
  • Delta Replicators: Streams byte packed updates with strict assertion checking, reducing remote event payload size by over 70 percent.
-- Server Binary State Replicator Flush
function ServerCorrectionReplicator:Flush()
    local totalBytes = CORRECTION_COUNT_BYTES + count * (self.idSize + self.stateSize)
    local output = buffer.create(totalBytes)
    buffer.writeu16(output, 0, count)

    for _, entity in self.entities do
        self.writeId(output, offset, self.getId(entity))
        buffer.copy(output, offset + self.idSize, self.getStateBuffer(entity), 0, self.stateSize)
        offset += self.idSize + self.stateSize
    end

    assert(offset == totalBytes, `Packet mismatch: wrote {offset} bytes, expected {totalBytes}`)
    self.remote:FireAllClients(output)
end

3. Immersive 3D UI

Instead of traditional flat 2D menus, players interact with a tactile 3D UI:

  • Physical Card Grabbing: Players physically grab 3D spell cards in world space and place them onto a 3D deck to assemble custom wands.
  • Spatial Feedback: Directly connects physical card ordering on the deck to the underlying virtual pass, giving real time visual feedback on how spells will fire.

4. Clean Code Architecture

I built the codebase with strict software engineering standards for performance and maintainability:

  • Strict Model View Controller Architecture: The Model Core is pure vector math with zero GUI or instance coupling. The Reactive View is a visual subscriber listening asynchronously to engine signals to handle 3D meshes, lighting tweens, and sound SFX.
  • Single Responsibility Hierarchy: Clean folder structure dividing code into specific logical containers.
  • Memory Pooling: Circular ID buffer pool that recycles entity IDs to eliminate runtime garbage collection stutters.

5. Custom Vector Math Steering

Rather than relying on bloated Humanoid instances, the game utilizes a pure mathematical vector engine combined with custom hitboxes for massive AI swarms:

  • String Pulling Path Smoothing: The custom pathfinding implementation fires spherecasts scaled to the agent radius to prune unnecessary intermediate path nodes when a clear line of sight exists.
  • Flocking Steering Behaviors: Enemies dynamically calculate steering forces. A separation force checks neighboring hitboxes and applies an inverted vector to prevent clipping, while a repulsion force prevents overshooting the target creating fluid, flocking AI swarms.

6. Environmental Destruction Engine

To emulate the chaotic environment carving of Noita, I engineered a highly performant destruction system using real time boolean operations:

  • GeometryService Integration: Utilizes Roblox GeometryService:SubtractAsync to dynamically subtract explosive spheres and spell impact shapes from the environment geometry.
  • Asynchronous Chunking: Breaks large maps into spatial chunks so boolean operations are strictly isolated and do not stall the main thread during heavy multicasts.
  • Physics Caching: Caches resulting mesh parts and offloads rendering to the client, ensuring the server only calculates strict collision bounds while keeping network replication minimal.