Chain Game Template - A fully Functional Game Template made with the Knit Game Framework

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 :heart:. Allows you to create your own “Admin Commands” that can be used for debugging e.t.c

    Example

    68747470733a2f2f7468756d62732e6766796361742e636f6d2f4861746566756c54616e417a75726577696e6765646d61677069652d73697a655f726573747269637465642e676966

  • 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)

11 Likes

im not smart enough to understand how this works, but a command bar you can customize is amazing

1 Like

We can not edit the game.

1 Like

Updated, you should now be able to edit it

This very much mirrors my workflow. I was planning on creating a template myself but this works just as well! Thank you so much

1 Like

Is it possible to make an arg of objects in a folder?