Skip to content

Instantly share code, notes, and snippets.

View caillef's full-sized avatar

Corentin CAILLEAUD caillef

View GitHub Profile
@caillef
caillef / particubesLumberjackPersistence.lua
Last active April 18, 2022 10:27
Persistence example Particubes - Storing values in the game Lumberjack
--[[
Resources are stored in Player.resources on the client side.
There are 4 resources: logs, bLogs, mLogs and coins.
Ping Pong between client and server to load:
- start the game
- client sends loadResources to the server
- the server get the store and sends loadResources with the data
- client receives loadResources and use a custom resourceSystems to update the values
--]]
@caillef
caillef / UIKit Particubes - caillef v0.2
Last active July 1, 2022 16:30
V0.1 of a simple UI Kit to place texts and icons in Particubes
-- UI KIT ----------------------------------
-- ADD IN YOUR ITEMS "caillef.empty"
-- (and if you try the example, you need to add "caillef.coin")
-- EXAMPLES AT THE END TO UNDERSTAND HOW TO USE THE UIKIT
-- V0.1 - SIMPLE TEXTS, ICONS and ANIMATIONS
-- 17 Apr. 2022
-- @caillef#4956 on Discord
@caillef
caillef / particubes-caillef-d3d-v1.lua
Created April 12, 2022 16:09
[Particubes 0.42] d3d - DIGIT 3D V1 - A simple system to print numbers on your screen
-- Don't forget to add "caillef.empty" in the Config.Items
-- Paste the following block at the top of your file, under Config
-- DIGIT 3D v1 (d3d) -- caillef 12 Apr. 2022
-- Private
local EMPTY = Items.caillef.empty
local ADD,MS,FLR = table.insert, MutableShape, math.floor
local d3dD = "XXXX XX XX XXXX XX X X X XXXX XXXXX XXXXXX XXXX XXXXX XX XXXX X XXXXX XXX XXXXXXXX XXXX XXXXXXX X X X XXXXX XXXXX XXXXXXXX XXXX XXXX"
d3dSD = function(o,v,c,di) for i=1,15 do if d3dD:sub(i+v*15,i+v*15)=="X"then o:AddBlock(c,{0,4-FLR((i-1)/3),(i-1)%3+(di-1)*4})end end end
d3dGList = function(n) local d,l=1,{}while FLR(n/(d*10))>=1 do d=d*10 end while d>=1 do ADD(l,FLR(n/d))n,d=n%d,d/10 end return l end

Keybase proof

I hereby claim:

  • I am caillef on github.
  • I am caillef (https://keybase.io/caillef) on keybase.
  • I have a public key ASBS5ueiQ3GjEEqnijzGCl6Wop-CdD97EVDfMGCjWdK0SAo

To claim this, I am signing this object: