A downloadable asset pack

Buy Now$1.99 USD or more

This Asset Is ONLY For GameMaker Studio v2.3+

Ever wanted to check to see if there is a collision within an arc of a circle or create a "cone of vision" for AI? Well, you can, and easily, with this asset! You do not even need to change anything, just add the scripts and call them like any other GML function!

This asset contains two sets of scripts:

  • Set One: This set contains the basic collision_arc and collision_arc_list() functions that work exactly the same as the GML collision_* functions. Additionally, there is the collision_arc_draw() function that permits you to draw the defined collision arc to the screen using the colour, texture and blending of your choice.

  • Set Two: This set contains the collision_arc_adv() scripts. These functions are designed to help create an AI "cone of vision", and as such require you to call a set up function in the Create Event of the instance to use them, before calling the general collision_arc_adv() or collision_arc_adv_list() functions in the Step Event. The idea here is that the functions will not only check for an instance within the collision arc, but they will also check to see if the instance can be "seen" or not by checking to see if there is a line of sight between the calling instance and the "seen" instance. This line of sight will be checked against the "wall" object of your choice, or even a tile layer that you give (or both, so you can use the tile layer for "walls" and then use instances for additional obstacles). These instance scripts also have draw functions which include a batching draw set to more efficiently draw the collision arcs. There are also "getter" scripts and "setter" functions, making them incredibly easy to use..

Both sets of scripts have a "fast" option which can be enabled or disabled to use better precision or not, and all scripts have been highly optimised and contain extensive comments. 

The demo contains a fairly decent AI in the example room that can be used as a great starting point for a top down game, and there is an additional "stand alone script" - collision_line_tiles(). This can be used outside of this project as a general collision function for tiles in any game.

All of this is illustrated in the Demo that comes with the scripts.

Purchase

Buy Now$1.99 USD or more

In order to download this asset pack you must purchase it at or above the minimum price of $1.99 USD. You will get access to the following files:

com.nocturnegames.collisionarc.yymps 85 kB

Development log

Leave a comment

Log in with itch.io to leave a comment.