Hi everyone,
I need suggestions on the best way to make a mini game that requires objects of different shapes take different positions on a grid. I've played around with shapes that omly occupies one cell on the grid but I've not been able to find a solution to a shape that occupies multiple cells while being able to place it anywhere on the grid.
The use case is:
- User drags shape on to the grid
- Grid shows green highlight if shape is within grid and if occupied cells are empty
- Grid shows red highlight if shape is outside grid or if cell is already occupied
- Shape should be able to occupy any space within grid unless there is another shape there already.
Pointers in the right direction will be very much appreciated.
I made a prototype of the idea below:
I need suggestions on the best way to make a mini game that requires objects of different shapes take different positions on a grid. I've played around with shapes that omly occupies one cell on the grid but I've not been able to find a solution to a shape that occupies multiple cells while being able to place it anywhere on the grid.
The use case is:
- User drags shape on to the grid
- Grid shows green highlight if shape is within grid and if occupied cells are empty
- Grid shows red highlight if shape is outside grid or if cell is already occupied
- Shape should be able to occupy any space within grid unless there is another shape there already.
Pointers in the right direction will be very much appreciated.
I made a prototype of the idea below: