What is Snappit?
Snappit is a grid plot placement class that makes having a grid based plot placement system in your game literally so easy and straightforward!
It currently still a work in progress BUT it is almost done here is what it supports/upcoming features.
Grid
- Configurable gridSize

- Point Visualization

- Collisions

- Automatic Building Size to Grid Dimensions Size

Plots
- Plot Claiming

- Plot UnClaiming

- Plot Removal

- Plot Saving

- Plot Loading

- Plot Rotation Consistency

Placement
- Enter Building Mode

- Exit Building Mode

- Place

- Delete

- Rotate

- Lerp or Snap Movement (haha)

- BoundingBoxVisual

- HighlightVisual

Customization
- validPlacementColors

- invalidPlacementColors

- Lerp smooth factor

Is there any requirement or knowledge needed?
Nope! I’ve made this module as easy and straight-foward as possible to setup, the only thing you’ll be setting up is your games building data which will have the information about your building pieces
Quick Code Snippets
Setting up global grid info (runs only once)
local buildingPieces = (<buildingPieces path>)
local buildingData = (<buildingData path>)
local Snappit = require(<snappit path>)
local setupInfo = {
plotSize = 64,
gridSize = 15,
buildingPieces = buildingPieces,
buildingData = buildingData,
key_1 = "Structure",
key_2 = "Occupied"
}
Snappit.init(setupInfo)
Setting up individual plot info
local Snappit = require(<snappit path>)
local part = workspace.Plot
local plotInfo = {
plot = part,
canVisualize = true,
}
local plot = Snappit.new(plotInfo)
Setting the plot's owner
plot:SetOwner(<player>)
(You call these from the client)
Entering Build Mode
local Snappit = require(<snappit path>)
Snappit.EnterBuildingMode()
Exit Building Mode
local Snappit = require(<snappit path>)
Snappit.ExitBuildingMode()
Rotate
local Snappit = require(<snappit path>)
Snappit.Rotate()
Change Building Piece
local Snappit = require(<snappit path>)
Snappit.ChangeBuildingPiece(<pieceName>)
Testing with different grid sizes
12x12
5x5
50x50
- This will be very useful for me
- This won’t be that useful for me
Snappit will probably be out soon but this was pretty much a preview of what it’ll offer, still in the proccess of being made
Also thank you liam (@LiamSternenstei1) for inspiring me to create Snappit
made by @astraIboy
