I’m new to Unity and I’m trying to create a Pac-Man clone as a starting point to understand things better. I want to be able to have things move and interact with the world on a grid-based system just like the original game and I’m trying to do with without using box colliders and rigid bodies for the places that Pac-Man and the ghosts cannot go.
I previously did a roguelike tutorial for Pico-8, and basically it was really easy to draw a map using the various tiles in the sprite sheet, with some of them being designated “isPassable” and others not, so the game just knew, automatically, that you couldn’t walk on those. In Unity, I’m only finding this possible by generating physics collisions, and I’m just wondering if there’s some easier way to implement tiles that have properties, whatever they might be.
I did one tutorial for Pac-Man that used pysics and it created all sorts of weird movement situations that I would describe as messy, whereas the original game or even modern versions of things like it obviously have very clean and exact movements, if that makes sense. In one case, I turned down a corner too early and Pac-Man started hilarious spinning and tumbling because of the circle collider that was on him. In another, a square collider prevented anything but perfect movements instead of the couple-pixel leeway and “leaning into turns” that you can do on some versions, for example.
I’m considering taking this further to try randomly generated levels and the like, and it seems, at my current level of understanding, far more difficult to also have to do all this extra physics stuff, perhaps manually, once the levels are created in such a manner. That, and obviously old games didn’t use physics, so I’m trying to figure out what the heck would be the equivalent in Unity, or is it just not possible?
As a side note, most of the tutorials I’ve found have to do with more traditional grid movements, like old school RPGs, moving one tile at a time, rather than the continuous motion that something like Pac-Man has. I’m guessing that is something that could be tweaked in whatever movement script deals with the motion, but if there is some pitfall I’m inevitably going to run into with this line of thinking, I’d appreciate any forewarning there. Thanks!