3 ms·
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 inver
by chipsy 12y ago
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.
- CamperBob2 12y agoBresenham-rendered lines are symmetrical if you start with a half-step, aren't they?
- abcd_f 12y agoPray tell which tactical combat game determines the line of sight using a discrete grid.
- mattdesl 12y agoAn awful lot of top down 2D tile based games.
- TheLoneWolfling 12y ago"Just" use a hex grid. (And then have fun with your raycasting)