C.G.T - is a game template that aims to simplify the game prototyping and development process by providing a standardized development environment. C.G.T provides you with all the essential tools you would need to start a new project and prevent you from shooting yourself in the foot by spending time on the non-prototyping-related parts of the project.
Out of the box C.G.T gives you a:
-
A fully set up knit project, as mentioned in my prior knit setup guide it’s quite the hassle to set up knit and I hope this should help address that problem for a lot of people
-
PlayerData Manager- Built with ProfileService and ReplicaService by MadStudioRoblox. You can edit PlayerData and handle changes in a performant and predictable manner.
Example
Editing Data
--!strict --[[ {C.G.T} -[TestService]--------------------------------------- A module for testing other modules Members: Functions: Members [ClassName]: Methods [ClassName]: --]] local SETTINGS = {} ----- Loaded Modules ----- local Players = game:GetService("Players") local ReplicatedStorage = game:GetService("ReplicatedStorage") local Knit = require(ReplicatedStorage.Packages.knit) ----- Module Table ----- local TestService = Knit.CreateService({ Name = "TemplateService" }) ----- Private Variables ----- ----- Private functions ----- ----- Public ----- ----- Initialize & Connections ----- function TestService:KnitStart() local player_data_service = Knit.GetService("PlayerDataService") local player = Players:GetPlayers()[1] or Players.PlayerAdded:Wait() player_data_service:GetDataReplica(player):andThen(function(DataReplica) DataReplica:SetValue("SomeData", DataReplica.Data.SomeData + 100)-- The value you're changing has to have been added in your save structure end) end return TestService
Handling Changes
--!strict --[[ {C.G.T} -[TestController]--------------------------------------- A module for testing other modules Members: Functions: Members [ClassName]: Methods [ClassName]: --]] local SETTINGS = {} ----- Loaded Modules ----- local Players = game:GetService("Players") local ReplicatedStorage = game:GetService("ReplicatedStorage") local Knit = require(ReplicatedStorage.Packages.knit) local ReplicaController = require(game.ReplicatedStorage.Packages.replicaservice) ----- Module Table ----- local TestController = Knit.CreateController({ Name = "TestController" }) ----- Private Variables ----- ----- Private functions ----- ----- Public ----- ----- Initialize & Connections ----- function TestController:KnitStart() ReplicaController.ReplicaOfClassCreated("PlayerData", function(replica) if replica.Tags.Player == Players.LocalPlayer then replica:ListenToChange("SomeData", function() print("SomeData Changed") --Do Something when SomeData changes end) end end) end return TestController
-
Command Bar- Built with Cmdr by evaera . Allows you to create your own “Admin Commands” that can be used for debugging e.t.c
Example
-
Temp PlayerData Manager - Aims to provide a centralized way to access, edit and react to changes in temporary player data, shares the same format as the PlayerData Manager
Documentation: C.G.T
File: C-G-T.rbxl (353.2 KB)