Turn based strategy system

[=;203261]
It’d primarily be used for rendering purposes; whilst you can indeed read from a render target, I’m not sure how cheap it would be to do so. It does mean you don’t have to store some kind of additional data structure for your check based output though (visibility, line drawing etc).

Are you using a lot of 2d arrays to handle things? That sounds fairly inefficient to me, there is probably a decent way to refactor that if it is the case.
[/]

I’m using quite a few 2d arrays through the entire blueprint (or, really, modified 1d arrays). As everything is grid-based I don’t see how I can be more efficient by not using arrays, as they are the most grid-like data structure. I have a hard time seeing how I could make the pathfinding faster by using something else than arrays, and everything needs to interact with the pathfinding, which is simpler if the other systems are also array-based. I’m open to any efficient solutions I might have overlooked, though. I’ve strived to have as few arrays as possible, and keep them limited in size when possible, and everything runs really smoothly at this point. Calculating visibility might be one of the areas where it’s possible to do the biggest improvements in efficiency, even though it is currently fast enough for most games. However, rendering the visible area takes less than a tenth of the time compared to calculating what tiles are visible, so if I am to have any large performance improvements from using a render target it would have to do more than just rendering. The current visibility algorithm also interacts with the path finding grid to calculate the range in tiles to each node, as well as generating an array of potential goals for the AI, which I’m unsure how I would do without arrays. Could you give me a quick step-by-step explanation of how you would go about generating visibility with a render target?

[=;203300]
I guess given arrays that could be in the thousands, it would be cheaper to use EQS or traces to do a vision check?
[/]

[=;203330]
You could use either of those things depending on the needs for your particular game, however most games will want to use the grid (that is after all, what the grid is for).

I don’t think is duplicating the entire grid, he’ll only be using a representation of what is presently visible :slight_smile:
[/]

I’ll have to look into EQS, Zeus. Hadn’t heard about it until now, but after reading a few desciptions I think it seems promising. I’m indeed not duplicating the entire grid, , and the visibility arrays are never bigger than the amount of visible tiles.