我花了大约30小时逆向工程Silksong的代码,这是unity历史上最成功的游戏之一。而在逆向工程的过程中,我发现了许多令人惊叹的(并且非常激进的)优化技术。高亮:

  • movement Code Breakdown:我拆解了在coyote time和input buffering中使platforming感觉如此响应的exact frame-window。Silksong的运动如此优雅。]
  • Hidden "demo" mode:有一个left-over IsExhibitionMode 检查。如果我们使用tiny patch,就可以从零售文件启动Gamescom demo版本。
  • Dev cheats, Debug view, Performance overlay, etc:我恢复并重启所有开发者使用的内容。
  • Performance:团队cherry实现了manual garbage collector和一个自定义reflect-to-delegate compiler。它比standard unity方法快100倍。
  • 视频中有很多更多的内容。

完整视频:https://www.youtube.com/watch?v=eC9bIelizlw