Well, this is my first post so forgive me if I’m not concise enough.
After playing around with Unity for a bit I decided it might be fun to try to set up a quick turn base rig sort of like some of the older table top games like Warhammer Quest, Doom Troopers, HeroQuest etc.
My first question:
What’s the best way to designate the tiles and handle moving to their center?
I’ve tried a few things but I must be missing something because it has all been disasterous. I figured I’d just come here and start from scratch. I’m not the most amazing with code but I am quick to pick it up with the right direction.
Yeah I looked at that at first, but wasn’t sure I’d know what to do with it until I had some other parts out of the way like figuring out the smoothest way to light up the tiles and designate their position as the desired position of the character. It will all be mouse controlled.
What I’m thinking is that I want it to light up the tiles that are legal moves, let you click one, then commit to the move and have the character move there.
Attached to this post is a class that should help with the definition of a rectangular grid. It has functions to determine the tile that a given point is in (specified in the grid’s local coordinates) and also get the corner and centre coordinates of a tile.
As for highlighting a grid tile, there are a number of ways you might do this depending on the nature of the game. You might be able to swap textures for tiles individually or you might look at using projectors to project a highlight texture onto each tile.