Open Source Cell Based Grid Placement System

Cell Based Grid Placement System

A simple cell based grid placement system. DataStores are handled using ProfileService. UI is made using Fusion. State is handling using Rodux. Everything is combined using Knit framework.


Links

Roblox Demo Place: Cell Based Grid Placement System - Roblox

Github: https://github.com/Y1195/Cell-Based-Placement-System

Video Demo: Roblox: Cell Based Grid Placement System - YouTube


There are some comments left throughout the project but nothing is heavily documented.

A main goal of this project is showing a little bit on how these libraries can be used and showing the separation of objects and data.



TODO

Removing objects from the plot

Throttle replicating objects


This project is intended to be a resource to learn from. I do not recommend building a game using this as a template.

Do point out anything that I could have done differently.

67 Likes

I love this, I saw it on waywoc, can’t wait to see more of your work!

This looks awesome, can you tell me the basics of this? I am not quite and advanced scripter, I can make a placement system, but not with grids.

1 Like

Each Grid has X * Y number of Cells. Each Cell can hold something called a CellObject The CellObject contains the value that is in that Cell, whether it is a value or object.

Grid > Cell > CellObject > Any value or physical object in workspace.

3 Likes

Ah I see it goes in an order thanks.

1 Like

I was reading through the code and I saw this:
image

what does the size represent?

1 Like

How many cells an object takes up. The lamp is 1x1, the table is 2x1, and the tree is 3x3.

1 Like

Dang that UI is clean! Great job on it, might end up using this in the future.

1 Like

Oh, thanks, that makes more sense. I was just confused because it was a Vector2 and not a Vector3.

1 Like

saw you working on this, was excited for it. now that its here i am happy

1 Like

How would I change how far objects snap?
image
I changed the 4 to 10 and it completely broke. I changed the sizes of the plots to a multiple of 10, and that didn’t work either.

1 Like

just resize them with the resize tool? it worked for me

Simply changing the grid size should do it. Can you describe what is happening when you change the grid size?

I have no clue on how I didn’t see the PlotConfig script until now. Before I was trying to change it in the build modules.

PlotConfig was just added.

Instead of changing the cell size in 2 different places, there is only one place to change.

2 Likes

How well does it work? Can I use it for my game?

1 Like

works pretty good, its just that 1 player cant have 2 plots or more

1 Like