Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17625

Help with Walkable areas in Point and Click engine

$
0
0

Hello,

I'm working on a point'n'click engine, and I've having some issues with the walkable area (that's the area in the screen where the character can walk to). I define the walkable area using a polygon class where I add the vertices of the polygon (in green). Every time the player clicks on the screen, I check if the destination position (pixel) belongs to the walkable area. If it belongs, I calculate the shortest path to the destination (using Dijkstra algorithm). If not, I calculate the intersection point between the polygon and line from the …


Viewing all articles
Browse latest Browse all 17625

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>