Computing the position of objects in a game is one of the most frequent features to be carried out: where to stop a movement (to avoid a collision)? Where to hide, protect or start a jump? Where do two zones intersect (which objects will be affected by the zone of effect of my action)?
The goal of this presentation is to suggest that solving the analytical geometry equations resulting from the various game situations is preferable to using the various environment projection queries provided by your favourite game engine: first write the equations to which the coordinates of the game objects must conform, then solve these equations to obtain the numerical values of these coordinates; and don’t forget to get help from a math software. These two steps will be illustrated in the case of projecting a grid onto a navigation surface for the Unreal Engine with the help of Mathematica.
Takeaways: This presentation is intended for AI game developers facing one of the three situations:
- Too much computing resources are spent generating sample locations and then filtering them
- Write and solve the equations modelling the geometric problem
- Too many erroneous or approximate locations require post-processing to be usable
- Compute values from exact solutions of your geometric problems
- Bullet proofs tests of locations are needed
- Compare locations with exact solutions of your geometric equations