Giter Site home page Giter Site logo

knit's Introduction

Release Lint Deploy Docs

Knit

Knit is a lightweight framework for Roblox that simplifies communication between core parts of your game and seamlessly bridges the gap between the server and the client.

Read the documentation for more info.

Check out the Knit video tutorials for hands-on examples.


Alpha

Knit is still in alpha, but will soon be elevated to beta. See the Beta Roadmap for more info. Please be aware that breaking changes may still be introduced.


Example

Here is a simple and fully-working example where a PointsService is created server-side and lets the client access points from the service. No RemoteFunctions or RemoteEvents have to be made; those are handled internally by Knit.

Server:

local Knit = require(game:GetService("ReplicatedStorage").Knit)

-- Create a PointsService:
local PointsService = Knit.CreateService {
	Name = "PointsService";
	Client = {};
}

-- Expose an endpoint that the client can invoke:
function PointsService.Client:GetPoints(player)
	return 10
end

Knit.Start()

Client:

local Knit = require(game:GetService("ReplicatedStorage").Knit)

local MyController = Knit.CreateController {
	Name = "MyController";
}

function MyController:KnitStart()
	-- Fetch points from the server-side PointsService:
	local PointsService = Knit.GetService("PointsService")
	local points = PointsService:GetPoints()
	print("Points", points)
end

Knit.Start()

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.