|
| 31 Mar 2012 02:09 PM |
It's been a while. I've been learning some PHP and I've been maintaining my own MC server. I have to give Roblox credit for getting me interested in programming but they changed allot! And, I think, for the worse. I miss the old, simple studio gameplay...
You guys, however, are the best forum I know of for programming and I have a question.(That can be incorporated into Roblox)
If you have, for instance, a table of objects containing x and y coordinates along with width and height, is it possible to path-find freely through space using these as areas to avoid without using a grid-like node structure?
I consider this an advanced scripting topic so I posted it here.
~Read Between The Squiggles~ |
|
|
| Report Abuse |
|
|
Ozzypig
|
  |
| Joined: 27 Mar 2008 |
| Total Posts: 4906 |
|
|
| 31 Mar 2012 02:13 PM |
You're basically asking if it is impossible to perform 3D path-finding algorithms without using a 3D representation in code.
I'd say "No". |
|
|
| Report Abuse |
|
|
|
| 31 Mar 2012 02:15 PM |
"You're basically asking if it is impossible to perform 3D path-finding algorithms without using a 3D representation in code."
My apologies; it would be in a 2D environment.
~Read Between The Squiggles~ |
|
|
| Report Abuse |
|
|
|
| 31 Mar 2012 02:29 PM |
No replies?
~Read Between The Squiggles~ |
|
|
| Report Abuse |
|
|
cymru72
|
  |
| Joined: 26 Jan 2008 |
| Total Posts: 4362 |
|
|
| 31 Mar 2012 02:33 PM |
| Elaborate further, your previous explanation doesn't make much sense to me |
|
|
| Report Abuse |
|
|
|
| 31 Mar 2012 02:35 PM |
Ok, so, I want to path-find across a 2D plane. I would have a table of objects. Each object would have a location and size. Is it possible to path-find with this type of setup? I'm not too interested in creating a node-map or having a grid-based node-map being generated.
~Read Btween The Squiggles~ |
|
|
| Report Abuse |
|
|
myrkos
|
  |
| Joined: 06 Sep 2010 |
| Total Posts: 8072 |
|
|
| 31 Mar 2012 02:39 PM |
| I guess, but without creating another data structure it would be really inefficient because you would have to search the table for specific coordinates a very large amount of times. |
|
|
| Report Abuse |
|
|
cymru72
|
  |
| Joined: 26 Jan 2008 |
| Total Posts: 4362 |
|
|
| 31 Mar 2012 02:39 PM |
Yes, you could. Why don't you want to split the map up into a grid?
If you don't want nodes, grids etc you could trace a line from A to B and find any intersecting obstructions and change direction accordingly to reach the end point. |
|
|
| Report Abuse |
|
|
|
| 31 Mar 2012 02:41 PM |
I was thinking that something like this would be more efficient because you wouldn't have to generate a grid every time you try to path-find. I've just been thinking about path-finding recently and had this as an idea.
~Read Between The Squiggles~ |
|
|
| Report Abuse |
|
|
myrkos
|
  |
| Joined: 06 Sep 2010 |
| Total Posts: 8072 |
|
|
| 31 Mar 2012 02:43 PM |
| It would be much easier and efficient to generate a grid and refer to that instead of iterating the table hundreds of times. |
|
|
| Report Abuse |
|
|
|
| 31 Mar 2012 02:45 PM |
Ok, thanks for the advice guys!
~Read Between The Squiggles~ |
|
|
| Report Abuse |
|
|
|
| 31 Mar 2012 02:52 PM |
| Y U NO LEARN HTML AND JavaScript?! |
|
|
| Report Abuse |
|
|