jakeHaasBlog / COMP4990_Dimension-Tamer

COMP 4990 Final Project (Jake Haas and Drew St. Amour)
0 stars 0 forks source link

Implement better algorithm for drawing line with tiles #19

Closed jakeHaasBlog closed 12 months ago

jakeHaasBlog commented 1 year ago

This function is currently being used to draw the paths. It leaves spots where the player cannot walk through because there are diagonals. The new function needs to ensure that each tile placed on the line connects to another path tile in one of the cardinal directions.

jakeHaasBlog commented 12 months ago

Replaced the function with Bresenham's algorithm. Added a helper function to connect each plotted point with a cardinal neighbor. Works very well 👍