Description

This function is an implementation of Bresenham's line algorithm used on a Grid Ds.

funcDsGridSetLine(id,x1,y1,x2,y2,value);

Demo Windows: https://www.dropbox.com/s/fpedzj0sjr7uc1t/Demo.exe?dl=0

End User Licence Agreement (EULA).

Version 1.0.0. Published March 28, 2015

Created with GameMaker: Studio v1.4.1567

Age Rating: 4+

Average Rating

Your review

You can only review assets you've bought.


Gravatar

Mikael N 14 April 2018

Exactly what I was looking for!


Gravatar

R1ckx P 20 July 2016

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:

var x1=clamp(round(argument1),0,511);
var y1=clamp(round(argument2),0,511);
var x2=clamp(round(argument3),0,511);
var y2=clamp(round(argument4),0,511);

If that could be fixed, it's worth a 5/5 without a doubt!

Package contents

Loading, please wait

What is the issue?

Back to Top