This is a on-going Document based tutorial about moving ENT's along a WED PATH-line with collision.

Why this and why paths?
Well, when it comes doing NPC route movement , if there is no need for the NPC to seek out and navigate through the game world in a random or shortest/targeted manner, than patrolling a PATH is perfect. Games have used simple 3 or 4 point patrolling actions for over 2 decades to bring movement without random chaos to NPC's. While many people still use entity bread crumb or entity nodes for this movement, Paths work better and with less CPU , memory and Vram cost.
There is very little saving to be had with vector list and tables as Path's basically fill the path list will this data.

But why code it?
The problem is simple. The path instructions we have, either don't work well, don't work easily or in some cases don't do collision checks. Also I kind write code, um that is my thing and all. Lastly learning , writing and using logic can only better us(well me at least - more logic less wildman wink ).

Could any of the built in instruction be used?
I'm not sure, but probably. Either I was to dumb to make it work or it doesn't work how I'd like.

So what is here?
#Ver 1 simply covers the Path following code I posted long ago. It's and attempt to teach and explain what, how, and why it does what it does. The goal is to empower anyone that needs to mod it(and you will need to). Here is the link to the tutorial GDoc Link to the tutorial
Here is the Original posting http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=455440#Post455440

What is coming?
In #Ver 2 - I am placing functionality for handling paths as curves. In my first code the ent follows in straight lines from node to node. This never made me happy in my own projects. I always wanted curving and arc-like movements as well as a touch more randomness. So I'll be adding it. Are there better ways than whatever I do? Yes, sure. Could you do better? Yes sure. But then you have no need to read or follow along with this work. It can really to a tutorial for you if you already know better... laugh

Suggestion Corrections and Documentation fixes should be posted to this tread. I will not trouble shoot code here. I'll happy fix errors in the tutorial and correct or clarify trouble spots. So if you feel need or see a problem or get lost - Post me to look into the issues.

Thanks for reading this and hopeful you find this thread and tutorial helpful.


LINKS
Ver 1 GDoc Link to the tutorial
- Forget the tutorial just give me the files GIVE ME THE FILES!!!!
-Video I couldn't embed in the GDoc(Why Google??) [video:youtube]https://youtu.be/YM4U_nWbFXc[/video]

UPDATES 6-10-2016
A show-before-tell video of the curves from upcoming Doc Ver2 https://youtu.be/DSZibIFWM1w

UPDATES 6-14-2016
I will be suspending writing a tutorial document. However, I will be posting Code File download links and video example. Working on this I got really interested in bezier curve 's and will be posting little implementations of them in many ways(As long as I'm interested in the) in the comping future. Keep a eye out for new links. Unless there is any really need to write this kind of tutorial, than it's easier to post videos and dl links.

Last edited by Malice; 06/15/16 01:36.