07-03-2005, 10:25 AM
I have to admit, walking through walls makes moving a lot easier! For example, try this map using dumbledore's code and then try Torahteen's (since mine does the same thing, only with ASCII):
You'll have to change dumbledore's slightly to make it open it from an external file (or type DATA for every line. . .). Also, dumbledore's code is ignorant of all obstacles (1-3) except walls, which appears to make him use an extra step (adds to the gScore).
Maybe we should give a name to the solving of this phenomenon of walking through walls in programming. . . Something like "no-ghost code". . . (cheesy, I know :rotfl
Code:
40,20
4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4
4,0,0,2,2,2,2,4,4,4,4,0,0,0,0,2,2,2,2,4,4,4,4,0,0,0,0,2,2,2,2,4,4,4,0,0,0,0,2,4
4,2,4,4,4,4,0,0,0,0,2,2,2,2,4,4,4,4,0,6,0,0,2,2,2,2,4,4,4,4,0,0,0,0,2,2,2,2,4,4
4,4,0,0,0,0,2,2,2,2,4,4,4,4,0,0,0,0,2,2,2,2,4,4,4,4,0,0,0,0,2,2,2,2,3,3,3,3,5,4
4,3,1,1,1,1,3,3,3,3,2,2,2,2,1,1,1,1,3,3,3,3,4,4,4,4,1,1,1,1,3,3,3,3,3,3,3,3,1,4
4,1,3,3,3,3,2,2,2,2,1,1,1,1,3,3,3,3,4,4,4,4,1,1,1,1,3,3,3,3,3,3,3,3,1,1,1,1,3,4
4,3,1,1,1,1,1,1,1,1,3,3,3,3,4,4,4,4,1,1,1,1,3,3,3,3,2,2,2,2,1,1,1,3,3,3,3,4,4,4
4,0,0,0,0,2,2,2,2,4,4,4,4,0,0,0,0,2,2,2,2,4,4,4,4,0,0,0,0,2,2,2,2,4,4,4,4,0,0,4
4,2,2,2,2,4,4,4,4,0,0,0,0,2,2,2,2,4,4,4,4,0,0,0,0,2,2,2,2,4,4,4,4,0,0,0,0,2,2,4
4,4,4,4,4,0,0,0,0,2,2,2,2,4,4,4,4,0,0,0,0,2,2,2,2,4,4,4,4,0,0,0,0,2,2,2,2,4,4,4
4,4,4,4,4,1,1,1,1,3,3,3,3,3,3,3,3,1,1,1,1,3,3,3,3,2,2,2,2,1,1,1,1,3,3,3,3,4,4,4
4,1,1,1,1,3,3,3,3,3,3,3,3,1,1,1,1,3,3,3,3,1,1,1,1,1,1,1,1,3,3,3,3,4,4,4,1,1,1,4
4,3,3,3,2,2,2,2,1,1,1,1,3,3,3,3,1,1,1,1,1,1,1,1,3,3,3,3,3,3,3,3,1,1,1,1,3,3,3,4
4,2,2,2,1,1,1,1,2,2,2,2,4,4,4,4,0,0,0,0,2,2,2,2,4,4,4,4,0,0,0,0,2,2,2,2,4,4,4,4
4,0,0,0,2,2,2,2,4,4,4,4,0,0,0,0,2,2,2,2,4,4,4,4,0,0,0,0,2,2,2,2,4,4,4,4,0,0,0,4
4,2,2,2,4,4,4,4,0,0,0,0,2,2,2,2,4,4,4,4,0,0,0,0,2,2,2,2,4,4,4,4,0,0,0,0,2,2,2,4
4,4,4,4,0,0,0,0,2,2,2,2,3,3,3,3,4,4,4,4,1,1,1,1,3,3,3,3,3,3,3,3,1,1,1,1,3,3,3,4
4,1,1,1,1,1,1,1,3,3,3,4,4,4,4,1,1,1,1,3,3,3,3,2,2,2,2,1,1,1,1,3,3,3,3,1,1,1,1,4
4,1,1,3,3,3,3,3,3,3,3,1,1,1,1,3,3,3,3,2,2,2,2,1,1,1,1,3,3,3,3,4,4,4,4,1,1,1,1,4
4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4
You'll have to change dumbledore's slightly to make it open it from an external file (or type DATA for every line. . .). Also, dumbledore's code is ignorant of all obstacles (1-3) except walls, which appears to make him use an extra step (adds to the gScore).
Maybe we should give a name to the solving of this phenomenon of walking through walls in programming. . . Something like "no-ghost code". . . (cheesy, I know :rotfl
974277320612072617420666C61696C21 (Hexadecimal for those who don't know)