SlideShare a Scribd company logo
1 of 8
Game Programing Gems2
Chapter 3.5




         고성능 타일 기반
        시선 및 검색 시스템

                        케슈(우종규)
LOS와 FOW
▶ LOS(Line-of-Sight)
가시선, 주어진 유닛이 현재 볼 수 있는 영역




▶ FOW(Fog-of-War)
 전운, 안개, LOS범위 외의 타일.
 타일이 탐험된영역이지만 LOS의 범위 밖에 있는경우
 안개로 표현
LOS와 FOW
개별 플레이어의 가시성 맵
▶각 플레이어에게 고유하게 적용되는 가시성 맵.
▶2차원배열(바이트형)으로 표현.

■ 가시성맵의 갱신
- 유닛의 생성 및 이동으로 인해 유닛의 LOS안에 타일이 들어오면
카운트증가.
- 유닛의 파괴 및 이동으로 인해 유닛의 LOS범위 밖으로 이동시 카운
트 감소.
- count < 0 이면 탐험되지 않은 타일
- count == 0 이면 탐험되었으나 플레이어의 시선범위밖(FOW적용)
- count > 0 이면 플레이어의 시선범위 안
LOS판형
LOS판형 : 유닛의 LOS형태를 기록한 판형.
       LOS범위별 테이블.

· 캐릭터를 중심으로 상대위치값 갱신
· 수평형태의 띠의 묶음(배열)
· 캐릭터기준으로 수직위치, 수평 시작·끝 위치



LOS의 이동

· 타일의 LOS범위 모두에 대한 카운트 감소, 증가는 비효율적.
· 실제로 이동시 겹치는 부분이 더 많음.
· 겹치지 않는 부분만 갱신하자!!
결합된 가시성 맵

- 플레이어단위의 가시성 맵 통합하기.
- 32비트 DWORD형 2차원 배열 사용.


■ 통합된 가시성 맵
 - 길 찾기 등 많은 곳에서 자주 사용되므로 전역변수사용.
 - 2비트단위. 1비트는 타일의 탐험여부, 1비트는 LOS범위 여부.
 - 2*16=32 16명의 플레이어 지원.
검색의 향상

▶결합된 가시성 맵의 이용
- 타일의 비트 연산만으로 타일정보 확인가능.
- 현재 유닛의 타일이 적의 시야에 있는지 여부 확인가능.
- 타일의 정보가 변할경우만 갱신함으로써 성능향상.
- 유닛의 LOS가 아닌 결합된 가시성맵을 이용하게 됨으로써 플레이
어의 유닛이 정보를 공유한다는 효과.


▶ 유닛 목록의 세부화
 - 동맹군 유닛, 적유닛, 건물등을 세부화 함으로써 속도 향상.(공격)
Q & A

More Related Content

Featured

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Featured (20)

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 

고성능타일기반시선및검색시스템

  • 1. Game Programing Gems2 Chapter 3.5 고성능 타일 기반 시선 및 검색 시스템 케슈(우종규)
  • 2. LOS와 FOW ▶ LOS(Line-of-Sight) 가시선, 주어진 유닛이 현재 볼 수 있는 영역 ▶ FOW(Fog-of-War) 전운, 안개, LOS범위 외의 타일. 타일이 탐험된영역이지만 LOS의 범위 밖에 있는경우 안개로 표현
  • 4. 개별 플레이어의 가시성 맵 ▶각 플레이어에게 고유하게 적용되는 가시성 맵. ▶2차원배열(바이트형)으로 표현. ■ 가시성맵의 갱신 - 유닛의 생성 및 이동으로 인해 유닛의 LOS안에 타일이 들어오면 카운트증가. - 유닛의 파괴 및 이동으로 인해 유닛의 LOS범위 밖으로 이동시 카운 트 감소. - count < 0 이면 탐험되지 않은 타일 - count == 0 이면 탐험되었으나 플레이어의 시선범위밖(FOW적용) - count > 0 이면 플레이어의 시선범위 안
  • 5. LOS판형 LOS판형 : 유닛의 LOS형태를 기록한 판형. LOS범위별 테이블. · 캐릭터를 중심으로 상대위치값 갱신 · 수평형태의 띠의 묶음(배열) · 캐릭터기준으로 수직위치, 수평 시작·끝 위치 LOS의 이동 · 타일의 LOS범위 모두에 대한 카운트 감소, 증가는 비효율적. · 실제로 이동시 겹치는 부분이 더 많음. · 겹치지 않는 부분만 갱신하자!!
  • 6. 결합된 가시성 맵 - 플레이어단위의 가시성 맵 통합하기. - 32비트 DWORD형 2차원 배열 사용. ■ 통합된 가시성 맵 - 길 찾기 등 많은 곳에서 자주 사용되므로 전역변수사용. - 2비트단위. 1비트는 타일의 탐험여부, 1비트는 LOS범위 여부. - 2*16=32 16명의 플레이어 지원.
  • 7. 검색의 향상 ▶결합된 가시성 맵의 이용 - 타일의 비트 연산만으로 타일정보 확인가능. - 현재 유닛의 타일이 적의 시야에 있는지 여부 확인가능. - 타일의 정보가 변할경우만 갱신함으로써 성능향상. - 유닛의 LOS가 아닌 결합된 가시성맵을 이용하게 됨으로써 플레이 어의 유닛이 정보를 공유한다는 효과. ▶ 유닛 목록의 세부화 - 동맹군 유닛, 적유닛, 건물등을 세부화 함으로써 속도 향상.(공격)