3 31 3 9 3 0
play

3 - PowerPoint PPT Presentation

3 313930 3


  1. ��3������������� ���31���3�9��������3����������0�������� ��3������������� ���31���3�9��������3����������0�������� �3�1 �����-23��-���0���3������ ���������2�9������,����� �����

  2. �.�4�� � �4��5�����54 �� ��4��3������.4��4���3�2�3�4����54 �� ����25��������5�� �� ������3��5�1��5�������3������3� �� ��������5�1

  3. �-��.�1���.- � ����1�� ��������,0����,0������0�������0���0������������18,��� � ����1�����2 ��������0����������,0 �0�,0���1�������1�,���������1������0���� �,��,10���,������,8������� � ����1���������-����.�����2 �1���-����8�0�����1���0������,0�����0��,0���,0�� ������������,����1����������0��������100���,0���1�������������1�������������8�� �,�,0���1���1��������� ,0������

  4. ���,����������������������,,���������� ��������������� Goals Definitions �� ��-���3-�1��������-.�1����-�.��A�1� ���1� �� ����1-�1�������-.�1��1�����1��C�1�2����-��������� 1�������1���.���� ���.C����1��-����A�������� �1�����3-�1����1�-�������������1�����1-�1������,E ����-�����-C�A�����������-��-���� ��1�����1E�������1�� �� �����1������-��1��2���2��������1�A1.�3-�1����-��� �� �1����������3-�1�1���C��1���1B����1�������.������ �����3-�1�-���������3-�1 -������1��D-������-��1��� �� ������1���3�����1�����-����1������3-�1��C�1� �1�����-����-��1�31��2�����-����-�1 • Foundation – �����������,���� layer • ������1�-�����1����1�-�������1�1��-���� Experience – �����������,���� Layer • ���1���1��1B�1��1��1 ��3���1�2���-��1����A��-�1��C�� ��3� -�-��-.����C� Ecosystem Layer – ����������,����� • �-�C �� �1�1�������-�-.�1�3-�1���������3�-������� ������.��-.�1�3-�1��C�1��

  5. ������������������������ Baidu Smart Game Smart Game Game Logic Third Party Game Engine � Cocos, Egret � Theree.js � Graphics Runtime Kernel � UI Animation Network Physics Construct a pure JS execution and • Adapter native rendering environment with DOM Image LocalStorage Audio WebSocket canvas 2D and 3D implementation. JavaScript Provide an app model abstract for • Game Runtime web game, like a web app package, Smart Game JS Framework lifecycle, version control, multi-app JS ��� V8, JSCore management. JavaScript Binding JavaScript Binding Provide rich native APIs in Baidu • Java/OC C++/OC APP by JS binding framework. Canvas 2D/3D sandbox Payment worker OpenGL device Network multimedia Rendering Engine Native platform capability App Version Control Multi APP Management Running mechnism Download Sandbox Cold start Install Cache Warm start Update IPC relaunch

  6. �� ���-��-������������ ��-������-���������-��������������������- Design principal: efficient • general • Key elements: object model • Life cycle • Memory management •

  7. �������������1�-���1�� � �� ���-01���-������-0�1������������1�����2���-� � ��������� Loop 1000 for a simple function JS JSB JSB JS bridge JAVA/OC C++/C with impementation implementation scheme iOS 1.75 0.65 ms 0.197ms 2.15ms ms android 1ms 0.82ms 0.05ms NA local data passing 1MB JSB JSB Scheme with Scheme with text arrayBuffer text arrayBuffer iOS 11.5ms 3.5ms 795ms 1172ms

  8. ���������� ������������������ V8 • Minimize parse and compile time • Code Cache • GC Incremental marking • GC at each game over • initialization stage optimization by v8

  9. ���������������������������������� Design key elements: Canvas 2D Canvas 3D WebGL 1.0 A lightweight standard implementation • of HTML5 canvas 2D and 3D features in webGL 1.0/openGL 2.0 Fonts render with FreeType/CoreText javascript binding • Image decoder • Key problems: Res Manager Render Context Switch • Mem Mgr Context Mgr Minimize context switch frequency and must-to- • �� WxAPI update switching states by diff Fonts Font Res Image Res OpenGL ES texSubImage(canvas,…) Render • Optimize CPU data copy with CopyTexImage2D • Image Audio Res HW Driver Files Mgr Font Render • Decoder Arrange memory areas based on font size •

  10. ���� ���������������������� �������������������������� JSCore/V8 Design key points: main thread for JS • execution and rendering Main Thread engine. Parallel image decoder, • image IO, audio IO from Event WebGL Context render thread. Timer AnimationFrame Management Render Runloop API Callback Image IO / network fileSystem Audio IO worker decode

  11. ��������������������,� �������������,����������������,���� Audio • Optimize cache implementation • JSBinding • File system • Optimize file IO • JSBinding • Network • multi-threaded download • Background download • sprint stage audio optimization

  12. �������������������� ������������ Micro benchmark cases Real world cases UI Framework Image Render FS Laya Aquarium Box2D Pixi.js Gown.js Benchmark Framework Cases Manager Cases Runner Performance Manager Baidu Smart Game Runtime Render Image JSEngine Benchmark Glue File System

  13. �������� � ����������

  14. ������ ��� ��������� ������������������

  15. ���������������������� ����������� operatio develop debug test preview release n 60,000 smart program developers • 150,000 smart programs created • 20,000 smart programs online • 100 million DAU •

  16. ��������������������������������-���������������������������� Cocos :http://docs.cocos.com/creator/manual/zh/publish/p • ublish-baidugame.html Egret: http://developer.egret.com/cn/github/egret- • docs/Engine2D/minigamebaidu/getStart/index.html Laya • Unity •

  17. ����,���������,���,� ��������������,���������������������� Veloce: Instant APP invocation Cloud game: based on video stream or gl commands stream Cloud Native Game Game WASM:Web-Assembly version Smart Game Smart Game � based on pure JS execution environment and native rendering.

  18. ����������������� ���������������

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend