Isometric help (collision and depth)

V

Vincent Aliquo

Guest
I've been struggling to determine the best way to have collisions and depth for an isometric game my team is making. I've been able to get some objects working properly, like a bus, but I had to split the bus into two parts, so I could also use a diamond collision mask. However, this game requires pathfinding, so enemies can't just avoid the whole object, but just the collision, which sounds like the collisions needs to be its own separate object. This has been frustrating me a lot, so if anyone can help direct me in the right place, that would be much appreciated. Attached is one of the asset examples I'm dealing with.
 

Attachments

V

Vincent Aliquo

Guest
So you have two objects for the bus? Make one a parent ofthe other.
I cut it in half to fix the janky depth due to how long the bus was, and so that I could have the collisions be a stretched diamond. Whether the bus pieces are connected to each other via parent really fix any of the issues I'm having. Additionally, I'm thinking of using the convex physics collision tool to use the collisions since the masking features are super limited, but doesn't seem to fix my issues with how to implement pathfinding.

*Not all of my objects require stuff to be cut in half, and the problems still persist for large cube-like objects, like statues.
 
V

Vincent Aliquo

Guest
Well, I solved the issues by restricting assets to the limitations of the Game Maker collision masks. It's a little more objects per level, since long objects like the MTR train and the bus have to be cut up, but it's workable. The depth works much better for simpler objects by using depth = -y
 
P

ph101

Guest
But you really shouldnt need diamond shaped collisions. If the project is in any way serious, you want to have all your objects and whole world as if 2D (top down) allowing you to do standard pathfinding. Then you "project" your objects into isometric space per object and draw the sprite there. There was a recent thread where people posted tutorials about this if you search the forum. (yeah technically you don't need to do it this way and do a sort of pretend isometric effect which sounds like what you're trying, but you will probably run into a lot of issues... like, if anything moves, you will need to halve its y motion speed, and if calculate distance of paths, it wont be correct.. and the mp_grid is square in gamemaker not triagular for example..)
 
Last edited by a moderator:
V

Vincent Aliquo

Guest
But you really shouldnt need diamond shaped collisions. If the project is in any way serious, you want to have all your objects and whole world as if 2D (top down) allowing you to do standard pathfinding. Then you "project" your objects into isometric space per object and draw the sprite there. There was a recent thread where people posted tutorials about this if you search the forum. (yeah technically you don't need to do it this way and do a sort of pretend isometric effect which sounds like what you're trying, but you will probably run into a lot of issues... like, if anything moves, you will need to halve its y motion speed, and if calculate distance of paths, it wont be correct.. and the mp_grid is square in gamemaker not triagular for example..)
Would that method work for assets like this? I think I found what you're referring to, but it didn't seem to work exactly how I needed it. I'll look into it again
 

Attachments

P

ph101

Guest
They are isometric so yeah. I mean if your game is very simple then you can fake it and proceed as if its just 2d (not "2.5" or truly isometric projection), but I really advise against that for anything more complex.
 
Top