Sim Posted January 19, 2015 Share Posted January 19, 2015 Coded this tonight.Figured I would show it off and share some knowledge. =] http://afangame.com/PathFollow/path.html Download The Code Quote Link to comment Share on other sites More sharing options...
Script47 Posted January 19, 2015 Share Posted January 19, 2015 (edited) You should get it to wait while the page loads fully. Because when I first loaded it, I just saw a red block moving on nothing. Looks good otherwise, did you use some sort of tiling tool? Edited January 19, 2015 by Script47 Quote Link to comment Share on other sites More sharing options...
Sim Posted January 19, 2015 Author Share Posted January 19, 2015 Tiling tool for what? Quote Link to comment Share on other sites More sharing options...
Script47 Posted January 19, 2015 Share Posted January 19, 2015 Tiling tool for what? I thought you may tiled where the red box goes. Quote Link to comment Share on other sites More sharing options...
Coly010 Posted January 19, 2015 Share Posted January 19, 2015 You say pre-defined, does that mean you simply have it coded so that it does a certain action once it gets to a certain point? What would be impressive, whilst also challenging, is if you set up an object called boundary, then you set up a load of boundaries, and gave the box a bit of AI code in which it decides for itself what way it should go to navigate it's what through the path. You have it determine where boundaries are and move in a direction away from the boundary, but never back on itself, done by storing the previous direction and preventing it from going back that way. Quote Link to comment Share on other sites More sharing options...
gamble Posted January 19, 2015 Share Posted January 19, 2015 No offense but if you guys looked at the code it would answer all of your questions for the most part Quote Link to comment Share on other sites More sharing options...
Script47 Posted January 19, 2015 Share Posted January 19, 2015 No offense but if you guys looked at the code it would answer all of your questions for the most part True, but some of us are lazy. :p Quote Link to comment Share on other sites More sharing options...
Sim Posted January 19, 2015 Author Share Posted January 19, 2015 You say pre-defined, does that mean you simply have it coded so that it does a certain action once it gets to a certain point? What would be impressive, whilst also challenging, is if you set up an object called boundary, then you set up a load of boundaries, and gave the box a bit of AI code in which it decides for itself what way it should go to navigate it's what through the path. You have it determine where boundaries are and move in a direction away from the boundary, but never back on itself, done by storing the previous direction and preventing it from going back that way. This is a basic concept used in a lot of games. I can't remember the exact name of the concept. It has the words chain and tween in it. It may be called Chain Tweening or something. More advance one's use radius around the grid point's it is suppose to go to, so it doesn't have to travel from point a->b->c, but can hit anywhere on the radius. Quote Link to comment Share on other sites More sharing options...
Ishraq Posted January 20, 2015 Share Posted January 20, 2015 This looks great. I will try and improve it a little bit. :) Quote Link to comment Share on other sites More sharing options...
Script47 Posted January 20, 2015 Share Posted January 20, 2015 This looks great. I will try and improve it a little bit. :) How so? Curious. Quote Link to comment Share on other sites More sharing options...
Sim Posted January 21, 2015 Author Share Posted January 21, 2015 How so? Curious. With magick?? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.