Closed Brannalbin closed 6 years ago
That sounds like a good idea, but making the PathFinder generic is something I experimented with before, and it will reduce the performance more than the benefit of being able to use an integer. For an integer pathfinder I would need to duplicate most of the code. Not necessarily an insurmountable obstacle. But do you think performance is not good enough right now?
(This testing was several years ago on an older A* implementation, results might vary :) )
Another question would be. Do we really need integers, or are in this case bytes enough?
After thinking some more about this, I think its not a good idea. Using integers or bytes will not give you the ability to make cells only a little bit more expensive. The memory consumption for floats and ints is the same and even on the processing side I'm not sure if it will gain much as CPUs are very getting better and better at doing floating point work. (Though I think it still costs multiple cycles). :)
If you see other reasons, please feel free to re-open this ticket.
Floats seem overkill for many scenarios so it would be nice to be able to use int's, too.