Tile Based Path/Line algorythms
Hi,
Ok i know quite a few of the aspects needed to create an isometric game (ala xcom) but what i am confused about is how
to do a line of sight pathing algorythm.
For instance in a 2d grid [x][y] you can simply use Bresnhams line algorythm to find out what points are traversed from 2 x,y pairs.
But if you have multiple levels ala xcom using a 3d grid [x][y][z] how would you find out the points traveled from 2 x,y,z coordinates? Does anyone know how to either modify Bresnhams line algorythm so it works in a 3d grid or does anyone know another technique.
Please help
Jason Wroe
email: Jason@kmsoftware.com
What''s Bresnhams line algorythm? Can someone explain this to me.
Octavian
E-mail: octav@octavsoft.com
Webpage: http://www.octavsoft.com
Octavian
E-mail: octav@octavsoft.com
Webpage: http://www.octavsoft.com
OctavianE-mail: [email=octav@octavsoft.com]octav@octavsoft.com[/email]Webpage: http://www.octavsoft.com
This is something I have had to address recently. I have started work on an isometric strategy game (but rendered through D3D) a few weeks ago, and 3d line of sight is part of my engine.
I dont know the algorythm for generating a sphere (which is what you really need), so I kind of hacked a routine together that checks multiple levels based on whether or not floor tiles are present on the levels above and below the current one. With a slight modification, you will be able to modify your existing LOS routine to cover this.
BTW The Bresenham line routine is perfect for this task. For anyone who doesnt know, it is a super-quick point to point routine.
I dont know the algorythm for generating a sphere (which is what you really need), so I kind of hacked a routine together that checks multiple levels based on whether or not floor tiles are present on the levels above and below the current one. With a slight modification, you will be able to modify your existing LOS routine to cover this.
BTW The Bresenham line routine is perfect for this task. For anyone who doesnt know, it is a super-quick point to point routine.
“If you try and please everyone, you won’t please anyone.”
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement