I found this implementation of Bresenham's Line algorithm efficient enough for real-time:
http://en.literateprograms.org/Bresenham's_line_algorithm_(Python)?oldid=16281 Gumm On Mon, Aug 16, 2010 at 7:43 PM, Mark Reed <markree...@gmail.com> wrote: > I want to calculate a straight path of points between two points and > each frame do: > > sprite.x, sprite.y = sprite.path[step] > step++ > > And have the sprite move along that line. I've lost all basic math > skills, and don't want to spend an hour debugging such a simple thing. > > Mark > > On Tue, Aug 17, 2010 at 9:41 AM, Luke Paireepinart > <rabidpoob...@gmail.com> wrote: > > Can you be more specific about what you mean? Are you trying to > interpolated points between two endpoints or what? > > > > Sent from my iPhone > > > > On Aug 16, 2010, at 8:13 PM, Mark Reed <markree...@gmail.com> wrote: > > > >> Anyone have a function for calculating all the points on a line to be > >> used for sprite movement? > >> > >> Mark > > >