Significance of Bresenhams Line of Sight algorithm
Posted
by
GamDroid
on Game Development
See other posts from Game Development
or by GamDroid
Published on 2011-03-01T11:04:00Z
Indexed on
2011/03/01
15:33 UTC
Read the original article
Hit count: 852
algorithm
What is the significance of Bresenhams Line of Sight algorithm in chasing and evading in games?
As far as i know and implemented this algorithm calulates the straight line between two given points. However while implementing it in game development i stored the points calculated using this algorithm in an array.Then im traversing this array for chasing and evading purpose. This looks to be working good with some angles only.In an pixel based environment/tile based.
What if there are some obstacles added in the paths of the two points? then this algorithm will not work right?
How well can we use the Bresenhams Line algorithm in game development?
© Game Development or respective owner