• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

 [SUGGESTION] Motion Planning (some new functions)

xDGameStudios

GameMaker Staff
GameMaker Dev.
Hi everyone!
today I was looking at motion planning functions and it hit me that a few functionalities would be very helpful in a performant wise implementation.

1) mp_grid uses -1 for occupied and 0 for empty, it really is a bit odd, 0 for empty is a good -1 for occupied not so much, what if it stored actually the id of the obj it is holding?! (this got me to the 2 functionality)

2) mp_grid_remove_instances(obj)! why this is important?! this would be a good approach for objects that are moving on the grid, this cells could be cleared and filled again (I guess it could be more performant).

3) Functions like ds_grid_to_mp_grid would also be a good addiction. If mp_grid is actually a grid it would not be that hard to implement this... even if the mp_grid is using just 0 and -1... it'a a matter of transforming 0 into 0 and everything else into -1.

4) If mp functions are (more likely) to be used with static objects only then... add some kind of way to make it so it can use the tilemap data for that! We already have tilemaps we could have tilemap_to_mp_grid() it would make sense.

PS: now more of a question, for the development team... will motion planning get any kind of update in GMS2?
 
Top