Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

던전 랜덤 생성 #25

Open
todd032 opened this issue Aug 4, 2015 · 5 comments
Open

던전 랜덤 생성 #25

todd032 opened this issue Aug 4, 2015 · 5 comments
Assignees

Comments

@todd032
Copy link
Collaborator

todd032 commented Aug 4, 2015

  1. 한 던전의 플레이 타임을 최소 2분으로 설계
  2. 다음 던전으로 넘어가는 조건은 무조건 키를 획득하여 여는게 목적.
@todd032 todd032 added this to the 1차 목표 지점 milestone Aug 4, 2015
@todd032
Copy link
Collaborator Author

todd032 commented Aug 4, 2015

시간은 무엇들로 조정되는가에 대해 생각.

  1. 거리
  2. 함정
  3. 바닥(움직이는 발판 같은것들)

@todd032
Copy link
Collaborator Author

todd032 commented Aug 6, 2015

던전 1개는 N*N 의 조합으로 구성된다.

  1. 먼저 N * N 에 시작점에서 끝점을 통과하는 Main Path를 설정한다 (index 형태로 List로 데이터 저장)
  2. 사용되지 않은 부분중에 SidePath들을 생성한다.(시작점부터, 끝점까지 index List 가지고 있도록)
  3. 가지고있는 part들 중에 조건에 부합하는 part를 골라 랜덤하게 배치한다.(다음 길로 갈 수 있도록)
  4. 배치되지 않은 구역들은 거대한 collider 덩어리로 접근을 못하도록 막아놓는다.
  5. 시작점과 끝지점에 시작오브젝트와, 끝 오브젝트를 놔둔다.
  6. SidePath끝에 mainpath로부터의 길이를 도입하여, 보상을 비례하도록 배치한다.
  7. 각 맵에 기획자가 설정한 오브젝트들이 배치되도록 한다.

@todd032
Copy link
Collaborator Author

todd032 commented Aug 6, 2015

GDungeonManager - 던전 생성을 판단하는 놈

GDungeonPart - 던전 부분(기획자가 만들어서 제공)

GDunegeonObjectPlacer - 던전 파트에 넣어놓고, 어느 위치에 어느 오브젝트가 생성될지 판단.

@todd032
Copy link
Collaborator Author

todd032 commented Aug 7, 2015

Main Path의 최대 길이 설정하게끔 만들어주셈.
최대 길이 이하로만 main path의 길이가 생성되게끔 하는 기능.

@todd032
Copy link
Collaborator Author

todd032 commented Aug 12, 2015

제작중인 dungeon part들은 G/Prefab/MapPrefab 아래에 존재

GDungeonPart를 보면

In Direction List와
Out Direction List가 있음.

789
456
123

위와 같은 구조에서 Main 흐름이
1->2->5->6->3 과 같은 구조라고 가정

1 부분에 적합한 맵 파트를 고르기 위해서는

  1. OutDirection에 Right가 있는 것들만 추려서 생성

2 부분에 적합한 맵 파트를 고르기 위해서는

  1. InDirection에 Left가 있는 것들
  2. 다음 지역인 5로 가기 위해 OutDirection에 Top 이 있는 것들을 추리기

위의 조건에 부합하여 길을 쭉 생성.

그리고 생성할때 GDungeonPart의 Create 함수를 호출해주길 바람.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants