- Home /
Turn-based strategy game
Hi, I'm new to the Unity and I'm thinking of making a TBS game. The combat should look like the good old X-Com: UFO Defence. The questions I've encountered are:
1) How do I seperate my terain into squares(hexes)?
2) How do I highlight them, when the mouse is over it?
3) How do I understand on which square the mouse was on, when the player pressed left mouse button.
Thank you :)
Andrey, I'd recommend you ask these as independent questions, and with a more specific title that helps people find them.
Answer by Envy · Jun 08, 2010 at 09:22 PM
I have no idea how to implement this, but I'll give a method.
1 You could have it show parts of the terrain mesh or you could manually make a grid that conforms exactly to your landscape.
2 You switch the shader when the mouse is on it. I saw something like this on the gun scripts demo on FPS Constructor - Weapons (Beta) where you hover and it glows. 3 I'd use a collider on all of them, but thats incredibly inefficient.
@$$anonymous$$vy: Link does not work as html. Needs to be htm.
@$$anonymous$$vy (and @bowditch), I fixed the link - and also added a Name to it.
Answer by Ozale · Jan 23, 2011 at 12:01 AM
G'day, I'm also slowly building a TBS system, but I'm only now putting the polishing touches on the camera control script. Above is right, you'll need to build a state machine, but it's definitely a project Unity can handle.
I've worked with turn-based gameplay in Flash before, and can say it'll be easier to do things like change the controls and camera behavior the player when it's not their turn, detect line-of-site (if you hope to replicate UFO's LOS system) and implement rudimentary physics.
I'd be curious to hear how your project is going, email me sometime!
Cheers,
Stu
Your answer
![](https://koobas.hobune.stream/wayback/20220613061655im_/https://answers.unity.com/themes/thub/images/avi.jpg)