Panda - Cocos Creator 引擎研發負責人、吳育芳 - Cocos 產品佈道師
2019.03.18-2019.03.22,GDC 在美國舊金山舉行。
遊戲開發者大會 GDC(全稱 Game Developers Conference),是每年全球具影響力的遊戲領域盛會,大會將會評選當年度的優秀遊戲獎、年度優秀原創音樂獎、年度優秀角色設計獎、年度優秀遊戲設計獎、年度優秀遊戲設計獎、年度優秀遊戲設計獎、年度優秀劇本創作獎等獎項,對遊戲的發展和推廣有著強大的助力。
Cocos Creator 主程 - panda 也遠赴美國參加了此次大會,以下是 Panda 整理的 GDC 主要內容,包括以下幾個部分:
GLTF 和 WebGL 最新進展
Vulkan 最新進展
Marvels Spider-Man 工具進化回顧
Google Stadia 展台見聞
GLTF and WebGL
WebGL 2.0
Presentations - WebGL Public Wiki ?
www.khronos.org
Conformance
ES 3.1 compute shaders to WebGL (Chrome Canary)
KHR_parallel_shader_compile draft extension for fast shader compilation
Multi draw draft extension: ubo support, draw ids...
5. Multi threaded WebAssembly can run WebGL now
GLTF
Sample renderer to check conformance
PBR Next
absorption / attenuation, clear coat, subsurface scattering, anisotropy
Consistency and fallbacks for performance
Compressed textures: KTX2 & CTTF (draft): involved both format and web transmission
Check out gltf assets viewer cross engine
Google model viewer based on gltf (for e commerce)
Automate test between different renderers (internal work)
https:// github.com/GoogleWebCom ponents/model-viewer/tree/master/test
https:// googlewebcomponents.github.io /model-viewer/
Mozilla hubs: a interactive and collaborative gltf model viewer, integrate models into collaborative environment (avatar, dynamic model loading)
Mozilla editor: spoke
WebGL 2.0 is the baseline for Web graphics, WebGPU targets low-end and high performance standard.
Tools for Marvel』s Spiderman: Editing with immutable data
(IMPORTANT, FOR ALL TOOL DEVELOPERS)
Background
Transition from previous web toolchains
Transition during project development
Targeting pure native toolchains
The game scale extended dramatically
Changes
QT framework
12 editor to port
Target
Performance
multi thread
maintainable
Type safe
Enforce correct use of edit loop
Reuse maximum work that have been done in game (assets)
Identical features between C++ and JS version: Avoid needs expand and lost control
Guarantee 100% data compatible
Two version coexist at the same time in Transition
Already have many features runs on LunarServer which manages
Asset data
MongoDB
perform operation
Already using a Date Description Language
Continue to use JSON
Type safe JSON would be better (non type safe is a draw back in new tool)
DDL format is saving in JSON data
Type safe, C++ friendly JSON
Compiles C++ source code for DDL declaration
ToolsDDL transpiles the DDL to a C++ data type with its JSON data parsers
1 : getter
2 : read value from payload or default values
3 : DDL
Already using JSON in all existing editor, can』t break data compatibility
2. JSON is needed for data representation in undo redo system
3. Conversion for a intermediate format from and to JSON is waste (JSON will be used anyway for the editor』s source asset)
Implicitly shared data with copy on write (for JSON data access)
1. Only one data reference, the inner data is atomic
2. Setter will detach the data reference
3. Detach will copy a new object copy for the modification
4. In synchronization process, old version data will be deleted, all shared data owner will point to the new object reference
5. Ref count is used to identify whether a data reference is shared by other owner, also for deallocation
6. JSON data is using implicitly shared data with copy on write (recursively, reference count mechanism, no mutex needed)
7. No cost copy operation(compare to mutex)
8. In large tree
Immutable data
1. Target: Remove the setters, encourage functional style programming, readable and testable code, easy to reason about
The object is a value rather than has a value
2. Treating object as primitive data
Edit loop
Type safe C++ friendly JSON
IqJsonObject comming to open source soon
Accessing data is half rewritten solved
Multiple version of data flying
not a problem because Spiderman only request data in main thread
all clients sharing the same LunarServer, only one client can make modification at a time
Conclusion
另外兩個部分的內容請點擊以下鏈接查看:
Cocos:Cocos @ GDC 2019 - Vulkan 最新進展及 Google Stadia 展台見聞 ?
zhuanlan.zhihu.com 推薦閱讀:
Please enable JavaScript to view the comments powered by Disqus.