News for hackers. Stuff that matters.
Re:Line drawing on a grid by chipsy on Wednesday December 31, 2014 @05:13AM (#8818805)
Bresenham lines are not "quality." For one, they're obviously jaggy. As well, most implementations of the algorithm will give you different results if you invert the start and end points. This matters a great deal for the common use-case in games of casting rays to determine sight lines. It is quite annoying to have a tactical combat game where a foe can shoot from behind a wall and you can't shoot back from the exact same position. Amit notes lack of symmetry in the "2.1 Orthogonal steps" implementation, which leads him to the "Supercover" implementation.
Re:Line drawing on a grid by CamperBob2 on Wednesday December 31, 2014 @06:10AM (#8818932)
Bresenham-rendered lines are symmetrical if you start with a half-step, aren't they?
Re:Line drawing on a grid by TheLoneWolfling on Wednesday December 31, 2014 @08:09AM (#8819189)
"Just" use a hex grid.

(And then have fun with your raycasting)

Re:Line drawing on a grid by abcd_f on Wednesday December 31, 2014 @07:33AM (#8819097)
Pray tell which tactical combat game determines the line of sight using a discrete grid.
Re:Line drawing on a grid by mattdesl on Wednesday December 31, 2014 @10:56AM (#8819794)
An awful lot of top down 2D tile based games.