Demonfaze
8 yrs. Hell, it's been a long time.
- Reaction score
- 72
Does anyone know of an efficient way to make a movement system based on a large array of squares.
Basically it would mean that units could move from "square to square" in a turn-based manner. I just need a way to efficiently manipulate the squares, along with the units that move on them (how far they can move, when they can move, etc).
All I can think of right now is making a rect for every square, then setting up a large point array that holds all of them, and doing arithmetic to detect the movement. This way would take me a very long time, so I want to make sure I am doing it correctly (or by another way if it is better) before I start.
Thanks.
Basically it would mean that units could move from "square to square" in a turn-based manner. I just need a way to efficiently manipulate the squares, along with the units that move on them (how far they can move, when they can move, etc).
All I can think of right now is making a rect for every square, then setting up a large point array that holds all of them, and doing arithmetic to detect the movement. This way would take me a very long time, so I want to make sure I am doing it correctly (or by another way if it is better) before I start.
Thanks.