technical presentation report 이웅주

43
Technical Presentation Report 이이이

Upload: dung

Post on 25-Jan-2016

42 views

Category:

Documents


2 download

DESCRIPTION

Technical Presentation Report 이웅주. Content. Result Stage editor Game. RESULT. Final result. Add screenshots. Requirement. 3 차원 상에 배치된 구에 숫자 , 연산자가 표시된다 구를 선택하여 수식을 구성한다 . 구성한 수식의 연산 결과가 제시된 답과 맞는지 확인한다 . 게임의 현재 상태 ( 구성한 수식 , 맞춰야할 답 ) 이 표시되어야 한다 . 에디터를 통해 모든 데이터를 설정할 수 있어야 한다 - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Technical Presentation Report 이웅주

Technical Presentation Report이웅주

Page 2: Technical Presentation Report 이웅주

Content

• Result• Stage editor• Game

Page 3: Technical Presentation Report 이웅주

RESULT

Page 4: Technical Presentation Report 이웅주

Final result

• Add screenshots

Page 5: Technical Presentation Report 이웅주
Page 6: Technical Presentation Report 이웅주

• 3 차원 상에 배치된 구에 숫자 , 연산자가 표시된다• 구를 선택하여 수식을 구성한다 .• 구성한 수식의 연산 결과가 제시된 답과 맞는지 확인한다 .• 게임의 현재 상태 ( 구성한 수식 , 맞춰야할 답 ) 이 표시되어야 한다 .• 에디터를 통해 모든 데이터를 설정할 수 있어야 한다• 스테이지를 구성하기 쉬워야 한다

Requirement

Page 7: Technical Presentation Report 이웅주

Tool• Rendering engine

– OGRE3D 1.2.1 Dagon: 활성화된 커뮤니티 , 문서화 , 사용하기 쉬운 구조

• GUI– Qt 4.3.1 Open Source Edition: 직관적인 튜토리얼 , 세련된 GUI 제공

• Sound library– fmodEx 4.04: DirectSound 래핑 . 사용하기 편리

• Data structure– STL

• Compiler/IDE– Visual C++ 2005 Express

• Packaging– Inno Setup 5: 스크립트 구조 , 다양한 예제 제공

Page 8: Technical Presentation Report 이웅주

Schedule(from CVS)

• 총 2 개월• 7.1: begin project• ~ 7.24: technical test• ~ 7.31: stage builder built• ~ 8.6: framework built• ~ 8.17: each state built• ~ 8.31: etc(credit, rank, cache)• ~ 9.3: audio, packaging

Page 9: Technical Presentation Report 이웅주

Required technique

• 상태 단위 개발• UI 추상화• 정확한 피킹• 빠른 수식 계산 속도• Qt 와 Ogre3D 바인딩• CQ 팩터의 올바른 추출

Page 10: Technical Presentation Report 이웅주

STAGE EDITOR

Page 11: Technical Presentation Report 이웅주
Page 12: Technical Presentation Report 이웅주

Purpose

• 스테이지 데이터 편집• 숫자 / 기호의 비율 , camera, light, skybox

설정• Container, egg 크기 , 위치 설정

Page 13: Technical Presentation Report 이웅주

Class diagram

DocumentDocument

MainWindowMainWindow RendererViewRendererView

RendererListenerRendererListenerdata control

QWidgetQWidgetUi_MainWindowUi_MainWindow

Ogre::KeyListenerOgre::KeyListener Ogre::FrameListenerOgre::FrameListener

DataData

Page 14: Technical Presentation Report 이웅주

Role of class• QWidget: 모든 Qt GUI 컨트롤의 기반 클래스• Ui_MainWindow: GUI 편집기인 Qt Designer 에서

만든 커스텀 폼에서 uic(UI compiler) 를 통해 생성된 코드 . 컨트롤 설정이 담겨있음

• MainWindow: Qt GUI 컨트롤 관리• RenderView: Qt 윈도우에 바인딩된 렌더링창 처리• RenderListener: 렌더링 창으로 들어온 입력 처리• Document: 스테이지 데이터 관리 . 데이터 추출 등• Data: 스테이지 데이터의 구조체 묶음 (I/O 포함 )

Page 15: Technical Presentation Report 이웅주

a part of MainWindow codes

• 이벤트를 처리할 함수를 QObject 클래스의 connect 메소드를 이용해 바인딩시킴

• 이벤트는 인수가 있을 경우 전달함 .

Page 16: Technical Presentation Report 이웅주

a part of RenderView

• 타이머를 생성하여 주기적으로 렌더링 창을 업데이트함

Page 17: Technical Presentation Report 이웅주

a part of RenderView

Page 18: Technical Presentation Report 이웅주

a part of RenderListener

• 렌더링 엔진에서 제공하는 디버그 정보를 업데이트하기 위해 Ogre::FrameListener 를 상속받음

• 렌더링 창으로 입력되는 키 이벤트를 처리하기 위해 Ogre::KeyListener 또한 상속받음

• 마우스 처리를 하려면 마찬가지로 Ogre::MouseListener 가 필요함 ( 시간 상 이유로 미구현 )

Page 19: Technical Presentation Report 이웅주

a part of Document

• MFC 의 Document-View 구조를 차용하여 , Document 클래스가 데이터를 모두 관리하도록 함 .

Page 20: Technical Presentation Report 이웅주

a part of Document

• MilkShape3D 에서 생성된 공 묶음에서 위치와 반지름을 얻어냄

Page 21: Technical Presentation Report 이웅주

a part of Document

Page 22: Technical Presentation Report 이웅주

a part of Document

Page 23: Technical Presentation Report 이웅주

a part of Data

Page 24: Technical Presentation Report 이웅주

GAME

Page 25: Technical Presentation Report 이웅주
Page 26: Technical Presentation Report 이웅주

Class diagram #1

StateManagerStateManager<<interface>>State

<<interface>>State

SoundManagerSoundManager InputManagerInputManager

controlthroughstack

Page 27: Technical Presentation Report 이웅주

Class diagram #2(State)

<<interface>>State

<<interface>>State

MenuStateMenuState

MainMenuStateMainMenuState

GameMenuStateGameMenuState

PrePlayStatePrePlayState

PlayStatePlayState

PostPlayStatePostPlayState

SinglePlayStateSinglePlayState OptionStateOptionState

HighScoreStateHighScoreState

RankStateRankState

HelpStateHelpState

CreditStateCreditState

GameOverStateGameOverState

CongratulationStateCongratulationState

※ All State Class is singleton

IntroStateIntroState

Page 28: Technical Presentation Report 이웅주

Class Diagram #3

InterfaceInterface

PrePlayStatePrePlayState

PlayStatePlayState

PostPlayStatePostPlayState

StageStage

push message

Page 29: Technical Presentation Report 이웅주

Relation of states

IntroStateIntroState

MainMenuStateMainMenuState

SinglePlayStateSinglePlayState

HelpStateHelpState

HighScoreStateHighScoreState

OptionkStateOptionkState

CreditStateCreditState

PrePlayStatePrePlayState

PlayStatePlayState

PostPlayStatePostPlayState

GameOverStateGameOverState CongratulationrSt

ate

CongratulationrState

PauseStatePauseState

GameMenuStateGameMenuState

RankStateRankState

Page 30: Technical Presentation Report 이웅주

Role of class• Interface: 화면에 표시되는 정보 관리• StateManager: 상태 스택 관리 , 이벤트를 스택의 top 에 있는 State 에 전달 . 오디오 , 마우스 커서 , 입력 등 전역

