This is a Roblox TypeScript Game Skeleton, made with Flamework, Roblox-TS and Rojo.
- Visual Studio Code
- Roblox Studio
- NodeJS
This project requires you to setup multiple things according to work properly.
- Clone the repository:
git clone https://github.com/Crabzzai/BaseGame
- Go into your new workspace folder:
cd BaseGame
- Install the NodeJS requirements:
npm install
- Open a Roblox Studio project.
- Select the 'Plugins' tab.
- Press 'Manage Plugins'
- Press the blue '+' button, it will open the Marketplace in the plugins tab.
- Search for 'rojo'.
- Install Rojo 7.
- Go back to the Manage Plugins window.
- Make sure Rojo is enabled, and press the small edit button below the description.
- Make sure to enable the option labelled 'Script Injection'.
- Close those windows, your done!
- In the extensions tab, install both 'roblox-ts' and 'Rojo - Roblox Studio Sync'.
- Restart Visual Studio Code.
- Clone the repository, open the repository as a folder in Visual Studio Code.
- Make a new terminal, in the termal type
npm i
to install the NodeJS packages. - After the packages are done installing, Once done, open the command palette (CTRL+SHIFT+P) and search for 'rojo' and look for 'Rojo: Open Menu'
- Select that option, then click to Install Rojo. Once installed, move to the next step.
- Open the command palatte (CTRL+SHIFT+P) awaing and search for 'roblox-ts' you should find the option 'roblox-ts: Start Compiler', select it.
- An output window should open, wait for the output to say 'Found 0 errors. Watching for file changes.'.
- Open the command palette for a final time and search for 'rojo' and look for 'Rojo: Open Menu'
- Select the option, then click 'default.project.json' at the bottom to serve it.
- Open Roblox Studio
- Go to the Plugins tab
- Click the button labelled 'Rojo' with a red R, a window should appear on the left.
- Press connect.
- Your done!
├── src/
│ ├── ReplicatedFirst
│ ├── ReplicatedStorage
│ ├── ServerScriptService
│ ├── ServerStorage
│ └── StarterPlayerScripts
A container whose contents are replicated to all clients (but not back to the server) first before anything else. - Read more.
ReplicatedStorage is a general container service for objects that are available to both the server and connected game clients. - Read more.
├── components/
├── modules/
│ ├── Signal
│ ├── Spring
│ ├── StrokeScale
│ └── Utils
Alternative bindable event system
interface Signal {
Connect(): {
Disconnect(): void;
};
DisconnectAll(): void;
Fire(...args: unknown[]): void;
Wait(sm: LuaTuple<never>): LuaTuple<never>;
}
A physical model of a spring, useful in many applications. Properties only evaluate upon index making this model good for lazy applications
interface Spring<T extends Vector3 | number> {
Damper: number;
Speed: number;
Target: T;
readonly Position: T;
readonly Velocity: T;
}
A module that handles UI stroke scaling (with some extra steps)
interface StrokeScale {
ScaleGuiObject(
UIStroke: UIStroke,
Pixels?: number,
RelativeSize?: number,
): {
Disconnect(): void;
};
ScaleBillboardGui(
BillboardGui: BillboardGui,
RelativeSize: number,
): {
Disconnect(): void;
ChangeRelativeSize(RelativeSize: number): void;
ChangeStrokeSize(UIStroke: UIStroke, Size: number): void;
};
}
ServerScriptService is a container service for Script, ModuleScript and other scripting-related assets that are only meant for server use. - Read more.
├── services/
├── network.ts
└── runtime.server.ts
A container whose contents are only accessible on the server. Objects descending from ServerStorage will not replicate to the client and will not be accessible from LocalScripts. - Read more.
├── classes/
├── components/
├── configs/
├── modules/
│ └── DataManager
└── types/
DataManager.set(player: Player, profile: Profile<IProfile, unknown>): void;
DataManager.get(player: Player): Promise<_Player>;
DataManager.delete(player: Player): void;
The StarterPlayerScripts is a container object located within the StarterPlayer service. It contains LocalScripts and other objects to be copied to the PlayerScripts container once when a Player joins the game. - Read more.
├── components/
├── controllers/
├── network.ts
└── runtime.server.ts