I have a working grid based movement system (2D top-down) but I don’t know how to make a collision system. I have looked around a bit and seen people talk about using an array and such but not really explained how to do it in code (I only know the most basic stuff of coding such as If statements etc. when it comes to arrays and checking stuff I’m blank) so does anyone have any suggestions or example code to how I can implement collision via script?
Generally a grid is stored in a 2-dimensional array, but there are plenty of other ways to go about it.
To see one particular way, check out the free Roguelike2D tutorial from Unity in the asset store, or look for Youtube tutorials to learn a bit about arrays and 2-dimensional arrays.