AI path finding on non tile based game?

Hello there.

I know this has been asked before, but it hasn’t quite answered my question.

So, I am trying to find out how to get path finding working with AI on my game. I honestly just started programming this game and after a few weeks came across this problem.

The game itself is not a tiled based game, though it looks like one and the “walls” (or collide-able objects) are placed in a tiled way. (at this point) I did consider turning it into a tile based game, but the problem comes in when you make a map in the in-built level creator. It allows the walls to be placed anywhere at all. not on tiles. it also allows the square walls to be rotated. Walls can also be destroyed.

So, here is an example of what one user made map might look like. (this one is without rotation and every wall is locked to the tiles for simplicity right now)

How can my enemy (Green square) get to the player? (yellow square) while avoiding the walls (red areas)

Now, every object in the game has a set of properties. so far the one that is the most useful for this is the objects bounds (so a rectangle of their: x, y, width and height) Hopefully I can use this to calculate their path around walls. In the game there will be different types of enemies, in different sizes, so one path might not work with all.

I do admit I will probably need to use some form of the A* method. but in that case i would have to generate “nodes” in places where it would be needed. I am not sure where to start with that.

Thank you for the help in advance. If i need to add more info, please ask and will be happy to reply with it. :slight_smile: