Challenge Threadᆦ ᆦ ᆦ - Printable Version +- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum) +-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html) +--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html) +--- Thread: Challenge Threadᆦ ᆦ ᆦ (/thread-14681.html) |
RE: [CHALLENGE THREAD] - Homicide13 - 04-19-2012 (04-19-2012, 06:21 AM)Your Computer Wrote: Technically, you can determine an ending point by lack of collision of all sides, since the "matchbox" is going to be falling off the stage anyway.If you did that though wouldn't the script deem a four way intersection to be a proper stopping point? D: (as far as I know, you can't detect collision with a plane - only entities.) RE: [CHALLENGE THREAD] - Your Computer - 04-19-2012 (04-19-2012, 07:51 AM)Homicide13 Wrote: If you did that though wouldn't the script deem a four way intersection to be a proper stopping point? D: (as far as I know, you can't detect collision with a plane - only entities.) Yeah, but in neither of the four maps used to test the script will you encounter such a scenario. RE: [CHALLENGE THREAD] - Homicide13 - 04-19-2012 (04-19-2012, 08:36 AM)Your Computer Wrote: Yeah, but in neither of the four maps used to test the script will you encounter such a scenario.True, but for the sake of being thorough... ;_; RE: [CHALLENGE THREAD] - Your Computer - 04-19-2012 (04-19-2012, 08:43 AM)Homicide13 Wrote: True, but for the sake of being thorough... ;_; The intersection would have to be pretty wide and far apart, anyway. The A* search algorithm uses 8 boxes for path finding, so if the corner boxes collide with the corners of the intersection, it won't end there. RE: [CHALLENGE THREAD] - Apjjm - 04-19-2012 (04-19-2012, 06:05 AM)Homicide13 Wrote: Just to clarify, in the video do you have a pathnode (or i guess script area) to represent the end of the maze, or did you make the algorithm using the exact same map in the download link?I made the end node a specific point on the map (an arbitrary point outside the maze). I then made my goal test a simple point-in-cube test, and used straight line distance (divided by width of node to guarantee admissibility) as my heuristic function. I used the exact same maze as is in the download link. RE: [CHALLENGE THREAD] - nemesis567 - 04-19-2012 My first solution uses an array to represent the map into a simplified version so that you only determine the collision for each map and the coordinates of the start and ending point. RE: [CHALLENGE THREAD] - Homicide13 - 04-19-2012 (04-19-2012, 01:56 PM)Apjjm Wrote:Hm but you did edit the map file and add a script area at the end then? Or you just determined a point using you code?(04-19-2012, 06:05 AM)Homicide13 Wrote: Just to clarify, in the video do you have a pathnode (or i guess script area) to represent the end of the maze, or did you make the algorithm using the exact same map in the download link?I made the end node a specific point on the map (an arbitrary point outside the maze). I then made my goal test a simple point-in-cube test, and used straight line distance (divided by width of node to guarantee admissibility) as my heuristic function. RE: [CHALLENGE THREAD] - Apjjm - 04-19-2012 I just picked far away coordinate ( (0,0,35) or something) so that it would be outside all of the maps, no changes to any of the maps were necessary. RE: [CHALLENGE THREAD] - Homicide13 - 04-19-2012 (04-19-2012, 04:19 PM)Apjjm Wrote: I just picked far away coordinate ( (0,0,35) or something) so that it would be outside all of the maps, no changes to any of the maps were necessary.Alright, that's what I assumed but I just wanted to make sure, so I didn't try to start solving something that I wouldn't really be able to resolve. RE: [CHALLENGE THREAD] - Homicide13 - 04-20-2012 Hm the big problem I'm having with this challenge is that in order to determine if a space is free (and therefore if it should be considered an acceptable path) I would have to attach an object to the matchbox, add a collide callback, and then wait and only have the algorithm continue if some global variable wasn't changed by the collide callback. Does anyone know a specific way around this or am I just doomed to have the computer wait 0.1f seconds between each iteration? |