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.
[ Parent
| on HN ]
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)
Pray tell which tactical combat game determines the line of sight using a discrete grid.