I have several things on my list that I would like to start getting to, but I took a brief aside where I was looking into packaging the game. One thing that I have discovered is that when I play the game as a standalone, the grass will not be removed from the scene until I stop cutting grass. This can be done by either stopping motion of the mower, or cutting an area with no grass (sidewalk,sand,previous cut area). What I have discovered in my research is that the array that contains the grass meshes from foliage tool is redrawn every time that an instance static mesh is removed. I would assume this is done so to decrease the size of the array to make memory more manageable. What this likely means is that the redraw has a lower priority and doesn’t actually take place until it knows all of which entries it is removing or that the constant redraw is too slow. Either way, this directly hinders the ability to show that the grass was cut. Oddly enough, it runs fine in the editor, but not fine in the standalone window.
As for solutions, I have tried looking into changing the mesh of the object at runtime to avoid actually recreating the table. Perhaps a clever sneak, but this approach hasn’t turned up a solution since it doesn’t seem the mesh is changeable at runtime. Essentially, it doesn’t seem to have a function to do so. I tried setting a new instance transform for the object which would move the grass out of sight. This is a function, yet also yielded no success. Rather, it crashes the engine. I would assume that the crash happens from something on my end, but it may also be that the tedious tracking and movement of several grass meshes is too much. I plan to further experiment with this in my test environment. The last solution I tried was to only check if I was cutting grass every other tick, but this unfortunately doesn’t work for two reasons. The first is because the mower is still moving every tick and very rarely, but noticeably, it does miss some grass as a result. Stopping the mower every other tick creates unnatural driving simulations which is why slowing the mower down is not a fix. That said, even if I could slow the mower down one tick to accommodate the blade cutting speed, I also noticed that one tick still wasn’t long enough for the computer to update the graphics. This was shocking to me as I thought for sure that in the tick without checking the cutting zone that it would have been able to update the graphics. So this actually doesn’t work on two reasons and further slowing down the rates is dangerous in other ways (timer, mower simulation).
One thing I found really interesting about this is that in version 4.19, there was an option for a “dynamic vertex buffer” which essentially stopped the redraw of this table and allegedly fixed this issue that I have. This option has been removed in 4.20 and higher which is where I currently have my project. I have considered moving back into 4.19 but, for the actual capstone project itself, this shouldn’t be an issue since I can do my demonstration in an editor window. The two real concerns with the issue are how my professors can access it after I leave and how I could release this game should I ever find that I want to release it.
That is all for now.