Unity Netcode for Entities – Synchronizing states and inputs (1)

🔥 Synchronizing states and inputs Netcode for Entities 1.5.0v Ghosts, Commands, RPC를 사용해 서버와 클라이언트 간 상태 및 입력 동기화합니다. 주제 설명 1️⃣ Ghosts를 이용한 동기화 유령(Ghost)을 사용하면 서버와 클라이언트 간 상태를 일관되면서도 유연하게 동기화하고 복제할 수 있습니다. 2️⃣ RPC(Remote Procedure Call)를 통한 통신 원격 프로시저 호출(RPC)은 게임의 상위 흐름 이벤트를 전달하거나 클라이언트에서 서버로 예측되지 […]

Unity Netcode for Entities – Synchronizing states and inputs (1) 더 읽기"

Unity Netcode for Entities – Connecting server and clients

🔥 Connecting server and clients Netcode for Entities 1.5.0v https://docs.unity3d.com/Packages/com.unity.netcode@1.5/manual/creating-multiplayer-gameplay.html 주제 설명 서버와 클라이언트 연결Connecting server and clients Netcode for Entities는 Unity Transport 패키지를 사용하여 연결을 관리합니다. 각 연결은 하나의 엔티티로 저장되며, 해당 엔티티는 NetworkStreamConnection 컴포넌트를 포함하고 있어, 연결에 사용되는 Transport 핸들을 참조합니다. 이 엔티티의 이름은 일반적으로 ‘NetworkConnection [nid]’ 형식입니다. 상태 및 입력 동기화Synchronizing states

Unity Netcode for Entities – Connecting server and clients 더 읽기"

Unity Netcode for Entities – Client / Server worlds

🔥 Client / Server worlds Setting Netcode for Entities 1.5.0v https://docs.unity3d.com/Packages/com.unity.netcode@1.5/manual/set-up-client-server-worlds.html Netcode for Entities의 네트워킹 모델을 사용하여client 와 server를 설정합니다. ✅ 클라이언트 / 서버 World 네트워크 모델 https://docs.unity3d.com/Packages/com.unity.netcode@1.5/manual/client-server-worlds.html Netcode for Entities는 Client와 Server의 로직을 각각 Client world와 Server world로 분리하여 처리합니다. 월드(World)는 Unity의 ECS(Entity Component System) 개념으로, 엔티티와 시스템을 시스템 그룹(SystemGroup)으로 구성한 단위입니다. 기본적인 Client

Unity Netcode for Entities – Client / Server worlds 더 읽기"

IInputComponentData [Netcode for Entities]

🔍 IInputComponentData https://docs.unity3d.com/Packages/com.unity.netcode@1.5/api/Unity.NetCode.IInputComponentData.html Netcode for Entities (NFE)에서 클라이언트의 입력을 서버로 전송하기 위해 특별히 설계된 인터페이스 IInputComponentData의 핵심 역할 1️⃣ 입력 데이터의 네트워크 동기화 2️⃣ 예측(Prediction) 시스템 지원 3️⃣ 입력 버퍼링 ✍🏻예시 코드 ❓[GhostField(Quantization = 100)] 양자화를 사용하는 이유 Netcode for Entities (NFE)에서 네트워크 대역폭을 최적화하기 위해 사용되는 핵심 기능 1️⃣ 데이터 압축으로 대역폭 절감 2️⃣ 네트워크

IInputComponentData [Netcode for Entities] 더 읽기"

백준 10813번 (공 바꾸기, C++) [BAEKJOON]

공 바꾸기 https://www.acmicpc.net/problem/10813 시간 제한 메모리 제한 제출 정답 맞힌 사람 정답 비율 1 초 256 MB 90321 56671 50445 63.108% 문제 도현이는 바구니를 총 N개 가지고 있고, 각각의 바구니에는 1번부터 N번까지 번호가 매겨져 있다. 바구니에는 공이 1개씩 들어있고, 처음에는 바구니에 적혀있는 번호와 같은 번호가 적힌 공이 들어있다. 도현이는 앞으로 M번 공을 바꾸려고 한다. 도현이는

백준 10813번 (공 바꾸기, C++) [BAEKJOON] 더 읽기"

