게임 루프와 frame 사고
while (running)
poll input
update simulation
render frame게임이 input, update, render를 frame 단위로 반복한다는 사고와 variable/fixed timestep을 어떻게 읽어야 하는지 정리합니다.
Category Reference
게임 루프, 컴포지션, 상태 패턴, 벡터와 정규화, 행렬 변환, 좌표계, 컬링, 카메라, 렌더링 파이프라인까지 게임 개발의 공통 핵심 흐름을 카드형 레퍼런스로 정리합니다.
제목, 요약, 태그, 섹션 제목 기준으로 찾습니다.
섹션
4 cards
while (running)
poll input
update simulation
render frame게임이 input, update, render를 frame 단위로 반복한다는 사고와 variable/fixed timestep을 어떻게 읽어야 하는지 정리합니다.
Player
- MovementComponent
- HealthComponent
- WeaponComponent게임 오브젝트를 설계할 때 상속보다 컴포지션을 우선 검토하는 이유와, 예외적으로 상속이 맞는 상황을 비교합니다.
Idle -> Run -> Jump -> Fall -> Land캐릭터나 UI, 전투 흐름처럼 mode가 분명한 시스템에서 상태 패턴과 finite state machine을 어떻게 적용할지 정리합니다.
spawn 요청
-> 풀에서 비어 있는 객체 확보
-> 상태 초기화
-> 사용 종료 시 반환투사체, 이펙트, 오디오처럼 자주 생성·파괴되는 대상을 object pool로 다룰 때 무엇이 핵심인지 정리합니다.
5 cards
heading = target - current
direction = normalize(heading)
speedVector = direction * speed벡터를 위치값이 아니라 방향과 크기로 읽고, 정규화와 dot/cross를 이동·시야·판정 문제에 어떻게 연결할지 정리합니다.
local -> world -> view -> clip -> screenlocal, world, view, clip space가 각각 어떤 의미를 가지는지와, transform을 읽을 때 어떤 공간에 있는 값을 보는지 정리합니다.
position = lerp(current, target, t)
rotation = slerp(currentRot, targetRot, t)Lerp, Slerp, damping을 같은 것으로 보지 않고, 위치 이동·카메라 추적·회전 보간에서 각각 언제 써야 하는지 정리합니다.
modelMatrix = translation * rotation * scale
worldPosition = modelMatrix * localPosition이동, 회전, 크기 변형을 행렬 곱으로 다룰 때 순서가 왜 중요한지와 local-to-world 변환을 어떻게 읽어야 하는지 정리합니다.
direction = target - origin
angle = atan2(direction.y, direction.x)atan2를 이용해 방향 벡터를 각도로 바꾸고, 캐릭터 회전·조준·2D 방향 판정에 어떻게 적용하는지 정리합니다.
4 cards
vertex
-> primitive assembly
-> rasterization
-> fragment
-> depth / blend점·선·면 같은 기하 용어부터 vertex, rasterization, fragment, depth/blend까지 real-time rendering pipeline의 큰 흐름을 정리합니다.
world -> view -> projection -> depth testview matrix, perspective/orthographic projection, depth buffer가 각각 무엇을 하는지와 카메라 문제를 어떻게 읽을지 정리합니다.
같은 mesh/material을 많이 그린다
-> batching / instancing 가능성 확인
겹쳐 그리는 픽셀이 많다
-> overdraw 확인rendering cost를 볼 때 draw call 수만 세지 않고 batching, state change, overdraw를 함께 읽어야 하는 이유를 정리합니다.
카메라에서 안 보일 후면 삼각형은
-> rasterization 전에 제외후면을 추려내는 backface culling이 왜 성능과 가시성에 도움이 되는지와, CW/CCW winding을 어떻게 읽어야 하는지 정리합니다.