[question]Creating and reading a game grid
This is it. After listening to the Social Network soundtrack all the way though and drinking 4 cups of coffee, I need your help.
Here is what I want to do - create a 12 by 12 grid and have a player control a 'character' that occupies 1 cell. AI NPCs will be added in later on, but the former is the key problem.
The cleanest solution would appear to be dumping it in a 12 by 12 array and getting/setting values from it.
Can you give any guide as too how I might accomplish this? My initial thoughts lie with enumerating the whole grid and then getting each object on the grid to move to an cell occupied by a certain number, (i.e. move to a position -12 of your current to move down) though I am aware this solution may be somewhat inelegant.
Please, any help you can offer would be hugely appreciated :D
Posted Dec 2, 2011, 1:05 AM UTC