PurpleKingdomGames / indigo

An FP game engine for Scala.
https://indigoengine.io/
MIT License
650 stars 60 forks source link

Fixed #671: Bresenham's line algorithm port #673

Closed davesmith00000 closed 11 months ago

davesmith00000 commented 11 months ago

This PR ports the Bresenham's line algorithm implementation from the Roguelike-Starterkit back to Indigo's extras package.

It's for this sort of thing, useful for drawing pixel art lines and doing line of sight checks across grids and so on.

image

https://en.wikipedia.org/wiki/Bresenham%27s_line_algorithm