Create Game
[UE5] COMBAT GAME - 01. PLAYER
1. Player 1.1 Mesh - 마켓 플레이스에 있는 Pargon: Kwang 사용 - https://www.unrealengine.com/marketplace/ko/product/paragon-kwang 1.2 Component 1.2.1 Camera Component, Character Movement Component 1.2.2 Combat Component - Weapon System - Equipment & Unequipment Weapon - Enable Attack 1.2.3 Stat Component - Health - Stemina - Armor - Attack Damage 1.2.4 Collision Component - Activate & Deactivate Collision -..
[SERVER] Condition Variable
1. Condition Variable 1.1 Producer & Consumer - 생산자 및 소비자 패턴을 사용할 때 어떠한 조건이 만족할 때까지 자라는 명령을 하지 못함 - 따라서 sleep을 이용해 재웠다 깨웠다 사용 1.2 Condition Variable - 조건 변수를 사용하면 이를 해결 가능 1.2.1 Main - Condition Variable Create int main() { vector workers; queue q; std::mutex m; std::condition_variable cv; workers.push_back(std::thread(producer, std::ref(q), std::ref(m), std::ref(cv))); workers.push_back(std::th..
[SERVER] Producer & Consumer
1. Producer & Consumer 1.1 Producer & Consumer - 멀티 쓰레드 프로그램에서 가장 많이 등장하는 패턴 - 생산자는 무언가 처리할 일을 받아오는 쓰레드를 의미 - 소비자는 받은 일을 처리하는 쓰레드를 의미 - Queue 사용 - FIFO - 먼저 처리할 일을 받으면 먼저 처리함 1.2 Program 1.2.1 Main - Queue, Mutex Create - 일감을 저장할 수 있게 큐 생성 및 상호배제를 하기 위해 Mutex 생성 int main() { vector workers; queue q; std::mutex m; workers.push_back(std::thread(producer, std::ref(q), std::ref(m))); workers.push_ba..