Chapter 2. Navigation

In this chapter, we will cover the following recipes:

  • Representing the world with grids
  • Representing the world with Dirichlet domains
  • Representing the world with points of visibility
  • Representing the world with a self-made navigation mesh
  • Finding your way out of a maze with DFS
  • Finding the shortest path in a grid with BFS
  • Finding the shortest path with Dijkstra
  • Finding the best-promising path with A*
  • Improving A* for memory: IDA*
  • Planning navigation in several frames: time-sliced search
  • Smoothing a path

Introduction

In this chapter, we will learn path-finding algorithms for navigating complex scenarios. Game worlds are usually complex structures; whether a maze, an open world, or everything in between. That's why we need different techniques for approaching these kinds of problems.

We'll learn some ways of representing the world using different kinds of graph structures, and several algorithms for finding a path, each aimed at different situations.

It is worth mentioning that path-finding algorithms rely on techniques such as Seek and Arrive, learnt in the previous chapter, in order to navigate the map.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.128.200.220