ogrady / mw3

Metal Warriors 3
2 stars 0 forks source link

Investigate on pathfinding #29

Open ogrady opened 10 years ago

ogrady commented 10 years ago

When we start implementing NPCs, one obstacle will be that our NPCs are not the same size as one tile of the map. In fact, probably every mech will have his very own size. This might make the use of classic pathfinding dire. Slick2D provides us with pathfinding, to which we maybe can pass those sorts of context-information. http://slick.ninjacave.com/javadoc/org/newdawn/slick/util/pathfinding/package-summary.html If this doesn't work, we might have to span artificial grids for each sort of mech and maintain them whenever the map is manipulated.

ogrady commented 10 years ago

Idea for this:

As we have O(n^2) thrice, it would be nice to store the merged grid for every sort of entity and register them as listeners for the map, to rebuild the grid if needed, instead of building the whole grid each time an entity moves.