Skip to content
/ feces Public

A generalized replication system for jecs that allows for easy and fast replication of components.

License

Notifications You must be signed in to change notification settings

NeonD00m/feces

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

"Fast Entity Component Export System"

A generalized replication system for jecs that allows for easy and fast replication of components.


Examples

local entity = world:entity()
local Transform = world:component()
world:add(entity, Transform)

-- replicate all the components to all players
world:add(entity, feces.replicated)

-- replicate only the Transform component to all players
world:add(entity, pair(feces.replicated, Transform)) 

-- replicate all components to a specific player
world:set(entity, feces.replicated, Player1)

-- replicate only the Transform component to a table of players
world:set(entity, pair(feces.replicated, Transform), {
    Player1, Player2
})

-- replicate all components to any player except Player1
world:add(entity, feces.replicated, function(player)
    return player ~= Player1
end)

Installation

Either copy the code manually or use pesde:

pesde add killergg/feces

About

A generalized replication system for jecs that allows for easy and fast replication of components.

Resources

License

Stars

Watchers

Forks

Releases

No releases published