My Projects
💫 Comet
About



Comet.ts

A powerful, yet fast plugin framework written in roblox-ts (opens in a new tab). ⚙️


Early Beta

⚠️

Note that comet is in its infancy and hasn't been properly battle-tested! You might experience bugs and issues.

Motivation

Building a plugin for roblox can be extremely frustrating as a developer. The documentation is lacking, and many of the plugin specific API is fragmented.

After using Flamework on many projects, i've found it to be the best tool for the job in game development. This framework takes heavy inspiration from it to provide a robust api for building plugins.

Why Use Comet?

💨 Uber fast

Comet has practically zero overhead outside of initialization. When it comes to performance and developer experience, you can have your cake and eat it too.

🏎️ Frictionless Setup

Comet only requires a minimum of three lines within your plugin's server script.

init.server.ts
import { comet } from "@rbxts/comet";
import MySystem from "./systems/MySystem";
 
comet.createApp(plugin, "MyAwesomeApp");
comet.registerSystem(MySystem);
comet.launch();

⚙️ Singleton design

With inspiration from Flamework, comet takes advantage of a singleton design model with systems to provide lifecycle methods and keeps your code organized.

MySystem.ts
import { CometView, System, onInit } from "@rbxts/comet";
 
export class MySystem extends System implements onInit, onRender, onEnd {
	onInit(): void { 
        print("Im Starting!")
    }
 
    onRender(dt: number): void {
        print ("I'm Stepping!")
    }
 
    onEnd(): void {
        print ("I'm done!")
    }
}

🫵 UI, ur way.

Comet supplies a robust framework for mounting UI within both widgets and the viewport. It was also designed to work with most modern UI frameworks out of the box, as well as plain old gui objects.

See Window API →

MySystem.ts
...
onInit() {
    // Create a widget
    this.window = this.createWidget(
        "Comet Window", 
        new Vector2(0, 0), 
        new Vector2(500, 10)
    );
 
    // We can pass a GuiBase instance:
    this.window.mount(new Instance("Frame"))
 
    // Or pass in a function to use any framework we'd like.
    this.window.mount((root) => {
        const unmount = createReactTree(root);
        return () => unmount()
    }))
}
...

👌 Tasteful abstraction.

All of the functionality afforded to Plugins in studio can be somewhat fragmented. Comet supplies tasteful abstraction and brings all the functionality in one place.

Comet Menu Builder
// Builder api for context menus.
const contextMenu = this.menuBuilder()
    .action(
        "Select all items in Workspace", 
        "", 
        () => {
		    this.select(game.Workspace.GetChildren());
	    }
    )
    .seperator()
	.submenu("Misc Methods")
        .action("Do something")
        .action("Do something else");
 
contextMenu.show()

🤝 Easy Dependencies

Comet makes it easy to utilize other singletons.

MySystem.ts
...
onInit() {
    const otherSystem = this.use(OtherSystem);
    otherSystem.hello() // "👋"
}
...

🔎 Memory safe

Memory leaks are commonplace when testing plugins. Weather that be an instance that doesn't get deleted or a connection that persists.

When sticking to the comet API, all instances (like mounted UI) and events are accounted for automatically.

Credits

Icon (opens in a new tab)