Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(2 edits)

Haha, I'm glad you felt motivated to keep trying. Really helpful to hear this feedback.

> how about the actual path finding?

Yes, all the motions are basically deterministic. The pathfinding uses the mp_grid_* functions in GML (I read it uses the A* algorithm). Basically, you construct a grid that matches the movement resolution of your game, then set which squares are not walkable. I use mp_grid_path to generate a shortest rectilinear path, where only right angles are allowed, from the enemy to the player. And from the path, you can extract some interesting variables to use in other calculations: the starting direction, the length, whether a path exists, etc.

> I mean, to they look for the nearest free cell to move to?

Yeah, so to determine where to place an enemy's reservation—for example, the space suggested by the mp_grid_path, or where the player was previously standing—I check a bunch of different conditions, like where the enemy is in relation to the player's previous spaces, whether there's an unobstructed straight orthogonal path to the player. If you get an enemy to trail you, you might notice some predictable movement patterns start to emerge. 😎

The algorithm itself took several iterations to perfect, and some manual regression testing to make sure the puzzles are all still solvable. I'd often change one thing, and see another thing break haha. But I think I've accounted for most of the edge cases now (hopefully!).

> I also loved how you played with the double jump: that was game changer.

Could you elaborate on that one? Curious to know what was meant by "double jump".

> Also liked how jumping to a leaf keeps all enemies stuck where they are.

Haha yup! A core mechanic of the game is that every move has potential to change the board, so that not all solutions are clear just by looking at the starting state.

Glad you found the gameplay so captivating!

(+1)

I see! The mp functions are great and your implementation really helps bringing enemies to life :)

By double jump I meant the double movement you make, for instance when jumping over an enemy or a specific obstacle :)