Catlard
1
I’m creating a game that involves drawing on the screen with the mouse. I’m doing this by storing all the information about where the textures that have been painted onto the screen are located (their x, y, alpha, scale, etc.). Basically, after the array contains information for about 1500 textures (they’re paintsplats, meant to simulate chinese calligraphic drawing), it understandably slows the game down a bit. I see TWO potential solutions to this, and I’d like to know if you know of any more, or if this is it:
-
I can limit the number of times the game records the texture positions, hoping to rely on the overlap of textures to still allow for a good-looking drawing.
-
Take a screen capture after a certain part of the drawing is completed, and use that instead of doing all the hundreds of draw calls it represented. Then replace the texture in front of the camera with that screen capture.
If these are the only solutions, which one do you like the best? Why?
roamcel
2
I believe that you should consider merging the meshes into one rather than going another way. There’s a script in unify wiki that should lead you in the right direction.
http://www.unifycommunity.com/wiki/index.php?title=MeshMerger
I believe you could arrange to actually create a new mesh after as much strokes as you allow UNDO, to keep things fluent.