Posted 25 March 2012 - 10:19 AM
Posted 25 March 2012 - 10:59 AM
Artificial Intelligence Systems
The methods you choose depend upon your capabilities, if you are using Lite or a registered version of Game Maker and if you use GML coding. Some techniques are not available using drag and drop actions alone. There is no "one size fits all" solution. Object avoidance using dynamically created paths can offer a superior movement but they can become CPU intensive.
The simplest uses the mp_potential step method to allow the instance to step towards a target avoiding obstacles. This method does not always find the shortest path and can cause dithering but it is simple to implement and adequate for many uses.
If you have Pro / 8.1 Standards you can use mp_grid_path functions to give you superior movement but you must design the grid to fit the sprites using it. From the manual:
Clearly this involves some advanced functions and a bit of trial and error initially but if you are using a Lite version then you can't use this functionality.
The grid-based approach is very powerful (and is used in many professional games) but it requires that you do some careful thinking. You must determine which area and cell size are good enough for solving the game. Also you must determine which objects must be avoided and whether precise checking is important. All these parameters strongly influence the efficiency of the approach.
Posted 25 March 2012 - 11:02 AM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users