Terrain Grid

Hi,
First sory for my bad English I’m French .
I have been playing with unity for some time now, and i wanna start making my own game but I need some hints on how to do it .
I would like to make some kind of tactics game that look like this :

I wonder what’s the best way to draw the terrain grids and color quads where player can move.
Can someone point some hints ?

thanks,

Hi, welcome to the forum!

If the ground is a plane, you might be able to place another plane over the top and colour it in where necessary. You can use the Texture2D class to draw lines and coloured areas into a texture and apply this texture to the overlaid plane.

Ok, so by this you mean take the terrain. For the part you want to have the grid, duplicate it and give it a Texture2D which is a grid tiled?

Or do you mean to make a tile object with its own texture for each tile…?

You could make lots of separate tile objects of the right colour and place them over the appropriate squares. But another way to go is to use the Texture2D class to draw into the texture itself. You would draw gridlines on the texture and then fill in the squares with the appropriate colour (or a colour with 100% transparency if that square is not to be displayed).

Which of these two methods is best depends on how many tiles you need to draw, how complicated the pattern of tiles is, etc. If you need to show a large grid with many tiles accessible, you might get better performance by using the Texture2D approach. If using separate tile objects is not too much of a performance hit, then that is probably easier.

thanx for replys

so the best way is to draw my grid and colored shapes inside a big Texture2D.
Should i and use a projector to project it on the terrain?

i don’t have too bad results using a projected 2d tiled texture

could you explain a little bit, how this was done?
maybe like a tutorial?

It’s exactly what he said it was. Just include a border in your terrain texture and have its size match your desired grid size.