Skip to content

Ecliptorhizes/Atlas-Framework

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Atlas Framework (WORKING PROGRESS)

Atlas Framework is a modular set of lightweight, dependency-free Luau primitives for Roblox. It provides core building blocks like Promise (async flow), Signal (event dispatch), ResourceManager (deterministic cleanup), and AtlasSpring (smooth UI animations) to keep gameplay and systems code simple, predictable, and safe across both client and server.

Modules

Promise

A lightweight Promise implementation for Roblox Lua, inspired by Promises/A+ semantics and NevermoreEngine conventions. Handles asynchronous operations with a clean, chainable API.

Features:

  • Promises/A+ compliant
  • Promise.all() and Promise.race() utilities
  • Chainable .andThen() and .catch() methods
  • Designed for ease of use within the Roblox environment

Location: src/promise/shared/src/promise.luau

Signal

A batched yield-safe signal implementation based on Nevermore's GoodSignal. More efficient than array-based approaches due to linked list structure.

Features:

  • Linked list structure for efficient handler management
  • Yield-safe execution
  • Connect(), Once(), Wait(), and Fire() methods
  • Memory-efficient connection handling

Location: src/signal/src/shared/Signal.luau

ResourceManager

A lightweight cleanup utility for managing disposable resources in Roblox Luau. Provides deterministic cleanup for connections, instances, tasks, and callbacks.

Features:

  • Tracks common disposable Roblox resources (RBXScriptConnection, Instance, thread, callbacks)
  • Deterministic cleanup order (reverse insertion)
  • Safe, idempotent destruction
  • Supports both static and dynamic cleanup patterns
  • No external dependencies

Location: src/resourcemanager/src/shared/ResourceManager.luau

AtlasSpring

A physical spring model for smooth UI and motion in Roblox. Enhanced version inspired by NevermoreEngine's Spring with improvements for better developer experience.

Features:

  • Lazy evaluation model (computed on read, driven by your clock)
  • Works with numbers, Vector2, and Vector3
  • Preset configurations (Gentle, Default, Snappy, Bouncy, Wobbly, Stiff)
  • Stiffness/Damping API (more intuitive than Damper/Speed)
  • Rest detection utilities
  • Better defaults optimized for UI animations

Location: src/spring/src/shared/spring.luau

Installation

Each module is self-contained and can be used independently. Drop the desired module into your Rojo project and require it:

-- Example: Using AtlasSpring
local AtlasSpring = require(path.to.spring)

-- Example: Using Promise
local Promise = require(path.to.promise)

-- Example: Using Signal
local Signal = require(path.to.Signal)

-- Example: Using ResourceManager
local ResourceManager = require(path.to.ResourceManager)

Quick Examples

AtlasSpring - Smooth UI Animations

local RunService = game:GetService("RunService")
local AtlasSpring = require(path.to.AtlasSpring)

local opacity = AtlasSpring.new(0, AtlasSpring.Presets.Snappy)
opacity.Target = 1

RunService.RenderStepped:Connect(function()
    frame.BackgroundTransparency = 1 - opacity.Position
end)

Promise - Async Flow Control

local Promise = require(path.to.promise)

Promise.new(function(resolve, reject)
    -- Async operation
    task.wait(1)
    resolve("Done!")
end):andThen(function(value)
    print(value) -- "Done!"
end)

Signal - Event Dispatch

local Signal = require(path.to.Signal)

local mySignal = Signal.new()
local connection = mySignal:Connect(function(message)
    print(message)
end)

mySignal:Fire("Hello, World!")
connection:Disconnect()

ResourceManager - Cleanup Management

local ResourceManager = require(path.to.ResourceManager)

local manager = ResourceManager.new()
manager:Add(RunService.Heartbeat:Connect(function()
    -- Do something
end))
manager:Add(someInstance)

-- Later, clean up everything
manager:Destroy()

Project Structure

Atlas-Framework/
├── src/
│   ├── promise/
│   │   └── shared/src/promise.luau
│   ├── signal/
│   │   └── src/shared/Signal.luau
│   ├── resourcemanager/
│   │   └── src/shared/ResourceManager.luau
│   └── spring/
│       └── src/shared/spring.luau
└── README.md

Design Principles

  • Modularity: Each module is independent and can be used standalone
  • No Dependencies: Modules have no external dependencies
  • Type Safety: Full Luau type annotations with --!strict
  • Performance: Optimized for Roblox's execution environment
  • Simplicity: Clean APIs focused on common use cases

About

No description, website, or topics provided.

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

 
 
 

Contributors