This function is an implementation of Bresenham's line algorithm used on a Grid Ds.
Demo Windows: https://www.dropbox.com/s/fpedzj0sjr7uc1t/Demo.exe?dl=0
Version 1.0.0. Published March 28, 2015
Created with GameMaker: Studio v1.4.1567
You can only review assets you've bought.
Exactly what I was looking for!
It's what you'd expect
An awesome, yet very simple and powerful script that's really easy to understand (yet sadly not commented). For it's extreme price (literally free) this must be in your collection, no matter if you want it or not.
Not only is this usefull for ds grids, you can easly modify the script to make it work with drawing on a surface too, or even collision checking. It's literally awesome, and it just works.
Only downfalls of this script is that it isn't commented at all, and if you use decimal numbers the game will freeze. Always round your numbers and clamp them within the range of your surface to prevent errors. For instance, for a surface with a size of 512x512:
If that could be fixed, it's worth a 5/5 without a doubt!