tailieunhanh - Advanced 3D Game Programming with DirectX - phần 5

Đường dẫn sau đây là quá trình của một cái nhìn đại lý thông minh bằng cách tiến tới đích của nó bằng cách sử dụng một con đường hợp lý. "Đi theo con đường" thực sự chỉ là một nửa của hình ảnh. Sau một con đường một khi bạn cho nó là khá dễ dàng. Phần khó là tạo ra một con đường hợp lý để nhắm mục tiêu một. Điều này được gọi là đường dẫn lập kế hoạch. | Path Following Path following is the process of making an agent look intelligent by having it proceed to its destination using a logical path. The term path following is really only half of the picture. Following a path once you re given it is fairly easy. The tricky part is generating a logical path to a target. This is called path planning. Before it is possible to create a logical path it must be defined. For example if a creature s desired destination handed to it from the motivation code is on the other side of a steep ravine a logical path would probably be to walk to the nearest bridge cross the ravine then walk to the target. If there were a steep mountain separating it from its target the most logical path would be to walk around the mountain instead of whipping out climbing gear. A slightly more precise definition of a logical path is the path of least resistance. Resistance can be defined as one of a million possible things from a lava pit to a strong enemy to a brick wall. In an example of a world with no environmental hazards enemies cliffs or whatnot the path of least resistance is the shortest one as shown in Figure . Figure Choosing paths based on length alone Other worlds are not so constant. Resistance factors can be worked into algorithms to account for something like a room that has the chance of being filled with lava like the main area of DM2 in Quake . Even if traveling through the lava room is the shortest of all possible paths using sheer distance the most logical path is to avoid the lava room if it made sense. Luckily once the path finding algorithm is set up modifying it to support other kinds of cost besides distance is a fairly trivial task. If other factors are taken into account the chosen path may be different. See Figure . 285 Figure Choosing paths based on other criterion Groundwork While there are algorithms for path planning in just about every sort of environment I m going to focus on path planning in networked .

crossorigin="anonymous">
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.