상태 , 이벤트 관리• State: 각 상태의 인터페이스 역할• MenuState: 메뉴 상태의 인터페이스• IntroState: 로고 표시 ( 게임에서는 쓰지 않음 )• MainMenuState: 메인 메뉴 표시 , 입력 처리• HelpState: 도움말 처리• OptionState: 게임 선택 사항 관리• HighScoreState: 순위 표시• SinglePlayState: 1 인 게임 상태 처리• PlayState: 스테이지 진행 상태 관리 .• PrePlayState: 스테이지 시작 전 상태 관리 . 스테이지 표시 등• PostPlayState: 스테이지 종료 상태 관리 . 결과 표시• PauseState: 일시 정지 상태 관리• GameMenuState: 게임 중 메뉴 호출 상태 관리• RankState: 순위에 들 경우 플레이어 이름 입력 처리• GameOverState: 플레이어가 게임 종료에 책임이 있는 상태 처리• CongratulationState: 모든 스테이지를 클리어한 상태 관리• CreditState: 제작진 표시• SoundManager: 오디오 관리• InputManager: 렌더링 창으로 들어온 입력을 StateManager 로 전달• Stage: 스테이지 데이터 구조체 관리

Page 31: Technical Presentation Report 이웅주

Management of State

• 프레임 렌더링 시마다 스택 top 에 있는 상태에 처리 요청• 또한 각 상태는 스택에 enter, exit 할때마다 리소스

초기화 및 제거 수행• 각 상태는 필요할 때마다 StateManager 에 control

요청하여 상태 전환

Statestack

StateManager

a state

a state control(push, pop, change),pass event(key, mouse..),render of the state at top

Page 32: Technical Presentation Report 이웅주

Management of State

Page 33: Technical Presentation Report 이웅주

State Class

Page 34: Technical Presentation Report 이웅주

MenuState class

Page 35: Technical Presentation Report 이웅주

Picking the ball #1

• OGRE3D 의 기본 피킹은 AABB• ray query 하여 얻은 entity 의 중심 위치와

ray 간의 최단 거리를 투영벡터를 이용해 얻음 . 이 값을 entity 이름과 반지름을 저장한 맵 (key: entity name) 을 이용하여 사용자가 선택한 볼이 맞는지 비교

• 참조 - 좋은 게임을 만드는 핵심 원리 : 게임 수학과 물리

Page 36: Technical Presentation Report 이웅주

Picking the ball #2

p: 공의 위치|p-q|: 최단 거리p1-q: 투영벡터

Page 37: Technical Presentation Report 이웅주

Picking the ball #3

Page 38: Technical Presentation Report 이웅주

Caching operations

• 연산 결과는 DLL 과의 통신을 통해 얻어짐• 또한 연산식을 표시하기 위해 별도의 표현식을

구성해야함• 이 시간을 줄이기 위해 수식을 키로 한 캐쉬 운용

Page 39: Technical Presentation Report 이웅주

Caching operations

Page 40: Technical Presentation Report 이웅주

Message stack

• Interface 클래스는 전달받은 메시지를 스택에 보관함• 매 프레임마다 최신 메시지의 live time 을 체크하고

표시함

Page 41: Technical Presentation Report 이웅주

Display operation

• 사용자가 입력한 숫자 , 기호는 텍스처로 결과는 비트맵 폰트로 표시됨 . 입력된 숫자의 는 자리 수는 수식만으로 알 수 없음 .

• 결과는 overflow, invalid, 정수 값으로 구성• 표현식을 구성하고 , 이 문자열을 파싱하여 수식 표현

Page 42: Technical Presentation Report 이웅주

Display operation

Page 43: Technical Presentation Report 이웅주

Packaging

• Inno Setup 5 를 사용 . 한글 / 영문 설치 제공• VS2005 로 개발되어 배포용 DLL 이 플레이어

컴퓨터에 설치되어야만 가능 (Redistributable Package)

• Inno Setup 5 의 파스칼 스크립트를 이용하여 설치 여부를 확인하고 , 미설치 경우에는 배포 패키지를 실행시킴