C#의 CancellationToken, CancellationTokenSource

🔥 CancellationToken, CancellationTokenSource https://learn.microsoft.com/ko-kr/dotnet/api/system.threading.cancellationtokensource?view=net-9.0 ✅ 개념 정리 CancellationToken과 CancellationTokenSource는 C#에서 비동기 작업(Task)이나 스레드를 안전하게 취소할 수 있도록 제공되는 기능합니다. 이를 활용하면 비동기 작업을 중단하거나, 긴 루프를 중지할 수 있도록 관리할 수 있습니다. 🔹 CancellationTokenSource 🔹 CancellationToken 역할 설명 CancellationTokenSource 취소 요청을 보내는 쪽 (발신자) 역할을 합니다. Cancel(), CancelAfter(), Dispose() 등을 호출 할 수 있습니다. CancellationToken

C#의 CancellationToken, CancellationTokenSource 더 읽기"

백준 9935번 (문자열 폭발, C++) [BAEKJOON]

문자열 폭발 https://www.acmicpc.net/problem/9935 시간 제한 메모리 제한 제출 정답 맞힌 사람 정답 비율 2 초 (추가 시간 없음) 128 MB 97727 27262 19242 27.023% 문제 상근이는 문자열에 폭발 문자열을 심어 놓았다. 폭발 문자열이 폭발하면 그 문자는 문자열에서 사라지며, 남은 문자열은 합쳐지게 된다. 폭발은 다음과 같은 과정으로 진행된다. 상근이는 모든 폭발이 끝난 후에 어떤 문자열이 남는지

백준 9935번 (문자열 폭발, C++) [BAEKJOON] 더 읽기"

백준 11444번 (피보나치 수 6, C++) [BAEKJOON]

피보나치 수 6 https://www.acmicpc.net/problem/11444 시간 제한 메모리 제한 제출 정답 맞힌 사람 정답 비율 1 초 256 MB 27890 12508 10367 47.603% 문제 피보나치 수는 0과 1로 시작한다. 0번째 피보나치 수는 0이고, 1번째 피보나치 수는 1이다. 그 다음 2번째 부터는 바로 앞 두 피보나치 수의 합이 된다. 이를 식으로 써보면 Fn = Fn-1 + Fn-2 (n ≥ 2)가

백준 11444번 (피보나치 수 6, C++) [BAEKJOON] 더 읽기"

ECS – Component concepts (1)

1. Component란? https://docs.unity3d.com/Packages/com.unity.entities@1.3/manual/concepts-components.html Unity의 DOTS (Data-Oriented Technology Stack)에서 ECS(Entity Component System)의 핵심 요소 중 하나 ComponentData는 ECS에서 “데이터”를 저장하는 구조체 위의 예시에서 Speed, Direction, Position, Renderer가 Component 특징 사용 예시 2. IComponentData를 사용하여 Entity에 데이터 추가 IComponentData를 사용하려면 엔터티(Entity)에 추가해야 함 사용 예시 3. IComponentData를 읽고 수정하는 방법 ECS에서는 시스템(System)을 이용하여 데이터를 처리 사용 예시

ECS – Component concepts (1) 더 읽기"

ECS – Unity Physics Stateful Event Study

StatefulTriggerEventBufferAuthoring.cs 코드 설명 이 코드는 TriggerEvent를 StatefulTriggerEvent로 변환하여 Dynamic Buffer에 저장하는 역할을 합니다. 특정 엔티티에 StatefulTriggerEventBufferAuthoring 컴포넌트를 추가하면 Trigger 이벤트의 상태(Enter, Stay, Exit)를 추적할 수 있습니다. Unity의 GameObject를 ECS(Entity-Component-System) 엔티티로 변환하는 역할 Baker 클래스에서 StatefulTriggerEvent를 저장할 Dynamic Buffer를 추가함 이를 통해 Trigger 이벤트를 저장하는 버퍼를 ECS 엔티티에 추가 가능 해당 엔티티는 StatefulTriggerEvent 버퍼를 가지게 됨.

ECS – Unity Physics Stateful Event Study 더 읽기"

위로 스크롤