Code Monkey home page Code Monkey logo

game-engine's Introduction

소스파일 분류

새로운 폴더 (Engine/src/)

  1. Actor/
  • Enity를 갖고 씬에 할당되는 오브젝트들을 분류하였습니다.
  1. Components/
  • Enity에 할당되는 컴포넌트들을 분류하였습니다.
  1. Core/
  • 엔진과 더불어 엔진 내부에서 주로 돌아가는 DX, 이벤트, Fmod, 인풋, 리소스매니저, 씬, 타임매니저들을 분류하였습니다.
  1. DataTypes/
  • 기존 DateTypes.h에 모여있던 구조체들을 5가지 헤더로 분류하였습니다.
  1. Headers/
  • DllMacro, entt.hpp, GolobalFunctions 등 stdafx와 함께 묶을 헤더들을 분류하였습니다.
  1. Physics/
  • 쿼드트리와 충돌체, 충돌로직 소스들을 분류하였습니다.
  1. ResourceTypes/
  • 머터리얼, 메쉬, 쉐이더, 텍스처들을 분류하였습니다.
  1. Systems/
  • ECS 기반 시스템 클래스들을 분류하였습니다.
  1. Tools/
  • 파일입출력, ImGui 등 에디터 기능 클래스들을 분류하였습니다.
  1. UI/
  • UI 관련 객체 클래스와 RenderTargetMgr 및 WriteMgr를 분류하였습니다.
  1. World/
  • 레벨, 스카이스피어 등의 클래스들을 분류하였습니다.

game-engine's People

Contributors

eussy avatar jasontreksc avatar jiy12345 avatar keines1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

game-engine's Issues

마우스 레이 Callback에 대하여

PhysicsMgr.h 에서 알 수 있듯이, 라이브러리의 콜백 클래스를 상속받아 마우스 레이 콜백 클래스를 임시적으로 만들었습니다.
콜백 클래스 상속으로 각종 충돌에 대한 이벤트를 얻는 것은 라이브러리 공식 매뉴얼입니다. 다만 게임엔진에서의 최적화와 정확한 충돌이벤트 판별을 위해서는 약간의 개조가 필요할 것으로 보입니다.

특정 콜리전바디에 대해서만 레이캐스트

이 물리 라이브러리는 두가지 방법의 레스캐스트를 제공합니다. 그 중 하나는 특정 콜리전에 대해서만 레이 충돌을 검사하는 것입니다.
CollisionBody* body = 콜리전 바디
bool result = body->raycast(ray, &raycast_info);
이 경우에는 콜백 클래스가 필요하지 않습니다. 두번째 인자는 콜백이 아닌 레이캐스트 인포로, 반환값으로 쓰거나 지역변수로 생성합니다. 이 경우에는 어느 오브젝트가 충돌에 반응했는지는 알 수 있으나 충돌지점의 정확환 위치나 아닌 오브젝트의 월드위치를 알려줍니다. 피킹 지점의 좌표를 계산하지 않으므로 오브젝트만 피킹하는 데에는 이것이 괜찮을 듯 합니다.

월드에서의 레이캐스트

월드 레이캐스트는 콜백 클래스를 두번째 인자로 넣어줍니다. 콜백 클래스에서 info를 추줄할 수 있습니다. 이는 월드에 존재하는 모든 콜리전 바디를 찾아낼 수 있으며 피킹 지점의 정확한 좌표까지 알 수 있습니다. 다만 이것은 상당히 느릴 수 있어 레벨 정접 편집에 대해서만 쓰도록 하는게 좋을 것 같습니다.

그럼 가장 좋은 레이스캐스트 방식은?

제가 제안하는 것은, 피직스 시스템에 엔티티를 인자로 받는 레이캐스트 함수를 만드는 것입니다. 함수는 레지스트리에서 해당 엔티티를 찾아냅니다. 엔티티에 콜리전 컴포넌트가 있다면, 그리고 raycast 함수가 도출한 raycast_info 객체에 있는 바디와 콜리전 컴포넌트가 가진 바디와 일치하면 해당 인포 객체를 반환하는 것입니다.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.