First of all, I’m new to defold and I want to try it out with my idea.
For this algorithm to work I need to get all world geometry. The more polygons it has the slower everything becomes, that means world geometry must also be optimized (tile colliders merged wherever possible). My collisions are in tilesource.
To create the vision effect I have dynamically created a vision mesh based on algorithm’s output and applied custom shaders to the map and this mesh. Actual map is visible only through the vision mesh. Everything around it is a separate gray scale version of the map (dynamically created during map load).
My questions are:
- How to get the world geometry and optimize it for passing to the vision algorithm? I don’t need optimization algorithms (I have them in C#), I need to know how to handle that in Defold.
- How to organize the project? How exactly should I put these algorithms into defold? Best practices?
- How to build dynamic vision polygon at runtime?
- Is there an easier way to achieve the visual effect I desire?