I don't want to sound discouraging...but path finding can get pretty complicated, when the obstacle geometry gets complex. Are you sure you can't work with pre-made paths?
I could do that, and if I can't get this working soon that will be my only option, but I'm trying to base it off a really cool tower defense game for he iPod touch. Thanks for your help though!
Seems to me the simplest solution to the diagonal problem would be to make it illegal to make diagonal moves. Only allow moves in X or Y not both. Would that work?
Thanks for getting back to me. You always take the one look, that's why your one of my favorite Scratchers. :) What I did for this project is I based it off a straight line. The theory was it would avoid obstacles and then return to the straight path. Whenever the path finder touched the obstacle it was supposed to edit only that part of the list an return. I didn't fill in the gaps which is the reason it can go diagonally. I already tried editing the scripts for about two hours
OK, I have been trying to figure out the diagonal bug for two hours and still haven't figured it out. Can you have a go? After that, we might need help from a proffesional (Paddle2See)!
UPDATE: shadow_7283
FINALLY IT WORKS. After four tests with an 80% accuracy rate I can finally say IT WORKS! There is still a little tweaking to do, such as when there are two obstacles diagonal from each other (it thinks it can skip past the second one) but it works for the most part and I would have to add some major adjustments to fix that particular glitch. Enjoy, and post your precentage results!
This short demo is for the upcoming Tower Defense game The Whiz and I will be developing. This program should draw a simple map and the grey sqaure should follow the shortest route. I haven't had time to test it properly, so if someone could create some walls in the map by changing the 01s in the "map grid" list to 04s, that would be awesome. Please tell me your results.
Comments
You need to be logged in to post comments
Add a Comment
It works very well but sometimes it will jump over some blocks.
That's the same one I tried to use for another failed attempt. I can post it online if you'd like. Maybe we can figure this out. :D
(view all replies)Thanks!
(view all replies)Thanks, but I didn't manage to figure it out, and I don't remember the website. Oh well.
(view all replies)Sweet - I agree with paddle2see though, it might get pretty advanced if you keep building on it.
I'm working on it. I found a website that might break it down into english for me. :D
(view all replies)Yeah, I don't really have any hope for it anymore . . . But I'm sure you might be able to figure it out!
(view all replies)(link to project) the sequeal is out to my adventure of johnny and it now has 20 levels !
I don't want to sound discouraging...but path finding can get pretty complicated, when the obstacle geometry gets complex. Are you sure you can't work with pre-made paths?
You know, I haven't had any luck, but I'm sure you could figure it out. That would be a cool idea for a project!
I could do that, and if I can't get this working soon that will be my only option, but I'm trying to base it off a really cool tower defense game for he iPod touch. Thanks for your help though!
(view all replies)Seems to me the simplest solution to the diagonal problem would be to make it illegal to make diagonal moves. Only allow moves in X or Y not both. Would that work?
And got nowhere. if that makes no sense I think you should download he project. Though your comment just inspired me...
Thanks for getting back to me. You always take the one look, that's why your one of my favorite Scratchers. :) What I did for this project is I based it off a straight line. The theory was it would avoid obstacles and then return to the straight path. Whenever the path finder touched the obstacle it was supposed to edit only that part of the list an return. I didn't fill in the gaps which is the reason it can go diagonally. I already tried editing the scripts for about two hours
(view all replies)It works!
No problem.
OK, I have been trying to figure out the diagonal bug for two hours and still haven't figured it out. Can you have a go? After that, we might need help from a proffesional (Paddle2See)!
(view all replies)Thanks.
HOORAY!!!
Please work!
OK! I fixed it!