Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(+1)

Hey thanks! You're correct - I'm using an open source Javascript A* algorithm for path finding (https://www.easystarjs.com/). To set up the movement grid, for every object in the scene I specify a y-coordinate that's a "cross-over" point for the character either being in front of or behind the object. Then, for every pixel coordinate in the object below that y-coordinate, if it's not clear (alpha==0), then it gets set in the movement grid as non-walkable. Otherwise, it's a valid location for the algorithm to walk to and then gets z-ordered based on whether he's below/above that objects y-coordinate cross over point.