Riptide
A blazing fast framework, designed with developers in mind.
Types
ClientEvent
ClientEvent<T...> = {
Id: string,
Reliable: boolean,
Validate: (...unknown) → T...,
Received: Signal<T...>,
Fire: (self: ClientEvent<T...>, T...) → (),
On: (self: ClientEvent<T...>, Callback: (T...) → ()) → () → ()
}ServerEvent
ServerEvent<T...> = {
Id: string,
Reliable: boolean,
Validate: (...unknown) → T...,
Received: Signal<(Player, T...)>,
Fire: (self: ServerEvent<T...>, Player: Player, T...) → (),
FireAll: (self: ServerEvent<T...>, T...) → (),
FireAllExcept: (self: ServerEvent<T...>, Except: Player, T...) → (),
FireList: (self: ServerEvent<T...>, List: { Player }, T...) → (),
FireWithFilter: (self: ServerEvent<T...>, Filter: (Player) → boolean, T...) → (),
On: (self: ServerEvent<T...>, Callback: (Player, T...) → ()) → () → (),
Ratelimit: (self: ServerEvent<T...>, Limit: number, Interval: number) → ()
}Function
Function<T..., U...> = {
Id: string,
Validate: (...unknown) → T...,
SetCallback: (self: Function<T..., U...>, Callback: (Player, T...) → U...) → () → (),
Call: (self: Function<T..., U...>, T...) → Future.Future<(boolean, U...)>,
RateLimit: (self: Function<T..., U...>, Limit: number, Interval: number) → ()
}Singleton
Singleton = {
Init: ( () → () )?,
Start: ( () → () )?,
Stepped: ( (Time: number, DeltaTime: number) → () )?,
Heartbeat: ( (DeltaTime: number) → () )?,
[string]: (...any) → ...any
}References
Future
Riptide.Future: FutureReference to Future, a lightweight class to represent asynchronous functions
Guard
Riptide.Guard: GuardReference to Guard, a runtime type checker
AnonymousSignal
Riptide.AnonymousSignal: SignalReference to Signal, a blazingly fast Signal implementation
DefaultLogger
Riptide.DefaultLogger: LoggerRiptide's default logger, which logs all debug messages to the developer console
Classes
Event
Riptide.Event: EventA powerful networking implementation
Logger
Riptide.Logger: LoggerA powerful logger based around events
Methods
Ignite
Riptide.Ignite(
Verbose: boolean? -- Log every event to the console?
) → Future<number>Starts Riptide, loading all of the added singletons. Returns the time it took to load wrapped in a Future.
AddSingleton
Riptide.AddSingleton(Singleton: ModuleScript) → ()Registers a singleton.
AddSingletons
Riptide.AddSingletons(Path: Instance) → ()Shallowly registers singletons from under an instance.
CachedSignal
Riptide.CachedSignal<T...>(Name: string) → Signal<T...>Creates a new cached signals.
Cached signals utilize Signal under the hood. All cached signals are put into a cache within Riptide, which can be accessed from anywhere within your codebase.
Function
Riptide.Function<T..., U...>(
Name: string,
ValidateArgs: (...unknown) → T...,
ValidateReturn: (...unknown) → U...
) → Function
Riptide