RTS terrain grid

Hey Shockwave-peter!

I know I’m replying to a necro thread, but I was looking into optimizing my current grid system.

The way I currently handle it is by creating a simple actor, which has a struct,
containing Position, and any other details about that tile. (E.G., whether there is a building there).

When I move the actor, or change max grid size, or grid spacing, it auto rebuilds, (I can give the logic if you want),
which takes about 0.5-2 seconds-ish.

I then have custom functions which can highlight around a specific point, detect which points are closest to a given vector, and tell me if any of them have been used.
It’s rather simple, although the issue I’m having is:

In game, and in editor, while the actor isn’t selected, I’m getting around 120fps.
The second I select it i get 2-40fps. Then back to 120fps when it’s not selected, which makes no sense to me.

But yea, I hope this helped!

-