Game frame count increased
- In the last two days, I have been learning the optimization techniques of Unity Engine, including the most traditional dynamic batching & static batching, occlusion culling & camera cone culling, LOD, texture compression, light pre-render stripping, shadow level mask, etc.
- Dynamic and static batching are my favorite optimization techniques, and with MeshBaker plugin support, sacrificing memory in exchange for a drop in drawcalls seems like a pretty good deal, while still ensuring that the image doesn't get distorted too much.
- Occlusion culling is not suitable for Dark Tower, because most game objects in the game are dynamically generated by wave function collapse algorithm, and cannot be marked as static objects for occlusion data storage. Moreover, the camera Angle in the game is mainly overlooking, which hardly produces occlusion effect suitable for culling.
- Cone culling is not something that anyone would not use without special circumstances, and it should be almost the default.
- With texture compression, I compressed some of the terrain maps that are commonly used in the game, which may have reduced their sharpness, but I didn't see much difference between the camera post-processing and SSCC rendering. Most of the rest of the textures remained the same texture quality, and I also adjusted the texture streaming parameters.
- LOD doesn't work well for The Dark Tower either, because the distance between the objects rendered in the camera and the camera doesn't vary that much, and there's no way to adjust the accuracy of the model based on the distance from the camera, but this technique should be very common in 3D all-round view games.
- After looking at some dynamically generated game optimizations, I found that dynamically activating objects is a relatively simple and reliable solution, dynamically adjusting which objects should be activated and displayed to the camera based on distance, and which mounted scripts should be paused.
- The game is running at about 40% more frames now, and it's fairly stable, and then if something goes wrong, I'll fix it.
- The content of the game is still being worked out, including the gameplay and difficulty and the new game mechanics that should be added, but with a graduation thesis and defense to prepare for this week, development of the game will be delayed by a week if anything.