Gamedev Problems: Grids
So, I think one of my favorite structures to use in games is a sparse 2D grid.
- Sparse: not every cell inside the grid bounds has to be set
- 2D: Cells are at x/y positions
- Grid: the x/y positions are usually integers, which means that you can math around them
The big thing about this sort of grid is that you can do a lot of things -with- them
Perhaps the most basic way you can use a grid is as a way to define a set of play spaces.