GameEngineSturctureWithAnarchy_kgc2013

1,978 views

Published on

Game Engine
KGC 2013

Published in: Technology
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,978
On SlideShare
0
From Embeds
0
Number of Embeds
448
Actions
Shares
0
Downloads
20
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

GameEngineSturctureWithAnarchy_kgc2013

  1. 1. Havok™ Confidential. © Copyright 2013 Havok.com (and its licensors). All Rights Reserved. Confidential Information of Havok. 김학현 harry.kim@havok.com @shuaiharry
  2. 2. Havok™ Confidential. © Copyright 2013 Havok.com (and its licensors). All Rights Reserved. Confidential Information of Havok. 강연 대상
  3. 3. Havok™ Confidential. © Copyright 2013 Havok.com (and its licensors). All Rights Reserved. Confidential Information of Havok. 강연자 소개
  4. 4. Havok™ Confidential. © Copyright 2013 Havok.com (and its licensors). All Rights Reserved. Confidential Information of Havok. 강연 내용
  5. 5. Havok™ Confidential. © Copyright 2013 Havok.com (and its licensors). All Rights Reserved. Confidential Information of Havok. 시작하기 전에
  6. 6. Havok™ Confidential. © Copyright 2013 Havok.com (and its licensors). All Rights Reserved. Confidential Information of Havok. 게임 엔진은 뭔가요?
  7. 7. Havok™ Confidential. © Copyright 2013 Havok.com (and its licensors). All Rights Reserved. Confidential Information of Havok. 게임 엔진 게임 엔진은 뭐지? 게임 윈도우 안드로이드 iOS
  8. 8. Havok™ Confidential. © Copyright 2013 Havok.com (and its licensors). All Rights Reserved. Confidential Information of Havok. 게임과 게임 엔진
  9. 9. Havok™ Confidential. © Copyright 2013 Havok.com (and its licensors). All Rights Reserved. Confidential Information of Havok. 게임 엔진 내 툴 활용 엔진은 거들 뿐
  10. 10. Havok™ Confidential. © Copyright 2013 Havok.com (and its licensors). All Rights Reserved. Confidential Information of Havok. 게임 엔진 툴의 예 – 애셋 변환툴
  11. 11. Havok™ Confidential. © Copyright 2013 Havok.com (and its licensors). All Rights Reserved. Confidential Information of Havok. 엔진과 프로젝트 성공의 관계 충동구매 X
  12. 12. Havok™ Confidential. © Copyright 2013 Havok.com (and its licensors). All Rights Reserved. Confidential Information of Havok. 엔진 < 프로젝트
  13. 13. Havok™ Confidential. © Copyright 2013 Havok.com (and its licensors). All Rights Reserved. Confidential Information of Havok. 게임 엔진은 어떻게 만들어질까?
  14. 14. Havok™ Confidential. © Copyright 2013 Havok.com (and its licensors). All Rights Reserved. Confidential Information of Havok. Anarchy 예: IVFile 파일 입출력 엔진을 만든다면? 엔진 리소스 생성 함수 게임 윈도우 파일 생성 함수(CreateFile) Android 파일 생성 함수 iOS 파일 생성 함수 스트리밍을 할까? (추후에 변경 가능 요소)
  15. 15. Havok™ Confidential. © Copyright 2013 Havok.com (and its licensors). All Rights Reserved. Confidential Information of Havok. 엔진의 리소스 매니저 예시 리소스 생성 기존 리소스 로드 아니요 예 리소스 해지 예 리소스가 있는 가? 리소스 요청 (예: 3D 메쉬에 관련된 매터리얼 데이타 요청) 리소스가 사용된지 30초가 넘었는가? 특정 리소스 프레임 업데이트(예)
  16. 16. Havok™ Confidential. © Copyright 2013 Havok.com (and its licensors). All Rights Reserved. Confidential Information of Havok. 엔진의 쉐이더 매니저 예시 HLSL 쉐이더 작성 GLSL 자동 컨버팅 HLSL 사용 아니요 예 해당 플랫폼에서 HLSL 을 지원하는 가?
  17. 17. Havok™ Confidential. © Copyright 2013 Havok.com (and its licensors). All Rights Reserved. Confidential Information of Havok. 실제 쉐이더 컨버팅 예시 float4x4 matWVP : register(c8); struct VS_IN { float3 ObjPos : POSITION; float2 UV0 : TEXCOORD0; }; struct VS_OUT { float4 ProjPos : POSITION; float2 UV0 : TEXCOORD0; }; VS_OUT vs_main( VS_IN In ) { VS_OUT Out; Out.ProjPos = mul( matWVP, float4(In.ObjPos,1.0) ); Out.UV0 = In.UV0; return Out; } precision highp float; struct VS_OUT { highp vec4 ProjPos; highp vec2 UV0; }; struct VS_IN { highp vec3 ObjPos; highp vec2 UV0; }; uniform highp mat4 matWVP; VS_OUT vs_main( in VS_IN In ) { VS_OUT Out; Out.ProjPos = ( matWVP * vec4( In.ObjPos, 1.00000) ); Out.UV0 = In.UV0; return Out; } attribute vec3 position; attribute vec2 tex0; varying highp vec2 xlv_TEXCOORD0; void main() { VS_OUT xl_retval; VS_IN xlt_In; xlt_In.ObjPos = vec3( position); xlt_In.UV0 = vec2( tex0); xl_retval = vs_main( xlt_In); gl_Position = vec4( xl_retval.ProjPos); xlv_TEXCOORD0 = vec2( xl_retval.UV0); }
  18. 18. Havok™ Confidential. © Copyright 2013 Havok.com (and its licensors). All Rights Reserved. Confidential Information of Havok. 멀티플랫폼을 고려한 개발 아나키 프로젝트 생성 스크립트 플랫폼 별 프로젝트 파일 생성 엔진과 플랫폼 간의 레이어 플랫폼 관련 코드 최소화
  19. 19. Havok™ Confidential. © Copyright 2013 Havok.com (and its licensors). All Rights Reserved. Confidential Information of Havok. Anarchy 예: IVRenderNode 엔진 개발 워크플로우 렌더러 인터페이스 작성 윈도우 렌더러 작성 안드로이드 렌더러 작성 게임에 렌더러 필요 - 엔진을 만든다면
  20. 20. Havok™ Confidential. © Copyright 2013 Havok.com (and its licensors). All Rights Reserved. Confidential Information of Havok. 게임 엔진과 2D control
  21. 21. Havok™ Confidential. © Copyright 2013 Havok.com (and its licensors). All Rights Reserved. Confidential Information of Havok. 2D Control
  22. 22. Havok™ Confidential. © Copyright 2013 Havok.com (and its licensors). All Rights Reserved. Confidential Information of Havok. 2D Control
  23. 23. Havok™ Confidential. © Copyright 2013 Havok.com (and its licensors). All Rights Reserved. Confidential Information of Havok. 게임 엔진과 프로토타이핑
  24. 24. Havok™ Confidential. © Copyright 2013 Havok.com (and its licensors). All Rights Reserved. Confidential Information of Havok. 프로토 타입 만들기 꼭 프로그래밍이 필요하진 않음
  25. 25. Havok™ Confidential. © Copyright 2013 Havok.com (and its licensors). All Rights Reserved. Confidential Information of Havok. 엔진 샘플 분석 부터 시작해보자 © Copyright 1999-2013 Havok.com Inc (or its licensors). All Rights Reserved. All trademarks are the property of their rightful owners. 모바일 실행 vForge 실행
  26. 26. Havok™ Confidential. © Copyright 2013 Havok.com (and its licensors). All Rights Reserved. Confidential Information of Havok. 프로토타입 확인 요소: 그래픽 © Copyright 1999-2013 Havok.com Inc (or its licensors). All Rights Reserved. All trademarks are the property of their rightful owners.
  27. 27. Havok™ Confidential. © Copyright 2013 Havok.com (and its licensors). All Rights Reserved. Confidential Information of Havok. 프로토타입 만들기
  28. 28. Havok™ Confidential. © Copyright 2013 Havok.com (and its licensors). All Rights Reserved. Confidential Information of Havok. 게임 엔진 구현 방식
  29. 29. Havok™ Confidential. © Copyright 2013 Havok.com (and its licensors). All Rights Reserved. Confidential Information of Havok. 자주 사용 되는 패턴
  30. 30. Havok™ Confidential. © Copyright 2013 Havok.com (and its licensors). All Rights Reserved. Confidential Information of Havok. 게임 엔진의 한 프레임
  31. 31. Havok™ Confidential. © Copyright 2013 Havok.com (and its licensors). All Rights Reserved. Confidential Information of Havok. 게임 업데이트
  32. 32. Havok™ Confidential. © Copyright 2013 Havok.com (and its licensors). All Rights Reserved. Confidential Information of Havok. 아나키 엔진 업데이트 예시 © Copyright 1999-2013 Havok.com Inc (or its licensors). All Rights Reserved. All trademarks are the property of their rightful owners.12 OnUpdate Scene 엔티티 별로 PreThink 를 통해 Customizing. 엔티티 별로 애니메이션 처리 애니메이션 업데이트 이후 Callback 호출 업데이트 시작 시 콜백 / 전역 게임 로직 처리 모든 엔티티를 돌면서 PreThink 함수를 호출 싱글 스레드로 물리 옵션을 변경 시 물리 처리 애니메이션 이후 콜백 호출 멀티 스레드(기본옵션)시 물리 시작 업데이트가 끝나면 콜백 호출 Vision::Callbacks. OnUpdateSceneBegin VisBaseEntity_cl:: PreThinkFunction VisBaseEntity_cl:: HandleAnimations VisionApp_cl:: OnUpdateAnimatonFinished RunPhysics FetchPhysicsResults VisBaseEntity_cl:: ThinkFunction() VisionApp_cl:: RunPhysics Vision::Callbacks. OnUpdateSceneFinished
  33. 33. Havok™ Confidential. © Copyright 2013 Havok.com (and its licensors). All Rights Reserved. Confidential Information of Havok. 게임 엔진과 개발 워크플로우
  34. 34. Havok™ Confidential. © Copyright 2013 Havok.com (and its licensors). All Rights Reserved. Confidential Information of Havok. 게임 워크플로우
  35. 35. Havok™ Confidential. © Copyright 2013 Havok.com (and its licensors). All Rights Reserved. Confidential Information of Havok. C++ Source 아나키 워크플로우 및 배포: Game Plugin Create DLL(plugin) Create Binary PostBuildStep: Copy plugin to your project Directory PostBuildStep: Bundle together with resources and deploy Compiler’s task Compiler’s task APK 게임 워크플로우 예 - 아나키
  36. 36. Havok™ Confidential. © Copyright 2013 Havok.com (and its licensors). All Rights Reserved. Confidential Information of Havok. 게임 엔진 코드 살펴 보기
  37. 37. Havok™ Confidential. © Copyright 2013 Havok.com (and its licensors). All Rights Reserved. Confidential Information of Havok. 게임 엔진 코드 활용 코드만 있으면 못할게 없다
  38. 38. Havok™ Confidential. © Copyright 2013 Havok.com (and its licensors). All Rights Reserved. Confidential Information of Havok. © Copyright 1999-2013 Havok.com Inc (or its licensors). All Rights Reserved. All trademarks are the property of their rightful 소스 코드를 어떻게 활용 할까?
  39. 39. Havok™ Confidential. © Copyright 2013 Havok.com (and its licensors). All Rights Reserved. Confidential Information of Havok. 게임 엔진과 디버깅
  40. 40. Havok™ Confidential. © Copyright 2013 Havok.com (and its licensors). All Rights Reserved. Confidential Information of Havok. 디버깅
  41. 41. Havok™ Confidential. © Copyright 2013 Havok.com (and its licensors). All Rights Reserved. Confidential Information of Havok. 게임 엔진 디버깅
  42. 42. Havok™ Confidential. © Copyright 2013 Havok.com (and its licensors). All Rights Reserved. Confidential Information of Havok. 디버깅 시간 절약
  43. 43. Havok™ Confidential. © Copyright 2013 Havok.com (and its licensors). All Rights Reserved. Confidential Information of Havok. 게임 엔진과 디버깅
  44. 44. Havok™ Confidential. © Copyright 2013 Havok.com (and its licensors). All Rights Reserved. Confidential Information of Havok. 비주얼 디버깅
  45. 45. Havok™ Confidential. © Copyright 2013 Havok.com (and its licensors). All Rights Reserved. Confidential Information of Havok. 테스트 도구 vFileServe Asset 변경시 디바이스에서 바로 확인 vRemoteInput 터치 입력 or 가속도 값을 PC에서 동작중인 게임으로 전달
  46. 46. Havok™ Confidential. © Copyright 2013 Havok.com (and its licensors). All Rights Reserved. Confidential Information of Havok. 게임 엔진과 게임 최적화
  47. 47. Havok™ Confidential. © Copyright 2013 Havok.com (and its licensors). All Rights Reserved. Confidential Information of Havok. 프로파일링 시각화
  48. 48. Havok™ Confidential. © Copyright 2013 Havok.com (and its licensors). All Rights Reserved. Confidential Information of Havok. 아나키 프로파일링 예 © Copyright 1999-2013 Havok.com Inc (or its licensors). All Rights Reserved. All trademarks are the property of their rightful11
  49. 49. Havok™ Confidential. © Copyright 2013 Havok.com (and its licensors). All Rights Reserved. Confidential Information of Havok. 모바일 실행 파일 사이즈 최적화 © Copyright 1999-2013 Havok.com Inc (or its licensors). All Rights Reserved. All trademarks are the property of their rightful12 Libraries .a Size Vision Runtime 8.00MB + Engine Plugin 13.54MB + FMOD 15.20MB + Physics 36.79MB + Backward Compatibility 61.43MB + AI & Animation Studio 70.90MB Libraries .a Size Vision Runtime 8.00MB + Engine Plugin 13.54MB + FMOD 15.20MB + Physics 36.79MB Libraries .a Size Vision Runtime 8.00MB + Engine Plugin 13.54MB + FMOD 15.20MB Vision Engine Plugin libVisionEnginePlugin.a LuaAndroid_Release.a 5.54MB VisionBase libBase.a 3.79MB Havok Physics Pl 1.73MB Backward Compatibility (if needed) libhkCompat.a 24.64MB Physics Utilities (Utils+Vehicle) 2.41MB Visualize&SceneData 1.07MB HavokAI with Physics Bridge 4.17MB Havok AI Pl 0.19MB Fmod Engine Plugin 1.66M Havok AnimatioStudi o(Behavior) hkaAnimation.a hkbBehavior.a hkbInternal.a hkbUtilities.a hkbPhysics2012 Bridge.a hkbScriptRelease.a 7.41MB Havok Behavior Plugin 0.51MB Common Base used by all ‘traditional’ Havok products. Not all libs are required all the times. That really depends on the customers needs, for Anarchy however we package all together. Physics is comparable to the base (modular, based on the needs) Vision libVision.a 4.21MB Physics libhkpInternal.a libhkpCollide.a libhkpDynamics.a libhkpConstraintSolver.a libhkpConstraint.a 7.33MB CollisionDetection 1.15MB Internal libhkInternal.a libhkGeometryUtil.a libhkSerialize.a 4.20MB Havok Base libhkBase.a 3.70MB We also need some ‘Base Data’ (eg. shaders) which will consume a few MB (flexible size) ¹) The lib sizes together do not represent the real size of the executable, because the linker will just include the required parts of the static libs. In fact the executables are much smaller! See ‘.so Size' for sample sizes. When distributed, these .so file getting even more than 2 times smaller with the APK compression. Offroad Sample RPG Sample Libraries .a Size Vision Runtime 8.00MB + Engine Plugin 13.54MB Libraries .a Size Vision Runtime 8.00MB ¹) .so Size 5.90MB 7.06MB 11.60MB 17.20MB ¹) .so Size 5.90MB 7.06MB
  50. 50. Havok™ Confidential. © Copyright 2013 Havok.com (and its licensors). All Rights Reserved. Confidential Information of Havok. 아나키의 실행 파일 최적화 사례
  51. 51. Havok™ Confidential. © Copyright 2013 Havok.com (and its licensors). All Rights Reserved. Confidential Information of Havok. 게임 엔진과 서포트
  52. 52. Havok™ Confidential. © Copyright 2013 Havok.com (and its licensors). All Rights Reserved. Confidential Information of Havok. 서포트 변화
  53. 53. Havok™ Confidential. © Copyright 2013 Havok.com (and its licensors). All Rights Reserved. Confidential Information of Havok. 서포트 활용
  54. 54. Havok™ Confidential. © Copyright 2013 Havok.com (and its licensors). All Rights Reserved. Confidential Information of Havok. 아나키 서포트 예
  55. 55. Havok™ Confidential. © Copyright 2013 Havok.com (and its licensors). All Rights Reserved. Confidential Information of Havok. 게임 엔진 수정하기
  56. 56. Havok™ Confidential. © Copyright 2013 Havok.com (and its licensors). All Rights Reserved. Confidential Information of Havok. 엔진 수정
  57. 57. Havok™ Confidential. © Copyright 2013 Havok.com (and its licensors). All Rights Reserved. Confidential Information of Havok. 결론
  58. 58. Havok™ Confidential. © Copyright 2013 Havok.com (and its licensors). All Rights Reserved. Confidential Information of Havok. 끝으로 하나만 더! 게임 프로그래밍을 공부를 하고 싶은 분들께
  59. 59. Havok™ Confidential. © Copyright 2013 Havok.com (and its licensors). All Rights Reserved. Confidential Information of Havok. Python 기초 자료 구조 및 알고리즘 트레이닝 자료 – 비디오와 문서들 프로그래밍 기초 공부
  60. 60. Havok™ Confidential. © Copyright 2013 Havok.com (and its licensors). All Rights Reserved. Confidential Information of Havok. 프로그래밍 기초 개념
  61. 61. Havok™ Confidential. © Copyright 2013 Havok.com (and its licensors). All Rights Reserved. Confidential Information of Havok. 알고리즘 공부
  62. 62. Havok™ Confidential. © Copyright 2013 Havok.com (and its licensors). All Rights Reserved. Confidential Information of Havok. 참고 1 – 그래픽스 프로그래밍
  63. 63. Havok™ Confidential. © Copyright 2013 Havok.com (and its licensors). All Rights Reserved. Confidential Information of Havok. 참고 2 – 그래픽스 프로그래밍
  64. 64. Havok™ Confidential. © Copyright 2013 Havok.com (and its licensors). All Rights Reserved. Confidential Information of Havok. 바이블 책 두 권
  65. 65. Havok™ Confidential. © Copyright 2013 Havok.com (and its licensors). All Rights Reserved. Confidential Information of Havok. 라이브러리 만들어 보기
  66. 66. Havok™ Confidential. © Copyright 2013 Havok.com (and its licensors). All Rights Reserved. Confidential Information of Havok. questions? http://www.projectanarchy.com/ko https://www.facebook.com/groups/ProjectAnarchyKR/ © Copyright 1999-2013 Havok.com Inc (or its licensors). All Rights Reserved. All trademarks are the property of their rightful14
  67. 67. Havok™ Confidential. © Copyright 2013 Havok.com (and its licensors). All Rights Reserved. Confidential Information of Havok. http://www.slideshare.net/cagetu/game- engine-2011 http://www.slideshare.net/noerror/engin e1a 참고 자료

×